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

**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