[slot#outer, slot#inner, document-fragment, green-frame#frameOne, document-fragment]
[pre, pre, pre, pre, pre, pre, pre]
[pre, pre, pre, pre, pre, pre, pre]
The second slotchange event is caused by all the pre elements being transposed into slot#outer.
Important to note here is that this slotchange event is not dispatched on slot#inner, but bubbles *from*
slot#outer *to* slot#inner. This is very strange, but it is because the flattened DOM looks like this:
...
< portrait-frame >
#shadowRoot
..
< green-frame >
#shadowRoot
< slot#inner >
< slot#outer >
< pre >¯\_(ツ)_/¯
< pre > | |
...
The second slotchange event is the one we want. The problem with this slotchange event is that it really dispatched
on slot#outer, not the slot#inner. It would be natural to assume that when the pre-nodes become transposed all the
way into slot#inner, a slotchange event would be dispatched directly from slot#inner. This is not so. The reason the
slotchange event listener for slot#inner receives a slotchange event is that this event will bubble all the way up
to #shadowRoot under portrait-frame.