@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.cjs
CHANGED
|
@@ -666,7 +666,6 @@ EventTarget.prototype.addEventListener = function(type, listener, options) {
|
|
|
666
666
|
originalAddEventListener$1.call(this, type, listener, options);
|
|
667
667
|
if (this instanceof Element) {
|
|
668
668
|
const eventType = type.toLowerCase();
|
|
669
|
-
console.info("Event type: ", eventType);
|
|
670
669
|
if (interactiveEvents$1.includes(eventType)) {
|
|
671
670
|
interactiveElementsRegistry$1.add(this);
|
|
672
671
|
}
|
|
@@ -5715,7 +5714,6 @@ EventTarget.prototype.addEventListener = function(type, listener, options) {
|
|
|
5715
5714
|
originalAddEventListener.call(this, type, listener, options);
|
|
5716
5715
|
if (this instanceof Element) {
|
|
5717
5716
|
const eventType = type.toLowerCase();
|
|
5718
|
-
console.info("Event type: ", eventType);
|
|
5719
5717
|
if (interactiveEvents.includes(eventType)) {
|
|
5720
5718
|
interactiveElementsRegistry.add(this);
|
|
5721
5719
|
}
|
|
@@ -13945,6 +13943,7 @@ try {
|
|
|
13945
13943
|
}
|
|
13946
13944
|
const mirror = createMirror$2();
|
|
13947
13945
|
function record(options = {}) {
|
|
13946
|
+
var _a2;
|
|
13948
13947
|
const {
|
|
13949
13948
|
emit,
|
|
13950
13949
|
checkoutEveryNms,
|
|
@@ -13979,12 +13978,24 @@ function record(options = {}) {
|
|
|
13979
13978
|
ignoreCSSAttributes = /* @__PURE__ */ new Set([]),
|
|
13980
13979
|
errorHandler: errorHandler2
|
|
13981
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
|
+
}
|
|
13982
13993
|
registerErrorHandler(errorHandler2);
|
|
13983
|
-
const inEmittingFrame = recordCrossOriginIframes ?
|
|
13994
|
+
const inEmittingFrame = recordCrossOriginIframes ? win.parent === win : true;
|
|
13984
13995
|
let passEmitsToParent = false;
|
|
13985
13996
|
if (!inEmittingFrame) {
|
|
13986
13997
|
try {
|
|
13987
|
-
if (
|
|
13998
|
+
if (win.parent.document) {
|
|
13988
13999
|
passEmitsToParent = false;
|
|
13989
14000
|
}
|
|
13990
14001
|
} catch (e2) {
|
|
@@ -14051,10 +14062,10 @@ function record(options = {}) {
|
|
|
14051
14062
|
return e2;
|
|
14052
14063
|
};
|
|
14053
14064
|
wrappedEmit = (r2, isCheckout) => {
|
|
14054
|
-
var
|
|
14065
|
+
var _a3;
|
|
14055
14066
|
const e2 = r2;
|
|
14056
14067
|
e2.timestamp = nowTimestamp();
|
|
14057
|
-
if (((
|
|
14068
|
+
if (((_a3 = mutationBuffers[0]) == null ? void 0 : _a3.isFrozen()) && e2.type !== EventType.FullSnapshot && !(e2.type === EventType.IncrementalSnapshot && e2.data.source === IncrementalSource.Mutation)) {
|
|
14058
14069
|
mutationBuffers.forEach((buf) => buf.unfreeze());
|
|
14059
14070
|
}
|
|
14060
14071
|
if (inEmittingFrame) {
|
|
@@ -14063,10 +14074,10 @@ function record(options = {}) {
|
|
|
14063
14074
|
const message = {
|
|
14064
14075
|
type: "rrweb",
|
|
14065
14076
|
event: eventProcessor(e2),
|
|
14066
|
-
origin:
|
|
14077
|
+
origin: win.location.origin,
|
|
14067
14078
|
isCheckout
|
|
14068
14079
|
};
|
|
14069
|
-
|
|
14080
|
+
win.parent.postMessage(message, "*");
|
|
14070
14081
|
}
|
|
14071
14082
|
if (e2.type === EventType.FullSnapshot) {
|
|
14072
14083
|
lastFullSnapshotEvent = e2;
|
|
@@ -14177,7 +14188,7 @@ function record(options = {}) {
|
|
|
14177
14188
|
{
|
|
14178
14189
|
type: EventType.Meta,
|
|
14179
14190
|
data: {
|
|
14180
|
-
href:
|
|
14191
|
+
href: win.location.href,
|
|
14181
14192
|
width: getWindowWidth(),
|
|
14182
14193
|
height: getWindowHeight()
|
|
14183
14194
|
}
|
|
@@ -14235,16 +14246,16 @@ function record(options = {}) {
|
|
|
14235
14246
|
isCheckout
|
|
14236
14247
|
);
|
|
14237
14248
|
mutationBuffers.forEach((buf) => buf.unlock());
|
|
14238
|
-
if (
|
|
14249
|
+
if (doc.adoptedStyleSheets && doc.adoptedStyleSheets.length > 0)
|
|
14239
14250
|
stylesheetManager.adoptStyleSheets(
|
|
14240
|
-
|
|
14241
|
-
mirror.getId(
|
|
14251
|
+
doc.adoptedStyleSheets,
|
|
14252
|
+
mirror.getId(doc)
|
|
14242
14253
|
);
|
|
14243
14254
|
};
|
|
14244
14255
|
try {
|
|
14245
14256
|
const handlers = [];
|
|
14246
|
-
const observe = (
|
|
14247
|
-
var
|
|
14257
|
+
const observe = (doc2) => {
|
|
14258
|
+
var _a3;
|
|
14248
14259
|
return callbackWrapper(initObservers)(
|
|
14249
14260
|
{
|
|
14250
14261
|
mutationCb: wrappedMutationEmit,
|
|
@@ -14346,7 +14357,7 @@ function record(options = {}) {
|
|
|
14346
14357
|
inlineImages,
|
|
14347
14358
|
userTriggeredOnInput,
|
|
14348
14359
|
collectFonts,
|
|
14349
|
-
doc,
|
|
14360
|
+
doc: doc2,
|
|
14350
14361
|
maskInputFn,
|
|
14351
14362
|
maskTextFn,
|
|
14352
14363
|
keepIframeSrcFn,
|
|
@@ -14360,7 +14371,7 @@ function record(options = {}) {
|
|
|
14360
14371
|
processedNodeManager,
|
|
14361
14372
|
canvasManager,
|
|
14362
14373
|
ignoreCSSAttributes,
|
|
14363
|
-
plugins: ((
|
|
14374
|
+
plugins: ((_a3 = plugins == null ? void 0 : plugins.filter((p) => p.observer)) == null ? void 0 : _a3.map((p) => ({
|
|
14364
14375
|
observer: p.observer,
|
|
14365
14376
|
options: p.options,
|
|
14366
14377
|
callback: (payload) => wrappedEmit({
|
|
@@ -14387,7 +14398,7 @@ function record(options = {}) {
|
|
|
14387
14398
|
handlers.push(observe(document));
|
|
14388
14399
|
recording = true;
|
|
14389
14400
|
};
|
|
14390
|
-
if (
|
|
14401
|
+
if (doc.readyState === "interactive" || doc.readyState === "complete") {
|
|
14391
14402
|
init();
|
|
14392
14403
|
} else {
|
|
14393
14404
|
handlers.push(
|