MCPcopy
hub / github.com/rrweb-io/rrweb / addRecordingScript

Function addRecordingScript

packages/rrweb/test/benchmark/dom-mutation.test.ts:92–101  ·  view source on GitHub ↗
(page: Page)

Source from the content-addressed store, hash-verified

90 };
91
92 const addRecordingScript = async (page: Page) => {
93 // const scriptUrl = `${getServerURL(server)}/rrweb-1.1.3.js`;
94 const scriptUrl = `${getServerURL(server)}/rrweb.umd.cjs`;
95 await page.evaluate((url) => {
96 const scriptEl = document.createElement('script');
97 scriptEl.src = url;
98 document.head.append(scriptEl);
99 }, scriptUrl);
100 await page.waitForFunction('window.rrweb');
101 };
102
103 for (const suite of suites) {
104 it(suite.title, async () => {

Callers 1

loadPageFunction · 0.85

Calls 3

getServerURLFunction · 0.90
evaluateMethod · 0.80
createElementMethod · 0.65

Tested by

no test coverage detected