MCPcopy Create free account
hub / github.com/ecomfe/tempad-dev / MockHTMLScriptElement

Class MockHTMLScriptElement

packages/extension/tests/rewrite/runtime.test.ts:21–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19import { rewriteCurrentScript } from '@/rewrite/runtime'
20
21class MockHTMLScriptElement {
22 src: string
23 defer = false
24 replacedWithNode: MockHTMLScriptElement | null = null
25
26 constructor(src = '') {
27 this.src = src
28 }
29
30 replaceWith(node: MockHTMLScriptElement) {
31 this.replacedWithNode = node
32 }
33}
34
35class MockDocument {
36 declare currentScript: MockHTMLScriptElement | null

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected