chore(repl): hide globals (#10125)

pull/10127/head
gtmnayan 6 months ago committed by GitHub
parent 1ff9c0f2b9
commit b623890439
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -111,26 +111,30 @@
${styles} ${styles}
const styles = document.querySelectorAll('style[id^=svelte-]'); {
const styles = document.querySelectorAll('style[id^=svelte-]');
let i = styles.length;
while (i--) styles[i].parentNode.removeChild(styles[i]); let i = styles.length;
while (i--) styles[i].parentNode.removeChild(styles[i]);
if (window.unmount) {
try { if (window.__unmount_previous) {
window.unmount(); try {
} catch (err) { window.__unmount_previous();
console.error(err); } catch (err) {
console.error(err);
}
} }
}
document.body.innerHTML = ''; document.body.innerHTML = '';
window._svelteTransitionManager = null; window._svelteTransitionManager = null;
}
const { mount, App } = ${$bundle.client?.code};
const [, destroy] = mount(App, { target: document.body });
window.unmount = destroy; const __repl_exports = ${$bundle.client?.code};
{
const { mount, App } = __repl_exports;
const [, destroy] = mount(App, { target: document.body });
window.__unmount_previous = destroy;
}
//# sourceURL=playground:output //# sourceURL=playground:output
`); `);
error = null; error = null;

Loading…
Cancel
Save