Re: [w3c/webcomponents] CE reaction queue's not-really-sync behavior doesn't provide strong enough guarantees about when reactions occur (#616)

I'm sympathetic to the difficulty of using custom element callbacks efficiently and effectively.

Ironically the solution here may be *more* callbacks, like "this element's queue was exhausted." I haven't thought through this in detail though. It would need care to make it efficient and useful. It might make sense to wait and see if custom elements authors are using requestAnimationFrame or polling state a lot to do similar things in less efficient ways.

> Unless callbacks are fully synchronous,

By the way, even "fully synchronous" callbacks are insufficient, because one DOM operation (for example, remove) can change the state of multiple custom elements at once. You have to call the disconnected callbacks in some order, so the observed state of the other element is out of sync (ahead) of its 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/616#issuecomment-268159494

Received on Tuesday, 20 December 2016 05:35:40 UTC