Open bicknellr opened 6 years ago
I'm inclined to say that it should be changed to the spec-text order, rather than attempting to emulate the reactions stack at a local level since it won't really work out until everything is using an actual implementation of the reactions stack.
@bicknellr Is this still relevant?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
https://github.com/webcomponents/custom-elements/blob/6ad9993949a4f25c05b50b27a031a2ebfc49df89/src/Patch/Node.js#L151-L161
The ordering of reactions triggered by this snippet is incorrect, both in terms of when the spec text triggers enqueues the reactions and what order they would be called when the queue is being flushed.
The spec text ordering - described here, in 'replace' - would be:
nodeToInsert
.nodeToRemove
.nodeToInsert
.Which, when flushed, would be:
nodeToInsert
'sdisconnectedCallback
.nodeToInsert
'sconnectedCallback
.nodeToRemove
'sdisconnectedCallback
.