@openreplay/tracker 9.0.11 → 10.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.nvmrc +1 -0
- package/CHANGELOG.md +7 -0
- package/README.md +4 -0
- package/bun.lockb +0 -0
- package/cjs/app/index.js +15 -12
- package/cjs/app/logger.d.ts +1 -1
- package/cjs/app/messages.gen.d.ts +2 -1
- package/cjs/app/messages.gen.js +20 -5
- package/cjs/app/nodes.js +4 -3
- package/cjs/app/observer/observer.js +2 -1
- package/cjs/common/messages.gen.d.ts +17 -4
- package/cjs/index.js +1 -1
- package/cjs/modules/Network/beaconProxy.d.ts +16 -0
- package/cjs/modules/Network/beaconProxy.js +82 -0
- package/cjs/modules/Network/fetchProxy.d.ts +0 -1
- package/cjs/modules/Network/fetchProxy.js +0 -1
- package/cjs/modules/Network/index.js +5 -0
- package/cjs/modules/Network/networkMessage.d.ts +1 -1
- package/cjs/modules/Network/networkMessage.js +1 -1
- package/cjs/modules/Network/xhrProxy.d.ts +0 -9
- package/cjs/modules/Network/xhrProxy.js +0 -1
- package/cjs/modules/axiosSpy.js +1 -1
- package/cjs/modules/constructedStyleSheets.js +25 -21
- package/cjs/modules/featureFlags.js +0 -1
- package/cjs/modules/img.js +2 -2
- package/cjs/modules/network.js +3 -2
- package/cjs/modules/timing.js +5 -0
- package/cjs/utils.d.ts +16 -0
- package/cjs/utils.js +53 -1
- package/coverage/clover.xml +533 -772
- package/coverage/coverage-final.json +8 -12
- package/coverage/lcov-report/index.html +27 -42
- package/coverage/lcov-report/main/app/guards.ts.html +1 -1
- package/coverage/lcov-report/main/app/index.html +14 -14
- package/coverage/lcov-report/main/app/index.ts.html +196 -28
- package/coverage/lcov-report/main/app/logger.ts.html +1 -1
- package/coverage/lcov-report/main/app/messages.gen.ts.html +1 -1
- package/coverage/lcov-report/main/app/nodes.ts.html +13 -7
- package/coverage/lcov-report/main/app/observer/iframe_observer.ts.html +1 -1
- package/coverage/lcov-report/main/app/observer/iframe_offsets.ts.html +1 -1
- package/coverage/lcov-report/main/app/observer/index.html +1 -1
- package/coverage/lcov-report/main/app/observer/shadow_root_observer.ts.html +1 -1
- package/coverage/lcov-report/main/app/observer/top_observer.ts.html +1 -1
- package/coverage/lcov-report/main/app/sanitizer.ts.html +1 -1
- package/coverage/lcov-report/main/app/session.ts.html +20 -8
- package/coverage/lcov-report/main/app/ticker.ts.html +1 -1
- package/coverage/lcov-report/main/index.html +23 -23
- package/coverage/lcov-report/main/index.ts.html +26 -26
- package/coverage/lcov-report/main/modules/Network/beaconProxy.ts.html +1 -1
- package/coverage/lcov-report/main/modules/Network/fetchProxy.ts.html +1 -1
- package/coverage/lcov-report/main/modules/Network/index.html +1 -1
- package/coverage/lcov-report/main/modules/Network/index.ts.html +1 -1
- package/coverage/lcov-report/main/modules/Network/networkMessage.ts.html +1 -1
- package/coverage/lcov-report/main/modules/Network/utils.ts.html +1 -1
- package/coverage/lcov-report/main/modules/Network/xhrProxy.ts.html +1 -1
- package/coverage/lcov-report/main/modules/attributeSender.ts.html +1 -1
- package/coverage/lcov-report/main/modules/axiosSpy.ts.html +1 -1
- package/coverage/lcov-report/main/modules/connection.ts.html +1 -1
- package/coverage/lcov-report/main/modules/console.ts.html +1 -1
- package/coverage/lcov-report/main/modules/constructedStyleSheets.ts.html +42 -30
- package/coverage/lcov-report/main/modules/cssrules.ts.html +1 -1
- package/coverage/lcov-report/main/modules/exception.ts.html +1 -1
- package/coverage/lcov-report/main/modules/featureFlags.ts.html +1 -1
- package/coverage/lcov-report/main/modules/focus.ts.html +1 -1
- package/coverage/lcov-report/main/modules/fonts.ts.html +1 -1
- package/coverage/lcov-report/main/modules/img.ts.html +23 -20
- package/coverage/lcov-report/main/modules/index.html +12 -12
- package/coverage/lcov-report/main/modules/input.ts.html +1 -1
- package/coverage/lcov-report/main/modules/mouse.ts.html +1 -1
- package/coverage/lcov-report/main/modules/network.ts.html +1 -1
- package/coverage/lcov-report/main/modules/performance.ts.html +1 -1
- package/coverage/lcov-report/main/modules/scroll.ts.html +1 -1
- package/coverage/lcov-report/main/modules/selection.ts.html +1 -1
- package/coverage/lcov-report/main/modules/tabs.ts.html +1 -1
- package/coverage/lcov-report/main/modules/timing.ts.html +30 -6
- package/coverage/lcov-report/main/modules/viewport.ts.html +1 -1
- package/coverage/lcov-report/main/utils.ts.html +269 -44
- package/coverage/lcov-report/webworker/BatchWriter.ts.html +1 -1
- package/coverage/lcov-report/webworker/MessageEncoder.gen.ts.html +1 -1
- package/coverage/lcov-report/webworker/PrimitiveEncoder.ts.html +1 -1
- package/coverage/lcov-report/webworker/QueueSender.ts.html +1 -1
- package/coverage/lcov-report/webworker/index.html +1 -1
- package/coverage/lcov-report/webworker/index.ts.html +1 -1
- package/coverage/lcov.info +920 -1285
- package/lib/app/index.js +16 -13
- package/lib/app/logger.d.ts +1 -1
- package/lib/app/messages.gen.d.ts +2 -1
- package/lib/app/messages.gen.js +16 -2
- package/lib/app/nodes.js +4 -3
- package/lib/app/observer/observer.js +2 -1
- package/lib/common/messages.gen.d.ts +17 -4
- package/lib/common/tsconfig.tsbuildinfo +1 -1
- package/lib/index.js +1 -1
- package/lib/modules/Network/beaconProxy.d.ts +16 -0
- package/lib/modules/Network/beaconProxy.js +77 -0
- package/lib/modules/Network/fetchProxy.d.ts +0 -1
- package/lib/modules/Network/fetchProxy.js +0 -1
- package/lib/modules/Network/index.js +5 -0
- package/lib/modules/Network/networkMessage.d.ts +1 -1
- package/lib/modules/Network/networkMessage.js +1 -1
- package/lib/modules/Network/xhrProxy.d.ts +0 -9
- package/lib/modules/Network/xhrProxy.js +0 -1
- package/lib/modules/axiosSpy.js +1 -1
- package/lib/modules/constructedStyleSheets.js +25 -21
- package/lib/modules/featureFlags.js +0 -1
- package/lib/modules/img.js +3 -3
- package/lib/modules/network.js +3 -2
- package/lib/modules/timing.js +5 -0
- package/lib/utils.d.ts +16 -0
- package/lib/utils.js +47 -0
- package/package.json +13 -13
- package/rollup.config.js +4 -4
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
26
|
<span class="strong">0% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>0/
|
|
28
|
+
<span class='fraction'>0/80</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
33
|
<span class="strong">0% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>0/
|
|
35
|
+
<span class='fraction'>0/19</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
47
|
<span class="strong">0% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>0/
|
|
49
|
+
<span class='fraction'>0/79</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -221,15 +221,17 @@
|
|
|
221
221
|
<a name='L156'></a><a href='#L156'>156</a>
|
|
222
222
|
<a name='L157'></a><a href='#L157'>157</a>
|
|
223
223
|
<a name='L158'></a><a href='#L158'>158</a>
|
|
224
|
-
<a name='L159'></a><a href='#L159'>159</a
|
|
224
|
+
<a name='L159'></a><a href='#L159'>159</a>
|
|
225
|
+
<a name='L160'></a><a href='#L160'>160</a>
|
|
226
|
+
<a name='L161'></a><a href='#L161'>161</a>
|
|
227
|
+
<a name='L162'></a><a href='#L162'>162</a>
|
|
228
|
+
<a name='L163'></a><a href='#L163'>163</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
225
229
|
<span class="cline-any cline-no"> </span>
|
|
226
230
|
<span class="cline-any cline-neutral"> </span>
|
|
227
231
|
<span class="cline-any cline-neutral"> </span>
|
|
228
232
|
<span class="cline-any cline-neutral"> </span>
|
|
229
233
|
<span class="cline-any cline-neutral"> </span>
|
|
230
234
|
<span class="cline-any cline-neutral"> </span>
|
|
231
|
-
<span class="cline-any cline-neutral"> </span>
|
|
232
|
-
<span class="cline-any cline-neutral"> </span>
|
|
233
235
|
<span class="cline-any cline-no"> </span>
|
|
234
236
|
<span class="cline-any cline-neutral"> </span>
|
|
235
237
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -244,9 +246,11 @@
|
|
|
244
246
|
<span class="cline-any cline-neutral"> </span>
|
|
245
247
|
<span class="cline-any cline-neutral"> </span>
|
|
246
248
|
<span class="cline-any cline-no"> </span>
|
|
249
|
+
<span class="cline-any cline-neutral"> </span>
|
|
247
250
|
<span class="cline-any cline-no"> </span>
|
|
248
251
|
<span class="cline-any cline-no"> </span>
|
|
249
252
|
<span class="cline-any cline-neutral"> </span>
|
|
253
|
+
<span class="cline-any cline-neutral"> </span>
|
|
250
254
|
<span class="cline-any cline-no"> </span>
|
|
251
255
|
<span class="cline-any cline-neutral"> </span>
|
|
252
256
|
<span class="cline-any cline-no"> </span>
|
|
@@ -281,6 +285,7 @@
|
|
|
281
285
|
<span class="cline-any cline-no"> </span>
|
|
282
286
|
<span class="cline-any cline-no"> </span>
|
|
283
287
|
<span class="cline-any cline-no"> </span>
|
|
288
|
+
<span class="cline-any cline-no"> </span>
|
|
284
289
|
<span class="cline-any cline-neutral"> </span>
|
|
285
290
|
<span class="cline-any cline-no"> </span>
|
|
286
291
|
<span class="cline-any cline-no"> </span>
|
|
@@ -293,9 +298,12 @@
|
|
|
293
298
|
<span class="cline-any cline-neutral"> </span>
|
|
294
299
|
<span class="cline-any cline-no"> </span>
|
|
295
300
|
<span class="cline-any cline-neutral"> </span>
|
|
301
|
+
<span class="cline-any cline-neutral"> </span>
|
|
296
302
|
<span class="cline-any cline-no"> </span>
|
|
297
303
|
<span class="cline-any cline-no"> </span>
|
|
298
304
|
<span class="cline-any cline-no"> </span>
|
|
305
|
+
<span class="cline-any cline-no"> </span>
|
|
306
|
+
<span class="cline-any cline-neutral"> </span>
|
|
299
307
|
<span class="cline-any cline-neutral"> </span>
|
|
300
308
|
<span class="cline-any cline-neutral"> </span>
|
|
301
309
|
<span class="cline-any cline-no"> </span>
|
|
@@ -381,10 +389,8 @@
|
|
|
381
389
|
<span class="cline-any cline-neutral"> </span>
|
|
382
390
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import type App from '../app/index.js'
|
|
383
391
|
<span class="cstat-no" title="statement not covered" >import {</span>
|
|
384
|
-
TechnicalInfo,
|
|
385
392
|
AdoptedSSReplaceURLBased,
|
|
386
393
|
AdoptedSSInsertRuleURLBased,
|
|
387
|
-
AdoptedSSDeleteRule,
|
|
388
394
|
AdoptedSSAddOwner,
|
|
389
395
|
AdoptedSSRemoveOwner,
|
|
390
396
|
} from '../app/messages.gen.js'
|
|
@@ -400,11 +406,13 @@ function <span class="fstat-no" title="function not covered" >hasAdoptedSS(</spa
|
|
|
400
406
|
)
|
|
401
407
|
}
|
|
402
408
|
|
|
403
|
-
// TODO:
|
|
409
|
+
// TODO: encapsulate to be init-ed on-start and join with cssrules.ts under one folder
|
|
404
410
|
let _id = <span class="cstat-no" title="statement not covered" >0xf</span>
|
|
411
|
+
|
|
405
412
|
<span class="cstat-no" title="statement not covered" >export function <span class="fstat-no" title="function not covered" >n</span>extID(</span>): number {
|
|
406
413
|
<span class="cstat-no" title="statement not covered" > return _id++</span>
|
|
407
414
|
}
|
|
415
|
+
|
|
408
416
|
export const <span class="cstat-no" title="statement not covered" >styleSheetIDMap: Map<CSSStyleSheet, number> = new Map()</span>
|
|
409
417
|
|
|
410
418
|
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >export default function (a</span></span>pp: App | null) {
|
|
@@ -433,35 +441,39 @@ export const <span class="cstat-no" title="statement not covered" >styleSheetIDM
|
|
|
433
441
|
}
|
|
434
442
|
const nowOwning: number[] = <span class="cstat-no" title="statement not covered" >[]</span>
|
|
435
443
|
const styleSheets = <span class="cstat-no" title="statement not covered" >root.adoptedStyleSheets</span>
|
|
436
|
-
<span class="cstat-no" title="statement not covered" >
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
<span class="cstat-no" title="statement not covered"
|
|
440
|
-
<span class="cstat-no" title="statement not covered" >
|
|
441
|
-
<span class="cstat-no" title="statement not covered" >
|
|
442
|
-
|
|
443
|
-
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (!pastOwning.includes(sheetID)) {</span>
|
|
444
|
-
<span class="cstat-no" title="statement not covered" > app.send(AdoptedSSAddOwner(sheetID, nodeID))</span>
|
|
445
|
-
}
|
|
446
|
-
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (init) {</span>
|
|
447
|
-
const rules = <span class="cstat-no" title="statement not covered" >s.cssRules</span>
|
|
448
|
-
<span class="cstat-no" title="statement not covered" > for (let i = <span class="cstat-no" title="statement not covered" >0;</span> i < rules.length; i++) {</span>
|
|
449
|
-
<span class="cstat-no" title="statement not covered" > app.send(AdoptedSSInsertRuleURLBased(sheetID, rules[i].cssText, i, app.getBaseHref()))</span>
|
|
444
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (Symbol.iterator in styleSheets) {</span>
|
|
445
|
+
<span class="cstat-no" title="statement not covered" > for (const s of styleSheets) {</span>
|
|
446
|
+
let sheetID = <span class="cstat-no" title="statement not covered" >styleSheetIDMap.get(s)</span>
|
|
447
|
+
const init = <span class="cstat-no" title="statement not covered" >!sheetID</span>
|
|
448
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (!sheetID) {</span>
|
|
449
|
+
<span class="cstat-no" title="statement not covered" > sheetID = nextID()</span>
|
|
450
|
+
<span class="cstat-no" title="statement not covered" > styleSheetIDMap.set(s, sheetID)</span>
|
|
450
451
|
}
|
|
452
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (!pastOwning.includes(sheetID)) {</span>
|
|
453
|
+
<span class="cstat-no" title="statement not covered" > app.send(AdoptedSSAddOwner(sheetID, nodeID))</span>
|
|
454
|
+
}
|
|
455
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (init) {</span>
|
|
456
|
+
const rules = <span class="cstat-no" title="statement not covered" >s.cssRules</span>
|
|
457
|
+
<span class="cstat-no" title="statement not covered" > for (let i = <span class="cstat-no" title="statement not covered" >0;</span> i < rules.length; i++) {</span>
|
|
458
|
+
<span class="cstat-no" title="statement not covered" > app.send(AdoptedSSInsertRuleURLBased(sheetID, rules[i].cssText, i, app.getBaseHref()))</span>
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
<span class="cstat-no" title="statement not covered" > nowOwning.push(sheetID)</span>
|
|
451
462
|
}
|
|
452
|
-
<span class="cstat-no" title="statement not covered" > nowOwning.push(sheetID)</span>
|
|
453
463
|
}
|
|
454
|
-
<span class="cstat-no" title="statement not covered" >
|
|
455
|
-
<span class="cstat-no" title="statement not covered" >
|
|
456
|
-
<span class="cstat-no" title="statement not covered" >
|
|
464
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (Symbol.iterator in pastOwning) {</span>
|
|
465
|
+
<span class="cstat-no" title="statement not covered" > for (const sheetID of pastOwning) {</span>
|
|
466
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (!nowOwning.includes(sheetID)) {</span>
|
|
467
|
+
<span class="cstat-no" title="statement not covered" > app.send(AdoptedSSRemoveOwner(sheetID, nodeID))</span>
|
|
468
|
+
}
|
|
457
469
|
}
|
|
458
470
|
}
|
|
459
471
|
<span class="cstat-no" title="statement not covered" > adoptedStyleSheetsOwnings.set(nodeID, nowOwning)</span>
|
|
460
|
-
}, 20) //
|
|
472
|
+
}, 20) // Mysterious bug:
|
|
461
473
|
/* On the page https://explore.fast.design/components/fast-accordion
|
|
462
474
|
the only rule inside the only adoptedStyleSheet of the iframe-s document
|
|
463
475
|
gets changed during first milliseconds after the load.
|
|
464
|
-
|
|
476
|
+
However, none of the documented methods (replace, insertRule) is triggered.
|
|
465
477
|
The rule is not substituted (remains the same object), however the text gets changed.
|
|
466
478
|
*/
|
|
467
479
|
|
|
@@ -544,7 +556,7 @@ export const <span class="cstat-no" title="statement not covered" >styleSheetIDM
|
|
|
544
556
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
545
557
|
Code coverage generated by
|
|
546
558
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
547
|
-
at 2023-10-
|
|
559
|
+
at 2023-10-24T10:53:06.602Z
|
|
548
560
|
</div>
|
|
549
561
|
<script src="../../prettify.js"></script>
|
|
550
562
|
<script>
|
|
@@ -403,7 +403,7 @@
|
|
|
403
403
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
404
404
|
Code coverage generated by
|
|
405
405
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
406
|
-
at 2023-10-
|
|
406
|
+
at 2023-10-24T10:53:06.602Z
|
|
407
407
|
</div>
|
|
408
408
|
<script src="../../prettify.js"></script>
|
|
409
409
|
<script>
|
|
@@ -370,7 +370,7 @@ function <span class="fstat-no" title="function not covered" >getDefaultStack(</
|
|
|
370
370
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
371
371
|
Code coverage generated by
|
|
372
372
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
373
|
-
at 2023-10-
|
|
373
|
+
at 2023-10-24T10:53:06.602Z
|
|
374
374
|
</div>
|
|
375
375
|
<script src="../../prettify.js"></script>
|
|
376
376
|
<script>
|
|
@@ -397,7 +397,7 @@ export interface FetchPersistFlagsData {
|
|
|
397
397
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
398
398
|
Code coverage generated by
|
|
399
399
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
400
|
-
at 2023-10-
|
|
400
|
+
at 2023-10-24T10:53:06.602Z
|
|
401
401
|
</div>
|
|
402
402
|
<script src="../../prettify.js"></script>
|
|
403
403
|
<script>
|
|
@@ -205,7 +205,7 @@
|
|
|
205
205
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
206
206
|
Code coverage generated by
|
|
207
207
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
208
|
-
at 2023-10-
|
|
208
|
+
at 2023-10-24T10:53:06.602Z
|
|
209
209
|
</div>
|
|
210
210
|
<script src="../../prettify.js"></script>
|
|
211
211
|
<script>
|
|
@@ -274,7 +274,7 @@ type FFData = [string, string, string]
|
|
|
274
274
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
275
275
|
Code coverage generated by
|
|
276
276
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
277
|
-
at 2023-10-
|
|
277
|
+
at 2023-10-24T10:53:06.602Z
|
|
278
278
|
</div>
|
|
279
279
|
<script src="../../prettify.js"></script>
|
|
280
280
|
<script>
|
|
@@ -179,7 +179,8 @@
|
|
|
179
179
|
<a name='L114'></a><a href='#L114'>114</a>
|
|
180
180
|
<a name='L115'></a><a href='#L115'>115</a>
|
|
181
181
|
<a name='L116'></a><a href='#L116'>116</a>
|
|
182
|
-
<a name='L117'></a><a href='#L117'>117</a
|
|
182
|
+
<a name='L117'></a><a href='#L117'>117</a>
|
|
183
|
+
<a name='L118'></a><a href='#L118'>118</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
183
184
|
<span class="cline-any cline-no"> </span>
|
|
184
185
|
<span class="cline-any cline-no"> </span>
|
|
185
186
|
<span class="cline-any cline-no"> </span>
|
|
@@ -262,8 +263,8 @@
|
|
|
262
263
|
<span class="cline-any cline-no"> </span>
|
|
263
264
|
<span class="cline-any cline-neutral"> </span>
|
|
264
265
|
<span class="cline-any cline-neutral"> </span>
|
|
265
|
-
<span class="cline-any cline-neutral"> </span>
|
|
266
266
|
<span class="cline-any cline-no"> </span>
|
|
267
|
+
<span class="cline-any cline-neutral"> </span>
|
|
267
268
|
<span class="cline-any cline-no"> </span>
|
|
268
269
|
<span class="cline-any cline-no"> </span>
|
|
269
270
|
<span class="cline-any cline-no"> </span>
|
|
@@ -281,6 +282,7 @@
|
|
|
281
282
|
<span class="cline-any cline-neutral"> </span>
|
|
282
283
|
<span class="cline-any cline-neutral"> </span>
|
|
283
284
|
<span class="cline-any cline-neutral"> </span>
|
|
285
|
+
<span class="cline-any cline-neutral"> </span>
|
|
284
286
|
<span class="cline-any cline-no"> </span>
|
|
285
287
|
<span class="cline-any cline-no"> </span>
|
|
286
288
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -296,7 +298,7 @@
|
|
|
296
298
|
<span class="cline-any cline-neutral"> </span>
|
|
297
299
|
<span class="cline-any cline-neutral"> </span>
|
|
298
300
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import type App from '../app/index.js'
|
|
299
|
-
<span class="cstat-no" title="statement not covered" >import { isURL, IS_FIREFOX, MAX_STR_LEN } from '../utils.js'</span>
|
|
301
|
+
<span class="cstat-no" title="statement not covered" >import { isURL, IS_FIREFOX, MAX_STR_LEN, createMutationObserver } from '../utils.js'</span>
|
|
300
302
|
<span class="cstat-no" title="statement not covered" >import { ResourceTiming, SetNodeAttributeURLBased } from '../app/messages.gen.js'</span>
|
|
301
303
|
<span class="cstat-no" title="statement not covered" >import { hasTag } from '../app/guards.js'</span>
|
|
302
304
|
|
|
@@ -378,24 +380,25 @@ const PLACEHOLDER_SRC = <span class="cstat-no" title="statement not covered" >'h
|
|
|
378
380
|
<span class="cstat-no" title="statement not covered" > sendSrcset(id, img)</span>
|
|
379
381
|
}
|
|
380
382
|
})
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
<span class="cstat-no" title="statement not covered" >
|
|
384
|
-
<span class="cstat-no" title="statement not covered" >
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
<span class="cstat-no" title="statement not covered" >
|
|
388
|
-
<span class="cstat-no" title="statement not covered" >
|
|
389
|
-
|
|
390
|
-
<span class="cstat-no" title="statement not covered" >
|
|
391
|
-
<span class="cstat-no" title="statement not covered" >
|
|
392
|
-
|
|
393
|
-
<span class="cstat-no" title="statement not covered" >
|
|
394
|
-
<span class="cstat-no" title="statement not covered" >
|
|
383
|
+
const observer = <span class="cstat-no" title="statement not covered" >createMutationObserver(</span>
|
|
384
|
+
app.safe(<span class="fstat-no" title="function not covered" >(m</span>utations) => {
|
|
385
|
+
<span class="cstat-no" title="statement not covered" > for (const mutation of mutations) {</span>
|
|
386
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (mutation.type === 'attributes') {</span>
|
|
387
|
+
const target = <span class="cstat-no" title="statement not covered" >mutation.target as HTMLImageElement</span>
|
|
388
|
+
const id = <span class="cstat-no" title="statement not covered" >app.nodes.getID(target)</span>
|
|
389
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (id === undefined) {</span>
|
|
390
|
+
<span class="cstat-no" title="statement not covered" > return</span>
|
|
391
|
+
}
|
|
392
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (mutation.attributeName === 'src') {</span>
|
|
393
|
+
<span class="cstat-no" title="statement not covered" > sendSrc(id, target)</span>
|
|
394
|
+
}
|
|
395
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (mutation.attributeName === 'srcset') {</span>
|
|
396
|
+
<span class="cstat-no" title="statement not covered" > sendSrcset(id, target)</span>
|
|
397
|
+
}
|
|
395
398
|
}
|
|
396
399
|
}
|
|
397
|
-
}
|
|
398
|
-
|
|
400
|
+
}) as MutationCallback,
|
|
401
|
+
)
|
|
399
402
|
|
|
400
403
|
<span class="cstat-no" title="statement not covered" > app.attachStopCallback(<span class="fstat-no" title="function not covered" >() =</span>> {</span>
|
|
401
404
|
<span class="cstat-no" title="statement not covered" > observer.disconnect()</span>
|
|
@@ -418,7 +421,7 @@ const PLACEHOLDER_SRC = <span class="cstat-no" title="statement not covered" >'h
|
|
|
418
421
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
419
422
|
Code coverage generated by
|
|
420
423
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
421
|
-
at 2023-10-
|
|
424
|
+
at 2023-10-24T10:53:06.602Z
|
|
422
425
|
</div>
|
|
423
426
|
<script src="../../prettify.js"></script>
|
|
424
427
|
<script>
|
|
@@ -25,28 +25,28 @@
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
26
|
<span class="strong">0% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>0/
|
|
28
|
+
<span class='fraction'>0/1148</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
33
|
<span class="strong">0% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>0/
|
|
35
|
+
<span class='fraction'>0/587</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
40
|
<span class="strong">0% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>0/
|
|
42
|
+
<span class='fraction'>0/216</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
47
|
<span class="strong">0% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>0/
|
|
49
|
+
<span class='fraction'>0/1108</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -144,13 +144,13 @@
|
|
|
144
144
|
<div class="chart"><div class="cover-fill" style="width: 0%"></div><div class="cover-empty" style="width: 100%"></div></div>
|
|
145
145
|
</td>
|
|
146
146
|
<td data-value="0" class="pct low">0%</td>
|
|
147
|
-
<td data-value="
|
|
147
|
+
<td data-value="80" class="abs low">0/80</td>
|
|
148
148
|
<td data-value="0" class="pct low">0%</td>
|
|
149
|
-
<td data-value="
|
|
149
|
+
<td data-value="19" class="abs low">0/19</td>
|
|
150
150
|
<td data-value="0" class="pct low">0%</td>
|
|
151
151
|
<td data-value="14" class="abs low">0/14</td>
|
|
152
152
|
<td data-value="0" class="pct low">0%</td>
|
|
153
|
-
<td data-value="
|
|
153
|
+
<td data-value="79" class="abs low">0/79</td>
|
|
154
154
|
</tr>
|
|
155
155
|
|
|
156
156
|
<tr>
|
|
@@ -354,13 +354,13 @@
|
|
|
354
354
|
<div class="chart"><div class="cover-fill" style="width: 0%"></div><div class="cover-empty" style="width: 100%"></div></div>
|
|
355
355
|
</td>
|
|
356
356
|
<td data-value="0" class="pct low">0%</td>
|
|
357
|
-
<td data-value="
|
|
357
|
+
<td data-value="113" class="abs low">0/113</td>
|
|
358
358
|
<td data-value="0" class="pct low">0%</td>
|
|
359
|
-
<td data-value="
|
|
359
|
+
<td data-value="110" class="abs low">0/110</td>
|
|
360
360
|
<td data-value="0" class="pct low">0%</td>
|
|
361
|
-
<td data-value="
|
|
361
|
+
<td data-value="12" class="abs low">0/12</td>
|
|
362
362
|
<td data-value="0" class="pct low">0%</td>
|
|
363
|
-
<td data-value="
|
|
363
|
+
<td data-value="106" class="abs low">0/106</td>
|
|
364
364
|
</tr>
|
|
365
365
|
|
|
366
366
|
<tr>
|
|
@@ -386,7 +386,7 @@
|
|
|
386
386
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
387
387
|
Code coverage generated by
|
|
388
388
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
389
|
-
at 2023-10-
|
|
389
|
+
at 2023-10-24T10:53:06.602Z
|
|
390
390
|
</div>
|
|
391
391
|
<script src="../../prettify.js"></script>
|
|
392
392
|
<script>
|
|
@@ -811,7 +811,7 @@ export interface Options {
|
|
|
811
811
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
812
812
|
Code coverage generated by
|
|
813
813
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
814
|
-
at 2023-10-
|
|
814
|
+
at 2023-10-24T10:53:06.602Z
|
|
815
815
|
</div>
|
|
816
816
|
<script src="../../prettify.js"></script>
|
|
817
817
|
<script>
|
|
@@ -811,7 +811,7 @@ export interface MouseHandlerOptions {
|
|
|
811
811
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
812
812
|
Code coverage generated by
|
|
813
813
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
814
|
-
at 2023-10-
|
|
814
|
+
at 2023-10-24T10:53:06.602Z
|
|
815
815
|
</div>
|
|
816
816
|
<script src="../../prettify.js"></script>
|
|
817
817
|
<script>
|
|
@@ -1108,7 +1108,7 @@ export interface Options {
|
|
|
1108
1108
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1109
1109
|
Code coverage generated by
|
|
1110
1110
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1111
|
-
at 2023-10-
|
|
1111
|
+
at 2023-10-24T10:53:06.602Z
|
|
1112
1112
|
</div>
|
|
1113
1113
|
<script src="../../prettify.js"></script>
|
|
1114
1114
|
<script>
|
|
@@ -352,7 +352,7 @@ export interface Options {
|
|
|
352
352
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
353
353
|
Code coverage generated by
|
|
354
354
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
355
|
-
at 2023-10-
|
|
355
|
+
at 2023-10-24T10:53:06.602Z
|
|
356
356
|
</div>
|
|
357
357
|
<script src="../../prettify.js"></script>
|
|
358
358
|
<script>
|
|
@@ -349,7 +349,7 @@ function <span class="fstat-no" title="function not covered" >getDocumentScroll(
|
|
|
349
349
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
350
350
|
Code coverage generated by
|
|
351
351
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
352
|
-
at 2023-10-
|
|
352
|
+
at 2023-10-24T10:53:06.602Z
|
|
353
353
|
</div>
|
|
354
354
|
<script src="../../prettify.js"></script>
|
|
355
355
|
<script>
|
|
@@ -187,7 +187,7 @@ function <span class="fstat-no" title="function not covered" >selection(</span>a
|
|
|
187
187
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
188
188
|
Code coverage generated by
|
|
189
189
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
190
|
-
at 2023-10-
|
|
190
|
+
at 2023-10-24T10:53:06.602Z
|
|
191
191
|
</div>
|
|
192
192
|
<script src="../../prettify.js"></script>
|
|
193
193
|
<script>
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
110
110
|
Code coverage generated by
|
|
111
111
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
112
|
-
at 2023-10-
|
|
112
|
+
at 2023-10-24T10:53:06.602Z
|
|
113
113
|
</div>
|
|
114
114
|
<script src="../../prettify.js"></script>
|
|
115
115
|
<script>
|
|
@@ -25,28 +25,28 @@
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
26
|
<span class="strong">0% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>0/
|
|
28
|
+
<span class='fraction'>0/113</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
33
|
<span class="strong">0% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>0/
|
|
35
|
+
<span class='fraction'>0/110</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
40
|
<span class="strong">0% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>0/
|
|
42
|
+
<span class='fraction'>0/12</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
47
|
<span class="strong">0% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>0/
|
|
49
|
+
<span class='fraction'>0/106</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -315,7 +315,15 @@
|
|
|
315
315
|
<a name='L250'></a><a href='#L250'>250</a>
|
|
316
316
|
<a name='L251'></a><a href='#L251'>251</a>
|
|
317
317
|
<a name='L252'></a><a href='#L252'>252</a>
|
|
318
|
-
<a name='L253'></a><a href='#L253'>253</a
|
|
318
|
+
<a name='L253'></a><a href='#L253'>253</a>
|
|
319
|
+
<a name='L254'></a><a href='#L254'>254</a>
|
|
320
|
+
<a name='L255'></a><a href='#L255'>255</a>
|
|
321
|
+
<a name='L256'></a><a href='#L256'>256</a>
|
|
322
|
+
<a name='L257'></a><a href='#L257'>257</a>
|
|
323
|
+
<a name='L258'></a><a href='#L258'>258</a>
|
|
324
|
+
<a name='L259'></a><a href='#L259'>259</a>
|
|
325
|
+
<a name='L260'></a><a href='#L260'>260</a>
|
|
326
|
+
<a name='L261'></a><a href='#L261'>261</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
319
327
|
<span class="cline-any cline-no"> </span>
|
|
320
328
|
<span class="cline-any cline-no"> </span>
|
|
321
329
|
<span class="cline-any cline-no"> </span>
|
|
@@ -402,6 +410,7 @@
|
|
|
402
410
|
<span class="cline-any cline-neutral"> </span>
|
|
403
411
|
<span class="cline-any cline-neutral"> </span>
|
|
404
412
|
<span class="cline-any cline-neutral"> </span>
|
|
413
|
+
<span class="cline-any cline-neutral"> </span>
|
|
405
414
|
<span class="cline-any cline-no"> </span>
|
|
406
415
|
<span class="cline-any cline-no"> </span>
|
|
407
416
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -411,6 +420,7 @@
|
|
|
411
420
|
<span class="cline-any cline-neutral"> </span>
|
|
412
421
|
<span class="cline-any cline-neutral"> </span>
|
|
413
422
|
<span class="cline-any cline-neutral"> </span>
|
|
423
|
+
<span class="cline-any cline-neutral"> </span>
|
|
414
424
|
<span class="cline-any cline-no"> </span>
|
|
415
425
|
<span class="cline-any cline-no"> </span>
|
|
416
426
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -425,6 +435,12 @@
|
|
|
425
435
|
<span class="cline-any cline-no"> </span>
|
|
426
436
|
<span class="cline-any cline-no"> </span>
|
|
427
437
|
<span class="cline-any cline-neutral"> </span>
|
|
438
|
+
<span class="cline-any cline-neutral"> </span>
|
|
439
|
+
<span class="cline-any cline-no"> </span>
|
|
440
|
+
<span class="cline-any cline-no"> </span>
|
|
441
|
+
<span class="cline-any cline-no"> </span>
|
|
442
|
+
<span class="cline-any cline-neutral"> </span>
|
|
443
|
+
<span class="cline-any cline-neutral"> </span>
|
|
428
444
|
<span class="cline-any cline-no"> </span>
|
|
429
445
|
<span class="cline-any cline-neutral"> </span>
|
|
430
446
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -652,6 +668,7 @@ export interface Options {
|
|
|
652
668
|
captureResourceTimings: boolean
|
|
653
669
|
capturePageLoadTimings: boolean
|
|
654
670
|
capturePageRenderTimings: boolean
|
|
671
|
+
excludedResourceUrls?: Array<string>
|
|
655
672
|
}
|
|
656
673
|
|
|
657
674
|
<span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >export default function (a</span></span>pp: App, opts: Partial<Options>): void {
|
|
@@ -660,6 +677,7 @@ export interface Options {
|
|
|
660
677
|
captureResourceTimings: true,
|
|
661
678
|
capturePageLoadTimings: true,
|
|
662
679
|
capturePageRenderTimings: true,
|
|
680
|
+
excludedResourceUrls: [],
|
|
663
681
|
},
|
|
664
682
|
opts,
|
|
665
683
|
)
|
|
@@ -677,6 +695,12 @@ export interface Options {
|
|
|
677
695
|
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (resources !== null) {</span>
|
|
678
696
|
<span class="cstat-no" title="statement not covered" > resources[entry.name] = entry.startTime + entry.duration</span>
|
|
679
697
|
}
|
|
698
|
+
|
|
699
|
+
<span class="cstat-no" title="statement not covered" > options.excludedResourceUrls?.forEach(<span class="fstat-no" title="function not covered" >(u</span>rl) => {</span>
|
|
700
|
+
<span class="cstat-no" title="statement not covered" > <span class="missing-if-branch" title="if path not taken" >I</span>if (entry.name.startsWith(url)) {</span>
|
|
701
|
+
<span class="cstat-no" title="statement not covered" > return</span>
|
|
702
|
+
}
|
|
703
|
+
})
|
|
680
704
|
<span class="cstat-no" title="statement not covered" > app.send(</span>
|
|
681
705
|
ResourceTiming(
|
|
682
706
|
entry.startTime + getTimeOrigin(),
|
|
@@ -826,7 +850,7 @@ export interface Options {
|
|
|
826
850
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
827
851
|
Code coverage generated by
|
|
828
852
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
829
|
-
at 2023-10-
|
|
853
|
+
at 2023-10-24T10:53:06.602Z
|
|
830
854
|
</div>
|
|
831
855
|
<script src="../../prettify.js"></script>
|
|
832
856
|
<script>
|
|
@@ -235,7 +235,7 @@
|
|
|
235
235
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
236
236
|
Code coverage generated by
|
|
237
237
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
238
|
-
at 2023-10-
|
|
238
|
+
at 2023-10-24T10:53:06.602Z
|
|
239
239
|
</div>
|
|
240
240
|
<script src="../../prettify.js"></script>
|
|
241
241
|
<script>
|