Hi there!

Idea: You have a large heavy app that takes seconds to load, you want the user to be able to open a new window without having to reload a heap of logic or elements that are already loaded in the browser (think gmail compose email). Move DOM and logic into a new window by using adoptChild. See this from 2010

Event Output

Adopt will move the element and attached events to the new window. The JS will stop executing when the opener is closed.

Import will clone the element, but the JS won't move

This demo moves the elements and their state between windows. Note: when you close the opener the JS stops executing.


Testing an custom element

This is a Custom Element

Move's the custom element and their current state between windows. State should tranistion between windows however if the opener closes the function stops executing.


Testing an iframe

Moves an iframe (much like the little documented 'Magic Iframe') to another window. If the opener is closed execution of the iframe will still continue.


Testing a video

Move's the video to another window. Execution of the video stops.