[webcomponents] [Custom]: mixin pattern: custom elements should be able to extend any base tag with is= (bugzilla: 27977) (#153)

Title: [Custom]: mixin pattern: custom elements should be able to extend any base tag with is= (bugzilla: 27977)

Migrated from: https://www.w3.org/Bugs/Public/show_bug.cgi?id=27977

----
comment: 0
comment_url: https://www.w3.org/Bugs/Public/show_bug.cgi?id=27977#c0
*Randy Harmon* wrote on 2015-02-07 19:02:20 +0000.

As a creator of web components, I'd like to be able to have a component perform element-type-agnostic concerns, such that it could be mixed in to any specific tag, thus specializing the prototype for that tag instance.  

This would affect the attachedCallback, where the component author would need to be given a tag-instance prototype, ideally already prepared for doing mixins on, and might indicate some fine-tuning of element registration, to support the late assignment of prototype to tag instance.  I imagine non-mixin custom tags would have a largely unchanged lifecycle, not least for API compatibility.

Ideally, multiple is= values would allow multiple mixins, each overlaying the prototype chain defined by the attachedCallback from the prior mixin.

---
Reply to this email directly or view it on GitHub:
https://github.com/w3c/webcomponents/issues/153

Received on Monday, 6 July 2015 07:36:20 UTC