Re: [w3c/webcomponents] How to define APIs only for custom element authors (#758)

>  or we could make this an opt-in feature where you'd have to declare it in a static field like we did for observedAttributes.

Opt-in sounds a good idea.   Adding a flag to ElementDefinitionOptions would be an easy way.

    customElements.define('my-element', MyElement, {needsElementInternals: true});
    // ==> ElementInternals creation is allowed.

    customElements.define('my-element', MyElement);
    // ==> ElementInternals creation is disallowed.


-- 
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/758#issuecomment-428818722

Received on Thursday, 11 October 2018 04:43:03 UTC