You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
only generates one serialization of the properties. This is because realizing the string could be expensive. With Custom Elements, you would reasonably expect this to generate three attributeChangedCallback invocations with three serializations of the string.
There are a lot of design alternatives that would avoid this, with various trade-offs. For example, the UA could be permitted to dispatch those callbacks later and coalesce them; the API could let authors specify specific attributes to watch; the attributeChangedCallback could be supplied with only the attribute name and make the author responsible to poll the attribute; etc. (Some of these options have been discussed in the past in other contexts.)
The text was updated successfully, but these errors were encountered:
only generates one serialization of the properties
if the purpose is to be able to understand old and new value, why wouldn't that be notified only once, after such serialization happens?
I personally think it would be way more useful to receive one style changed notification instead of N times per each single change, for the very same reason it's useful in Blink ( less operations per time, snappier, happy UI and developers )
... or ... is the problem that each of those should trigger different event? what would be the attribute name then, if not just style ?
Implementer feedback: In Blink, the "style" attribute is serialized lazily so that a code block like:
only generates one serialization of the properties. This is because realizing the string could be expensive. With Custom Elements, you would reasonably expect this to generate three attributeChangedCallback invocations with three serializations of the string.
There are a lot of design alternatives that would avoid this, with various trade-offs. For example, the UA could be permitted to dispatch those callbacks later and coalesce them; the API could let authors specify specific attributes to watch; the attributeChangedCallback could be supplied with only the attribute name and make the author responsible to poll the attribute; etc. (Some of these options have been discussed in the past in other contexts.)
The text was updated successfully, but these errors were encountered: