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

The only reason why `customElements.define` even needs to accept a name is presumably to allow the user to customize this important aspect. Otherwise, all we need is

```js
class MyEl extends HTMLElement {
  static elementName = 'my-el'
}

customElements.define(MyEl)
```

So unless it is critical for an end user to change something, then I feel it doesn't need to go into `customElements.define` because we already have `class`. And end user can even extend the class to change the name if it were `static`, in that previous example.

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

Received on Friday, 1 February 2019 20:47:03 UTC