polymer - How to use the "hidden" attribute? -


i can see official polymer elements using hidden attribute so:

hidden$="[[!somevalue]]" , hidden$=[[somevalue]]

however, in case, somevalue huge object , while above expressions still work, hidden$=[[somevalue]] can see this:

serialized object value of hidden attribute

app unnecessary work serializing object + having text makes harder me work devtools.

so, used hidden=[[somevalue]] , hidden=[[!somevalue]] instead. these work charm.

my questions are:

  • can safely use hidden= instead of hidden$=?
  • why works? understood $= sets attributes , = sets properties.
  • if should use hidden$= whats best way hidden$=[[bigobject]]?

it looks can safely use hidden attribute or property. this polyfill webcomponentsjs library says setting property reflect attribute. explain why $= , = have same behavior.

since setter overrides value '', expect setting property (=) use less memory , more performant, benchmarks real way know sure.


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -