Load this experiment
Open devtools Elements panel
Select / highlight the third \ in the "National Geographic" layer (label="Imagery")
In the console drawer, execute this:
let imagery = $0
Select / highlight the first \ in the "National Geographic" layer (label="National Geographic")
In the console drawer, execute this:
$0.insertAdjacentElement('afterend',imagery)
What happens:
The \ is moved to the second DOM position, but it disappears from the layer control altogether.
What should happen:
The \ is moved to the second DOM position, and it should be the second sub-layer in the "National Geographic" layer in the layer control.
Steps to reproduce
Load this experiment Open devtools Elements panel Select / highlight the third \ in the "National Geographic" layer (label="Imagery")
In the console drawer, execute this:
in the "National Geographic" layer (label="National Geographic")
In the console drawer, execute this:
let imagery = $0
Select / highlight the first \$0.insertAdjacentElement('afterend',imagery)
What happens:
The \ is moved to the second DOM position, but it disappears from the layer control altogether.
What should happen:
The \ is moved to the second DOM position, and it should be the second sub-layer in the "National Geographic" layer in the layer control.