- From: Joe Pea <notifications@github.com>
- Date: Sat, 02 Feb 2019 13:38:44 -0800
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Saturday, 2 February 2019 21:39:05 UTC
**But then again, isn't an end user able to change stuff by extending from a `class`?** F.e., a class can easily be extended by an end user and a `static elementName` value overridden. It just seems like if we're using `class`, maybe we should be sticking class specifics inside the class definition rather than passing class specifics to an API outside of the class definition. ```js class NewEl extends MyEl { static get elementName() { return "new-el" } } customElements.define(NewEl) ``` What would be the downside of having class-specifics inside the class definitions instead of in `customElements.define`? -- 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-460001294
Received on Saturday, 2 February 2019 21:39:05 UTC