mirror of
https://github.com/jaandrle/deka-dom-el
synced 2024-11-25 09:49:36 +01:00
12 lines
363 B
JavaScript
12 lines
363 B
JavaScript
|
let keys= [];
|
||
|
export function register(dom){
|
||
|
const window= dom.window;
|
||
|
if(!keys.length)
|
||
|
keys= Object.getOwnPropertyNames(window).filter((k) => !k.startsWith('_') && !(k in globalThis));
|
||
|
keys.forEach(key=> globalThis[key]= window[key]);
|
||
|
global.document= window.document
|
||
|
global.window= window
|
||
|
window.console= global.console
|
||
|
return import("../index.js");
|
||
|
}
|