MCPcopy
hub / github.com/webpack/webpack / constructor

Method constructor

test/helpers/FakeDocument.js:25–38  ·  view source on GitHub ↗

* @param {string} basePath base path

(basePath)

Source from the content-addressed store, hash-verified

23 * @param {string} basePath base path
24 */
25 constructor(basePath) {
26 this.head = this.createElement("head");
27 this.body = this.createElement("body");
28 this.baseURI = "https://test.cases/path/index.html";
29 this.title = "";
30 /** @type {Map<string, FakeElement[]>} */
31 this._elementsByTagName = new Map([
32 ["head", [this.head]],
33 ["body", [this.body]]
34 ]);
35 this._basePath = basePath;
36 /** @type {undefined | ((src: string | undefined) => void)} */
37 this.onScript = undefined;
38 }
39
40 /**
41 * @param {string} type element type

Callers

nothing calls this directly

Calls 1

createElementMethod · 0.95

Tested by

no test coverage detected