[WICG/webcomponents] New Lifecycle Callback: `willConnectCallback` for initializing attributes (#919)

Well, we can't set attributes in constructor, and if we set them in `connectedCallback` it will cause some problems with `MutationObserver` (e.g. when a custom element is added to DOM, first mutationCallback is triggered then attributes are initialized in `connectedCallback`).
So what about a lifecycle callback before element is added to DOM that is ergonomically the best way to initialize attributes?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/WICG/webcomponents/issues/919

Received on Sunday, 4 April 2021 08:41:17 UTC