Re: [w3c/webcomponents] Presence of disconnectedCallback can expedite an invocation of connectedCallback (#760)

Pulling my comment from the PR, I'm having second thoughts about this. If we made this change, presumably, all new reaction callback we would add should do the same. But that would mean that we would enqueue a custom element into the reaction queue at timings we currently don't do. That seems like a serious forward compatibility issue to me.

Another somewhat different fix here might be that avoid invoking `connectedCallback` or `disconnectedCallback` when the condition isn't met. As @tomalec mentioned during TPAC, this is a rather very confusion behavior, and unlike `MutationObserver`, the purpose of custom element reaction queue isn't to record everything that had happened. So it might better to avoid invoking connected or disconnected callbacks when those conditions are not met.

What do you all think?

-- 
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/760#issuecomment-443009637

Received on Thursday, 29 November 2018 22:01:15 UTC