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

In the example above, the most unexpected behavior is that the user of `<x-outer>.children[0]` called `setAttribute('a', 'foo')` but from her perspective saw a result of `getAttribute('a') ==  null`.

It seems that this behavior could be addressed by changing the spec at https://html.spec.whatwg.org/#custom-element-reactions such that the `[CEReactions]` steps were modified via the bold text below:

1. Before executing the algorithm's steps: **Pop the element queue from the custom element reactions stack, and invoke custom element reactions in that queue.** Push a new element queue onto the custom element reactions stack.
1. After executing the algorithm's steps: Pop the element queue from the custom element reactions stack, and invoke custom element reactions in that queue.

It seems like this would replay the reactions in a more expected order and would not result in the unexpected behavior described above.

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

Received on Saturday, 10 December 2016 02:07:32 UTC