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
constel=document.querySelector('div')// suppose el is <div has="foo bar baz">el.behaviors.add('click-logger')el.behaviors.remove('foo')// now el is <div has="bar baz click-logger">
which means .behaviors would exist on Element.prototype, or should it be something like
constel=document.querySelector('div')// suppose el is <div has="foo bar baz">elementBehaviors.of(el).add('click-logger')elementBehaviors.of(el).remove('baz')// now el is <div has="bar baz click-logger">
It seems like a global map would be easier to optimize, rather than increasing the size of the prototype of all elements by default. ?
The text was updated successfully, but these errors were encountered:
For example, should it be
which means
.behaviors
would exist onElement.prototype
, or should it be something likeIt seems like a global map would be easier to optimize, rather than increasing the size of the prototype of all elements by default. ?
The text was updated successfully, but these errors were encountered: