- From: Joe Pea <notifications@github.com>
- Date: Fri, 01 Feb 2019 12:46:41 -0800
- To: w3c/webcomponents <webcomponents@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Friday, 1 February 2019 20:47:03 UTC
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