@adobe/helix-rum-enhancer
Advanced tools
Comparing version 1.3.0 to 1.4.0
@@ -0,1 +1,8 @@ | ||
# [1.4.0](https://github.com/adobe/helix-rum-enhancer/compare/v1.3.0...v1.4.0) (2023-09-02) | ||
### Features | ||
* **checkpoint:** introduce leave checkpoint ([33abd03](https://github.com/adobe/helix-rum-enhancer/commit/33abd03947b0345200eea1d5857b72a036c09923)) | ||
# [1.3.0](https://github.com/adobe/helix-rum-enhancer/compare/v1.2.0...v1.3.0) (2023-08-24) | ||
@@ -2,0 +9,0 @@ |
{ | ||
"name": "@adobe/helix-rum-enhancer", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"description": "Helix RUM Enhancer", | ||
@@ -37,3 +37,3 @@ "main": "src/index.js", | ||
"codecov": "3.8.3", | ||
"eslint": "8.47.0", | ||
"eslint": "8.48.0", | ||
"eslint-plugin-header": "3.1.1", | ||
@@ -44,6 +44,6 @@ "eslint-plugin-import": "2.28.1", | ||
"junit-report-builder": "3.0.1", | ||
"lint-staged": "14.0.0", | ||
"lint-staged": "14.0.1", | ||
"mocha": "10.2.0", | ||
"mocha-multi-reporters": "1.5.1", | ||
"semantic-release": "21.0.7" | ||
"semantic-release": "21.1.1" | ||
}, | ||
@@ -50,0 +50,0 @@ "lint-staged": { |
@@ -90,2 +90,10 @@ /* | ||
sampleRUM.drain('leave', ((event = {}) => { | ||
if (sampleRUM.left || (event.type === 'visibilitychange' && document.visibilityState !== 'hidden')) { | ||
return; | ||
} | ||
sampleRUM.left = true; | ||
sampleRUM('leave'); | ||
})); | ||
sampleRUM.sourceselector = (element) => { | ||
@@ -124,1 +132,4 @@ if (element === document.body || element === document.documentElement || !element) { | ||
}); | ||
window.addEventListener('visibilitychange', ((event) => sampleRUM.leave(event))); | ||
window.addEventListener('pagehide', ((event) => sampleRUM.leave(event))); |
34251
182