Wire a rendered document in place: tab strips switch, and a YouTube embed
in a page opened from disk becomes a link to the video.
For a document the caller already holds and can reach into, a print window,
a node the host rendered itself. Anything that loads as a page of its own
takes documentBehaviourScript instead and runs it, which is what
both a saved file and the side-by-side preview do.
Worth knowing before reaching for this: a document whose scripting has been
disabled, a sandboxed frame without allow-scripts, invokes no listener
at all in WebKit, whichever realm attached it. Behaviour bound from outside
such a frame is inert there while looking perfectly well wired.
Wire a rendered document in place: tab strips switch, and a YouTube embed in a page opened from disk becomes a link to the video.
For a document the caller already holds and can reach into, a print window, a node the host rendered itself. Anything that loads as a page of its own takes documentBehaviourScript instead and runs it, which is what both a saved file and the side-by-side preview do.
Worth knowing before reaching for this: a document whose scripting has been disabled, a sandboxed frame without
allow-scripts, invokes no listener at all in WebKit, whichever realm attached it. Behaviour bound from outside such a frame is inert there while looking perfectly well wired.