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}
const styles = document.querySelectorAll('style[id^=svelte-]');
let i = styles.length;
while (i--) styles[i].parentNode.removeChild(styles[i]);
if (window.unmount) {
try {
window.unmount();
} catch (err) {
console.error(err);
{
const styles = document.querySelectorAll('style[id^=svelte-]');
let i = styles.length;
while (i--) styles[i].parentNode.removeChild(styles[i]);
if (window.__unmount_previous) {
try {
window.__unmount_previous();
} catch (err) {
console.error(err);
}
}
}
document.body.innerHTML = '';
window._svelteTransitionManager = null;
const { mount, App } = ${$bundle.client?.code};
const [, destroy] = mount(App, { target: document.body });
document.body.innerHTML = '';
window._svelteTransitionManager = null;
}
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
`);
error = null;

Loading…
Cancel
Save