@mparticle/web-sdk
Advanced tools
Comparing version 2.12.4 to 2.12.5
@@ -5,2 +5,7 @@ ## Releases | ||
#### 2.12.45 - 2021-02-17 | ||
- Bugfix - Use addEventListeners for life cycle events | ||
- Bugfix - Set setCurrencyCode on eCommerce object | ||
#### 2.12.4 - 2021-02-09 | ||
@@ -10,2 +15,3 @@ | ||
- Format code styling | ||
#### 2.12.3 - 2021-01-20 | ||
@@ -12,0 +18,0 @@ |
{ | ||
"name": "@mparticle/web-sdk", | ||
"version": "2.12.4", | ||
"version": "2.12.5", | ||
"description": "mParticle core SDK for web applications", | ||
@@ -5,0 +5,0 @@ "license": "Apache-2.0", |
@@ -48,8 +48,12 @@ import { Batch } from '@mparticle/event-models'; | ||
const _this = this; | ||
window.onbeforeunload = () => { | ||
document.addEventListener('visibilitychange', () => { | ||
_this.prepareAndUpload(false, _this.isBeaconAvailable()); | ||
}; | ||
window.onpagehide = () => { | ||
}); | ||
window.addEventListener('beforeunload', () => { | ||
_this.prepareAndUpload(false, _this.isBeaconAvailable()); | ||
}; | ||
}); | ||
window.addEventListener('pagehide', () => { | ||
_this.prepareAndUpload(false, _this.isBeaconAvailable()); | ||
}); | ||
} | ||
@@ -56,0 +60,0 @@ |
@@ -624,3 +624,3 @@ // | ||
self.ready(function() { | ||
self.setCurrencyCode(code); | ||
self.eCommerce.setCurrencyCode(code); | ||
}); | ||
@@ -627,0 +627,0 @@ return; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
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
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
1520794
27548