@openreplay/tracker
Advanced tools
Comparing version 14.0.5 to 14.0.6-beta.0
@@ -97,3 +97,3 @@ "use strict"; | ||
this.activityState = ActivityState.NotActive; | ||
this.version = '14.0.5'; // TODO: version compatability check inside each plugin. | ||
this.version = '14.0.6-beta.0'; // TODO: version compatability check inside each plugin. | ||
this.socketMode = false; | ||
@@ -100,0 +100,0 @@ this.compressionThreshold = 24 * 1000; |
@@ -13,2 +13,6 @@ import App from '../index.js'; | ||
private clear; | ||
/** | ||
* Unbinds the old content document in case of iframe src change. | ||
*/ | ||
private handleIframeSrcChange; | ||
private sendNodeAttribute; | ||
@@ -15,0 +19,0 @@ private sendNodeData; |
@@ -51,2 +51,3 @@ "use strict"; | ||
this.observer = (0, utils_js_1.createMutationObserver)(this.app.safe((mutations) => { | ||
console.log(mutations); | ||
for (const mutation of mutations) { | ||
@@ -61,3 +62,2 @@ // mutations order is sequential | ||
for (let i = 0; i < mutation.removedNodes.length; i++) { | ||
// Should be the same as bindTree(mutation.removedNodes[i]), but logic needs to be be untied | ||
if (isObservable(mutation.removedNodes[i])) { | ||
@@ -84,2 +84,5 @@ this.bindNode(mutation.removedNodes[i]); | ||
} | ||
if (target instanceof HTMLIFrameElement && name === 'src') { | ||
this.handleIframeSrcChange(target, id); | ||
} | ||
let attr = this.attributesMap.get(id); | ||
@@ -94,3 +97,2 @@ if (attr === undefined) { | ||
this.textSet.add(id); | ||
continue; | ||
} | ||
@@ -108,6 +110,16 @@ } | ||
} | ||
/** | ||
* Unbinds the old content document in case of iframe src change. | ||
*/ | ||
handleIframeSrcChange(iframe, id) { | ||
const oldContentDocument = iframe.contentDocument; | ||
if (oldContentDocument) { | ||
this.recents.set(id, RecentsType.Removed); | ||
this.unbindTree(oldContentDocument, true); | ||
} | ||
} | ||
sendNodeAttribute(id, node, name, value) { | ||
if ((0, guards_js_1.isSVGElement)(node)) { | ||
if (name.substr(0, 6) === 'xlink:') { | ||
name = name.substr(6); | ||
if (name.substring(0, 6) === 'xlink:') { | ||
name = name.substring(6); | ||
} | ||
@@ -133,3 +145,3 @@ if (value === null) { | ||
name === 'autocomplete' || | ||
name.substr(0, 2) === 'on') { | ||
name.substring(0, 2) === 'on') { | ||
return; | ||
@@ -195,4 +207,7 @@ } | ||
} | ||
unbindTree(node) { | ||
unbindTree(node, force) { | ||
const id = this.app.nodes.unregisterNode(node); | ||
if (force && id) { | ||
this.recents.set(id, RecentsType.Removed); | ||
} | ||
if (id !== undefined && this.recents.get(id) === RecentsType.Removed) { | ||
@@ -199,0 +214,0 @@ // Sending RemoveNode only for parent to maintain |
@@ -101,3 +101,3 @@ "use strict"; | ||
req.send(JSON.stringify({ | ||
trackerVersion: '14.0.5', | ||
trackerVersion: '14.0.6-beta.0', | ||
projectKey: this.options.projectKey, | ||
@@ -104,0 +104,0 @@ doNotTrack, |
@@ -68,3 +68,3 @@ import { gzip } from 'fflate'; | ||
this.activityState = ActivityState.NotActive; | ||
this.version = '14.0.5'; // TODO: version compatability check inside each plugin. | ||
this.version = '14.0.6-beta.0'; // TODO: version compatability check inside each plugin. | ||
this.socketMode = false; | ||
@@ -71,0 +71,0 @@ this.compressionThreshold = 24 * 1000; |
@@ -13,2 +13,6 @@ import App from '../index.js'; | ||
private clear; | ||
/** | ||
* Unbinds the old content document in case of iframe src change. | ||
*/ | ||
private handleIframeSrcChange; | ||
private sendNodeAttribute; | ||
@@ -15,0 +19,0 @@ private sendNodeData; |
@@ -49,2 +49,3 @@ import { createMutationObserver } from '../../utils.js'; | ||
this.observer = createMutationObserver(this.app.safe((mutations) => { | ||
console.log(mutations); | ||
for (const mutation of mutations) { | ||
@@ -59,3 +60,2 @@ // mutations order is sequential | ||
for (let i = 0; i < mutation.removedNodes.length; i++) { | ||
// Should be the same as bindTree(mutation.removedNodes[i]), but logic needs to be be untied | ||
if (isObservable(mutation.removedNodes[i])) { | ||
@@ -82,2 +82,5 @@ this.bindNode(mutation.removedNodes[i]); | ||
} | ||
if (target instanceof HTMLIFrameElement && name === 'src') { | ||
this.handleIframeSrcChange(target, id); | ||
} | ||
let attr = this.attributesMap.get(id); | ||
@@ -92,3 +95,2 @@ if (attr === undefined) { | ||
this.textSet.add(id); | ||
continue; | ||
} | ||
@@ -106,6 +108,16 @@ } | ||
} | ||
/** | ||
* Unbinds the old content document in case of iframe src change. | ||
*/ | ||
handleIframeSrcChange(iframe, id) { | ||
const oldContentDocument = iframe.contentDocument; | ||
if (oldContentDocument) { | ||
this.recents.set(id, RecentsType.Removed); | ||
this.unbindTree(oldContentDocument, true); | ||
} | ||
} | ||
sendNodeAttribute(id, node, name, value) { | ||
if (isSVGElement(node)) { | ||
if (name.substr(0, 6) === 'xlink:') { | ||
name = name.substr(6); | ||
if (name.substring(0, 6) === 'xlink:') { | ||
name = name.substring(6); | ||
} | ||
@@ -131,3 +143,3 @@ if (value === null) { | ||
name === 'autocomplete' || | ||
name.substr(0, 2) === 'on') { | ||
name.substring(0, 2) === 'on') { | ||
return; | ||
@@ -193,4 +205,7 @@ } | ||
} | ||
unbindTree(node) { | ||
unbindTree(node, force) { | ||
const id = this.app.nodes.unregisterNode(node); | ||
if (force && id) { | ||
this.recents.set(id, RecentsType.Removed); | ||
} | ||
if (id !== undefined && this.recents.get(id) === RecentsType.Removed) { | ||
@@ -197,0 +212,0 @@ // Sending RemoveNode only for parent to maintain |
@@ -70,3 +70,3 @@ import App, { DEFAULT_INGEST_POINT } from './app/index.js'; | ||
req.send(JSON.stringify({ | ||
trackerVersion: '14.0.5', | ||
trackerVersion: '14.0.6-beta.0', | ||
projectKey: this.options.projectKey, | ||
@@ -73,0 +73,0 @@ doNotTrack, |
{ | ||
"name": "@openreplay/tracker", | ||
"description": "The OpenReplay tracker main package", | ||
"version": "14.0.5", | ||
"version": "14.0.6-beta.0", | ||
"keywords": [ | ||
@@ -6,0 +6,0 @@ "logging", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4023925
24431
2