I use the Sapper framework and I want to open my own dev tools window that should have full access to Javascript objects of the main window.
I'm trying to create a new window with a svelte component and with same Javascript context:
var win = window.open('abour:blank')
var container = win.document.createElement('div')
var win.document.body.appendChild(container)
var component = new ComponentClass({
target: container,
})
It works but without CSS styles.
You can use this REPL for tests.
How can I apply the component CSS styles for the new window?
Or what is the best practices to create such windows?