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

Maybe we should simply point out that customElements are not a magic thing without the define stuff and all that they are 

```js
//CustomElement based on HTMLUnknownElement
const myCustomElement = (tag) => document.createElement(tag)
//Then apply some lhooks or what ever to it
myCustomElement.connectedCallback = () {
this.innerHTML = '<p>Iam a Complex Application </p>'
document.body.append(myCustomElement)

// We can also use existing HTML Elements
const MYCustomElment = document.getElementById('my-element')
MYCustomElment.connectedCallback = () {
this.innerHTML = '<p>Iam a Complex Application </p>'
document.body.append(myCustomElement)
}


```

Now the leaved out question is how does get connectedCallback get called ? you can do it manual or via mutationObserve and register it then you can also attach more behavior or bindings its a customElement so your free

as long as you understand a CustomElement is a modifyed version of a HTMLElement Instance.


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

Received on Tuesday, 24 December 2019 15:21:12 UTC