@appsurify-testmap/rrweb-record 2.0.0-alpha.31 → 2.0.0-alpha.35
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/rrweb-record.cjs +28 -17
- package/dist/rrweb-record.cjs.map +1 -1
- package/dist/rrweb-record.js +28 -17
- package/dist/rrweb-record.js.map +1 -1
- package/dist/rrweb-record.umd.cjs +28 -17
- package/dist/rrweb-record.umd.cjs.map +2 -2
- package/dist/rrweb-record.umd.min.cjs +24 -24
- package/dist/rrweb-record.umd.min.cjs.map +3 -3
- package/package.json +3 -3
package/dist/rrweb-record.cjs
CHANGED
|
@@ -654,7 +654,6 @@ EventTarget.prototype.addEventListener = function(type, listener, options) {
|
|
|
654
654
|
originalAddEventListener$1.call(this, type, listener, options);
|
|
655
655
|
if (this instanceof Element) {
|
|
656
656
|
const eventType = type.toLowerCase();
|
|
657
|
-
console.info("Event type: ", eventType);
|
|
658
657
|
if (interactiveEvents$1.includes(eventType)) {
|
|
659
658
|
interactiveElementsRegistry$1.add(this);
|
|
660
659
|
}
|
|
@@ -5224,7 +5223,6 @@ EventTarget.prototype.addEventListener = function(type, listener, options) {
|
|
|
5224
5223
|
originalAddEventListener.call(this, type, listener, options);
|
|
5225
5224
|
if (this instanceof Element) {
|
|
5226
5225
|
const eventType = type.toLowerCase();
|
|
5227
|
-
console.info("Event type: ", eventType);
|
|
5228
5226
|
if (interactiveEvents.includes(eventType)) {
|
|
5229
5227
|
interactiveElementsRegistry.add(this);
|
|
5230
5228
|
}
|
|
@@ -12068,6 +12066,7 @@ try {
|
|
|
12068
12066
|
}
|
|
12069
12067
|
const mirror = createMirror$2();
|
|
12070
12068
|
function record(options = {}) {
|
|
12069
|
+
var _a2;
|
|
12071
12070
|
const {
|
|
12072
12071
|
emit,
|
|
12073
12072
|
checkoutEveryNms,
|
|
@@ -12102,12 +12101,24 @@ function record(options = {}) {
|
|
|
12102
12101
|
ignoreCSSAttributes = /* @__PURE__ */ new Set([]),
|
|
12103
12102
|
errorHandler: errorHandler2
|
|
12104
12103
|
} = options;
|
|
12104
|
+
const win = options.customWindow || window;
|
|
12105
|
+
const doc = options.customDocument || document;
|
|
12106
|
+
try {
|
|
12107
|
+
if (Array.from([1], (x2) => x2 * 2)[0] !== 2) {
|
|
12108
|
+
const cleanFrame = doc.createElement("iframe");
|
|
12109
|
+
doc.body.appendChild(cleanFrame);
|
|
12110
|
+
Array.from = ((_a2 = cleanFrame.contentWindow) == null ? void 0 : _a2.Array.from) || Array.from;
|
|
12111
|
+
doc.body.removeChild(cleanFrame);
|
|
12112
|
+
}
|
|
12113
|
+
} catch (err) {
|
|
12114
|
+
console.debug("Unable to override Array.from", err);
|
|
12115
|
+
}
|
|
12105
12116
|
registerErrorHandler(errorHandler2);
|
|
12106
|
-
const inEmittingFrame = recordCrossOriginIframes ?
|
|
12117
|
+
const inEmittingFrame = recordCrossOriginIframes ? win.parent === win : true;
|
|
12107
12118
|
let passEmitsToParent = false;
|
|
12108
12119
|
if (!inEmittingFrame) {
|
|
12109
12120
|
try {
|
|
12110
|
-
if (
|
|
12121
|
+
if (win.parent.document) {
|
|
12111
12122
|
passEmitsToParent = false;
|
|
12112
12123
|
}
|
|
12113
12124
|
} catch (e2) {
|
|
@@ -12174,10 +12185,10 @@ function record(options = {}) {
|
|
|
12174
12185
|
return e2;
|
|
12175
12186
|
};
|
|
12176
12187
|
wrappedEmit = (r2, isCheckout) => {
|
|
12177
|
-
var
|
|
12188
|
+
var _a3;
|
|
12178
12189
|
const e2 = r2;
|
|
12179
12190
|
e2.timestamp = nowTimestamp();
|
|
12180
|
-
if (((
|
|
12191
|
+
if (((_a3 = mutationBuffers[0]) == null ? void 0 : _a3.isFrozen()) && e2.type !== EventType.FullSnapshot && !(e2.type === EventType.IncrementalSnapshot && e2.data.source === IncrementalSource.Mutation)) {
|
|
12181
12192
|
mutationBuffers.forEach((buf) => buf.unfreeze());
|
|
12182
12193
|
}
|
|
12183
12194
|
if (inEmittingFrame) {
|
|
@@ -12186,10 +12197,10 @@ function record(options = {}) {
|
|
|
12186
12197
|
const message = {
|
|
12187
12198
|
type: "rrweb",
|
|
12188
12199
|
event: eventProcessor(e2),
|
|
12189
|
-
origin:
|
|
12200
|
+
origin: win.location.origin,
|
|
12190
12201
|
isCheckout
|
|
12191
12202
|
};
|
|
12192
|
-
|
|
12203
|
+
win.parent.postMessage(message, "*");
|
|
12193
12204
|
}
|
|
12194
12205
|
if (e2.type === EventType.FullSnapshot) {
|
|
12195
12206
|
lastFullSnapshotEvent = e2;
|
|
@@ -12300,7 +12311,7 @@ function record(options = {}) {
|
|
|
12300
12311
|
{
|
|
12301
12312
|
type: EventType.Meta,
|
|
12302
12313
|
data: {
|
|
12303
|
-
href:
|
|
12314
|
+
href: win.location.href,
|
|
12304
12315
|
width: getWindowWidth(),
|
|
12305
12316
|
height: getWindowHeight()
|
|
12306
12317
|
}
|
|
@@ -12358,16 +12369,16 @@ function record(options = {}) {
|
|
|
12358
12369
|
isCheckout
|
|
12359
12370
|
);
|
|
12360
12371
|
mutationBuffers.forEach((buf) => buf.unlock());
|
|
12361
|
-
if (
|
|
12372
|
+
if (doc.adoptedStyleSheets && doc.adoptedStyleSheets.length > 0)
|
|
12362
12373
|
stylesheetManager.adoptStyleSheets(
|
|
12363
|
-
|
|
12364
|
-
mirror.getId(
|
|
12374
|
+
doc.adoptedStyleSheets,
|
|
12375
|
+
mirror.getId(doc)
|
|
12365
12376
|
);
|
|
12366
12377
|
};
|
|
12367
12378
|
try {
|
|
12368
12379
|
const handlers = [];
|
|
12369
|
-
const observe = (
|
|
12370
|
-
var
|
|
12380
|
+
const observe = (doc2) => {
|
|
12381
|
+
var _a3;
|
|
12371
12382
|
return callbackWrapper(initObservers)(
|
|
12372
12383
|
{
|
|
12373
12384
|
mutationCb: wrappedMutationEmit,
|
|
@@ -12469,7 +12480,7 @@ function record(options = {}) {
|
|
|
12469
12480
|
inlineImages,
|
|
12470
12481
|
userTriggeredOnInput,
|
|
12471
12482
|
collectFonts,
|
|
12472
|
-
doc,
|
|
12483
|
+
doc: doc2,
|
|
12473
12484
|
maskInputFn,
|
|
12474
12485
|
maskTextFn,
|
|
12475
12486
|
keepIframeSrcFn,
|
|
@@ -12483,7 +12494,7 @@ function record(options = {}) {
|
|
|
12483
12494
|
processedNodeManager,
|
|
12484
12495
|
canvasManager,
|
|
12485
12496
|
ignoreCSSAttributes,
|
|
12486
|
-
plugins: ((
|
|
12497
|
+
plugins: ((_a3 = plugins == null ? void 0 : plugins.filter((p) => p.observer)) == null ? void 0 : _a3.map((p) => ({
|
|
12487
12498
|
observer: p.observer,
|
|
12488
12499
|
options: p.options,
|
|
12489
12500
|
callback: (payload) => wrappedEmit({
|
|
@@ -12510,7 +12521,7 @@ function record(options = {}) {
|
|
|
12510
12521
|
handlers.push(observe(document));
|
|
12511
12522
|
recording = true;
|
|
12512
12523
|
};
|
|
12513
|
-
if (
|
|
12524
|
+
if (doc.readyState === "interactive" || doc.readyState === "complete") {
|
|
12514
12525
|
init();
|
|
12515
12526
|
} else {
|
|
12516
12527
|
handlers.push(
|