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