navigator.sendbeacon
Advanced tools
Comparing version 0.0.3 to 0.0.4
{ | ||
"name": "navigator.sendbeacon", | ||
"name": "navigator-sendbeacon", | ||
"main": "sendbeacon.js", | ||
@@ -4,0 +4,0 @@ "version": "0.0.3", |
{ | ||
"name": "navigator.sendbeacon", | ||
"version": "0.0.3", | ||
"version": "0.0.4", | ||
"description": "Polyfill for navigator.sendBeacon()", | ||
@@ -5,0 +5,0 @@ "main": "sendbeacon.js", |
@@ -1,2 +0,2 @@ | ||
# sendbeacon-polyfill | ||
# Navigator.sendBeacon polyfill | ||
@@ -14,3 +14,3 @@ Polyfill for [Navigator.sendBeacon()](http://www.w3.org/TR/beacon/#sec-sendBeacon-method) | ||
```bash | ||
bower install navigator.sendbeacon | ||
bower install navigator-sendbeacon | ||
``` | ||
@@ -17,0 +17,0 @@ |
@@ -7,2 +7,3 @@ (function(root) { | ||
xhr.open('POST', url, false); | ||
xhr.withCredentials = true; | ||
xhr.setRequestHeader('Accept', '*/*'); | ||
@@ -21,6 +22,2 @@ if (typeof data === 'string') { | ||
if (!('sendBeacon' in navigator)) { | ||
navigator.sendBeacon = sendBeacon; | ||
} | ||
if (typeof exports !== 'undefined') { | ||
@@ -35,3 +32,5 @@ if (typeof module !== 'undefined' && module.exports) { | ||
}); | ||
} else if ('navigator' in root && !('sendBeacon' in root.navigator)) { | ||
root.navigator.sendBeacon = sendBeacon; | ||
} | ||
})(this); |
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
5705