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

Yeah, so the idea would be that if `connectedCallback` or `disconnectedCallback` is enqueued, then before invoking those callbacks, we would check for any redundancy; e.g. if the element is currently connected, then we can get rid of disconnected & connected callbacks pairs (in that chronological order) in the reaction queue. If the element is currently disconnected, then we can remove a sequence of pairs of connected and disconnected callbacks.

This way, when you receive connected or disconnected callbacks, you know that the element is currently connected or disconnected. One downside is that you wouldn't be able to tell whether the element had temporarily got connected / disconnected or not by simply listening to reaction callbacks.

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

Received on Wednesday, 5 December 2018 06:35:03 UTC