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