mirror of
https://github.com/Sevichecc/Urara-Blog.git
synced 2025-05-05 10:59:31 +08:00
15 lines
507 B
Text
15 lines
507 B
Text
// eslint-disable-next-line node/no-missing-import
|
|
import Inspector from 'virtual:svelte-inspector-path:Inspector.svelte';
|
|
|
|
function create_inspector_host() {
|
|
const id = 'svelte-inspector-host';
|
|
if (document.getElementById(id) != null) {
|
|
throw new Error('svelte-inspector-host element already exists');
|
|
}
|
|
const el = document.createElement('div');
|
|
el.setAttribute('id', id);
|
|
document.getElementsByTagName('body')[0].appendChild(el);
|
|
return el;
|
|
}
|
|
|
|
new Inspector({ target: create_inspector_host() });
|