@absolutejs/beacon 0.6.42 → 0.6.43

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/dist/index.js CHANGED
@@ -2646,8 +2646,6 @@ var createBeacon = (options) => {
2646
2646
  if (entry.duration < minimum || entry.interactionId === undefined || entry.interactionId <= 0)
2647
2647
  continue;
2648
2648
  const target = entry.target instanceof Element ? describeElement(entry.target) : "unknown";
2649
- if (target === "unknown")
2650
- continue;
2651
2649
  const key = entry.interactionId;
2652
2650
  if (reported.has(key))
2653
2651
  continue;
@@ -2663,11 +2661,15 @@ var createBeacon = (options) => {
2663
2661
  })[0];
2664
2662
  const script = [...overlappingFrame?.scripts ?? []].sort((left, right) => (right.duration ?? 0) - (left.duration ?? 0))[0];
2665
2663
  const hasPhaseTiming = typeof entry.processingStart === "number" && typeof entry.processingEnd === "number";
2664
+ const processingDurationMs = hasPhaseTiming ? Math.round(Math.max(0, entry.processingEnd - entry.processingStart)) : undefined;
2665
+ const presentationDelayMs = hasPhaseTiming ? Math.round(Math.max(0, interactionEnd - entry.processingEnd)) : undefined;
2666
+ if (target === "unknown" && overlappingFrame === undefined && processingDurationMs !== undefined && processingDurationMs <= 16 && presentationDelayMs !== undefined && presentationDelayMs >= minimum)
2667
+ continue;
2666
2668
  emitSignal(`Slow interaction — ${entry.name} took ${Math.round(entry.duration)}ms — ${shortUrl(location.href)}`, {
2667
2669
  ...hasPhaseTiming ? {
2668
2670
  inputDelayMs: String(Math.round(Math.max(0, entry.processingStart - entry.startTime))),
2669
- presentationDelayMs: String(Math.round(Math.max(0, interactionEnd - entry.processingEnd))),
2670
- processingDurationMs: String(Math.round(Math.max(0, entry.processingEnd - entry.processingStart)))
2671
+ presentationDelayMs: String(presentationDelayMs),
2672
+ processingDurationMs: String(processingDurationMs)
2671
2673
  } : { phaseAttribution: "unavailable" },
2672
2674
  ...overlappingFrame === undefined ? { blockingFrameAttribution: "not-observed" } : {
2673
2675
  blockingDurationMs: String(Math.round(overlappingFrame.blockingDuration ?? Math.max(0, overlappingFrame.duration - LONG_TASK_MS))),
@@ -4269,5 +4271,5 @@ export {
4269
4271
  BEACON_ATTRIBUTE
4270
4272
  };
4271
4273
 
4272
- //# debugId=0DD0AB878E9647A564756E2164756E21
4274
+ //# debugId=BA5DCA321E271C2D64756E2164756E21
4273
4275
  //# sourceMappingURL=index.js.map