MCPcopy Create free account
hub / github.com/Snapchat/Valdi / addScriptTag

Method addScriptTag

valdi/vscode_debugger/src/test/test.ts:193–205  ·  view source on GitHub ↗
(relativePath: string)

Source from the content-addressed store, hash-verified

191 }
192
193 async addScriptTag(relativePath: string): Promise<void> {
194 await this._cdp!.Runtime.evaluate({
195 expression: `
196 new Promise(f => {
197 var script = document.createElement('script');
198 script.src = '${this._root.completeUrl(relativePath)}';
199 script.onload = () => f(undefined);
200 document.head.appendChild(script);
201 })
202 `,
203 awaitPromise: true,
204 });
205 }
206
207 waitForSource(filter?: string): Promise<Dap.LoadedSourceEventParams> {
208 return this.dap.once('loadedSource', event => {

Callers 3

evaluate.tsFile · 0.80
sourcesTest.tsFile · 0.80
stacksTest.tsFile · 0.80

Calls 2

evaluateMethod · 0.65
completeUrlMethod · 0.45

Tested by

no test coverage detected