MCPcopy Create free account
hub / github.com/thetarnav/solid-devtools / on_loaded

Function on_loaded

extension/src/content.ts:36–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34}
35
36function on_loaded() {
37
38 /*
39 Load Real_World script
40 ↳ Debugger_Setup detected
41 ↳ Load Debugger
42 ↳ 'Debugger_Connected' message
43 */
44
45 let script = document.createElement('script')
46 script.src = chrome.runtime.getURL(real_world_path)
47 script.type = 'module'
48
49 script.addEventListener('error', err => {
50 place_error(Place_Name.Content, `real-world script (${real_world_path}) failed to load.`, err)
51 })
52 script.addEventListener('load', () => {
53 DEV: {place_log(Place_Name.Content, `real-world script (${real_world_path}) loaded successfully.`)}
54 })
55
56 /* The script should execute as soon as possible */
57 let mount = (document.head as HTMLHeadElement | null) || document.documentElement
58 mount.appendChild(script)
59}
60
61
62let devtools_opened = false

Callers 1

content.tsFile · 0.85

Calls 2

place_errorFunction · 0.90
place_logFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…