@appsurify-testmap/rrweb-all 2.0.0-alpha.32 → 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-all.cjs +28 -15
- package/dist/rrweb-all.cjs.map +1 -1
- package/dist/rrweb-all.js +28 -15
- package/dist/rrweb-all.js.map +1 -1
- package/dist/rrweb-all.umd.cjs +28 -15
- package/dist/rrweb-all.umd.cjs.map +2 -2
- package/dist/rrweb-all.umd.min.cjs +26 -26
- package/dist/rrweb-all.umd.min.cjs.map +3 -3
- package/package.json +4 -4
package/dist/rrweb-all.cjs
CHANGED
|
@@ -13943,6 +13943,7 @@ try {
|
|
|
13943
13943
|
}
|
|
13944
13944
|
const mirror = createMirror$2();
|
|
13945
13945
|
function record(options = {}) {
|
|
13946
|
+
var _a2;
|
|
13946
13947
|
const {
|
|
13947
13948
|
emit,
|
|
13948
13949
|
checkoutEveryNms,
|
|
@@ -13977,12 +13978,24 @@ function record(options = {}) {
|
|
|
13977
13978
|
ignoreCSSAttributes = /* @__PURE__ */ new Set([]),
|
|
13978
13979
|
errorHandler: errorHandler2
|
|
13979
13980
|
} = options;
|
|
13981
|
+
const win = options.customWindow || window;
|
|
13982
|
+
const doc = options.customDocument || document;
|
|
13983
|
+
try {
|
|
13984
|
+
if (Array.from([1], (x2) => x2 * 2)[0] !== 2) {
|
|
13985
|
+
const cleanFrame = doc.createElement("iframe");
|
|
13986
|
+
doc.body.appendChild(cleanFrame);
|
|
13987
|
+
Array.from = ((_a2 = cleanFrame.contentWindow) == null ? void 0 : _a2.Array.from) || Array.from;
|
|
13988
|
+
doc.body.removeChild(cleanFrame);
|
|
13989
|
+
}
|
|
13990
|
+
} catch (err) {
|
|
13991
|
+
console.debug("Unable to override Array.from", err);
|
|
13992
|
+
}
|
|
13980
13993
|
registerErrorHandler(errorHandler2);
|
|
13981
|
-
const inEmittingFrame = recordCrossOriginIframes ?
|
|
13994
|
+
const inEmittingFrame = recordCrossOriginIframes ? win.parent === win : true;
|
|
13982
13995
|
let passEmitsToParent = false;
|
|
13983
13996
|
if (!inEmittingFrame) {
|
|
13984
13997
|
try {
|
|
13985
|
-
if (
|
|
13998
|
+
if (win.parent.document) {
|
|
13986
13999
|
passEmitsToParent = false;
|
|
13987
14000
|
}
|
|
13988
14001
|
} catch (e2) {
|
|
@@ -14049,10 +14062,10 @@ function record(options = {}) {
|
|
|
14049
14062
|
return e2;
|
|
14050
14063
|
};
|
|
14051
14064
|
wrappedEmit = (r2, isCheckout) => {
|
|
14052
|
-
var
|
|
14065
|
+
var _a3;
|
|
14053
14066
|
const e2 = r2;
|
|
14054
14067
|
e2.timestamp = nowTimestamp();
|
|
14055
|
-
if (((
|
|
14068
|
+
if (((_a3 = mutationBuffers[0]) == null ? void 0 : _a3.isFrozen()) && e2.type !== EventType.FullSnapshot && !(e2.type === EventType.IncrementalSnapshot && e2.data.source === IncrementalSource.Mutation)) {
|
|
14056
14069
|
mutationBuffers.forEach((buf) => buf.unfreeze());
|
|
14057
14070
|
}
|
|
14058
14071
|
if (inEmittingFrame) {
|
|
@@ -14061,10 +14074,10 @@ function record(options = {}) {
|
|
|
14061
14074
|
const message = {
|
|
14062
14075
|
type: "rrweb",
|
|
14063
14076
|
event: eventProcessor(e2),
|
|
14064
|
-
origin:
|
|
14077
|
+
origin: win.location.origin,
|
|
14065
14078
|
isCheckout
|
|
14066
14079
|
};
|
|
14067
|
-
|
|
14080
|
+
win.parent.postMessage(message, "*");
|
|
14068
14081
|
}
|
|
14069
14082
|
if (e2.type === EventType.FullSnapshot) {
|
|
14070
14083
|
lastFullSnapshotEvent = e2;
|
|
@@ -14175,7 +14188,7 @@ function record(options = {}) {
|
|
|
14175
14188
|
{
|
|
14176
14189
|
type: EventType.Meta,
|
|
14177
14190
|
data: {
|
|
14178
|
-
href:
|
|
14191
|
+
href: win.location.href,
|
|
14179
14192
|
width: getWindowWidth(),
|
|
14180
14193
|
height: getWindowHeight()
|
|
14181
14194
|
}
|
|
@@ -14233,16 +14246,16 @@ function record(options = {}) {
|
|
|
14233
14246
|
isCheckout
|
|
14234
14247
|
);
|
|
14235
14248
|
mutationBuffers.forEach((buf) => buf.unlock());
|
|
14236
|
-
if (
|
|
14249
|
+
if (doc.adoptedStyleSheets && doc.adoptedStyleSheets.length > 0)
|
|
14237
14250
|
stylesheetManager.adoptStyleSheets(
|
|
14238
|
-
|
|
14239
|
-
mirror.getId(
|
|
14251
|
+
doc.adoptedStyleSheets,
|
|
14252
|
+
mirror.getId(doc)
|
|
14240
14253
|
);
|
|
14241
14254
|
};
|
|
14242
14255
|
try {
|
|
14243
14256
|
const handlers = [];
|
|
14244
|
-
const observe = (
|
|
14245
|
-
var
|
|
14257
|
+
const observe = (doc2) => {
|
|
14258
|
+
var _a3;
|
|
14246
14259
|
return callbackWrapper(initObservers)(
|
|
14247
14260
|
{
|
|
14248
14261
|
mutationCb: wrappedMutationEmit,
|
|
@@ -14344,7 +14357,7 @@ function record(options = {}) {
|
|
|
14344
14357
|
inlineImages,
|
|
14345
14358
|
userTriggeredOnInput,
|
|
14346
14359
|
collectFonts,
|
|
14347
|
-
doc,
|
|
14360
|
+
doc: doc2,
|
|
14348
14361
|
maskInputFn,
|
|
14349
14362
|
maskTextFn,
|
|
14350
14363
|
keepIframeSrcFn,
|
|
@@ -14358,7 +14371,7 @@ function record(options = {}) {
|
|
|
14358
14371
|
processedNodeManager,
|
|
14359
14372
|
canvasManager,
|
|
14360
14373
|
ignoreCSSAttributes,
|
|
14361
|
-
plugins: ((
|
|
14374
|
+
plugins: ((_a3 = plugins == null ? void 0 : plugins.filter((p) => p.observer)) == null ? void 0 : _a3.map((p) => ({
|
|
14362
14375
|
observer: p.observer,
|
|
14363
14376
|
options: p.options,
|
|
14364
14377
|
callback: (payload) => wrappedEmit({
|
|
@@ -14385,7 +14398,7 @@ function record(options = {}) {
|
|
|
14385
14398
|
handlers.push(observe(document));
|
|
14386
14399
|
recording = true;
|
|
14387
14400
|
};
|
|
14388
|
-
if (
|
|
14401
|
+
if (doc.readyState === "interactive" || doc.readyState === "complete") {
|
|
14389
14402
|
init();
|
|
14390
14403
|
} else {
|
|
14391
14404
|
handlers.push(
|