- From: Wired Earp <notifications@github.com>
- Date: Fri, 08 Sep 2017 12:58:51 -0700
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 8 September 2017 19:59:13 UTC
Perhaps like this: ```javascript import CustomBehaviors from 'mylib'; CustomElements.define('my-element', { constructedCallback(elm) { if(elm.hasAttribute('has')) { CustomBehavior.init(elm); // puts 5 instances of CustomBehavior in WeakMap } } }); ``` The mechanism simply provides the necessary callbacks for you to experiment with the syntax: ```html <div is="my-element" has="one two three four five"/> ``` – until it becomes popular enough to be included in the standard. I just think this works better than the other way around. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/webcomponents/issues/662#issuecomment-328199688
Received on Friday, 8 September 2017 19:59:13 UTC