Re: [w3c/webcomponents] connectedCallback timing when the document parser creates custom elements (#551)

It is a real problem with v1: but the compromise which changed the lovely v0 was essentially an fu to components, an effort to make CE non viable. The solution is actually Dom[0], way easier in es6,  but are  “naughty”.  Require a monkey patch. 

If child behavior depends on parent type, put a Shared function or a getter prop on HTML.prototype using Obj.defineProperty;  make the getter a state machine/switch/proxy dependent on this.nodeNamr and/or this.parentElement.nodeName. 

The getter on the HtmlElement.prototype will register parentsvand children immediately.  There is no connected bullshit. 

Here is a verbose declarative approach with animation, resize. And most of the features of flex without any css.  

 https://codepen.io/jfrazz/pen/yPbBQZ

-- 
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/551#issuecomment-429533804

Received on Saturday, 13 October 2018 11:17:50 UTC