service-worker-mock
Advanced tools
Comparing version 1.7.2 to 1.8.0
@@ -23,2 +23,3 @@ // If the WHATWG URL implementation is available via the first-party `url` | ||
const ServiceWorkerRegistration = require('./models/ServiceWorkerRegistration'); | ||
const MessageEvent = require('./models/MessageEvent'); | ||
@@ -70,2 +71,3 @@ const eventHandler = require('./utils/eventHandler'); | ||
this.URL = URL; | ||
this.MessageEvent = MessageEvent; | ||
@@ -72,0 +74,0 @@ // Instance variable to avoid issues with `this` |
@@ -12,3 +12,3 @@ // stubs https://developer.mozilla.org/en-US/docs/Web/API/Response | ||
this.redirected = false; | ||
this.url = 'http://example.com/asset'; | ||
this.url = (init && init.url) || 'http://example.com/asset'; | ||
} | ||
@@ -20,3 +20,4 @@ | ||
statusText: this.statusText, | ||
headers: this.headers | ||
headers: this.headers, | ||
url: this.url | ||
}); | ||
@@ -23,0 +24,0 @@ } |
{ | ||
"name": "service-worker-mock", | ||
"version": "1.7.2", | ||
"version": "1.8.0", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -5,2 +5,3 @@ const ExtendableEvent = require('../models/ExtendableEvent'); | ||
const PushEvent = require('../models/PushEvent'); | ||
const MessageEvent = require('../models/MessageEvent'); | ||
@@ -15,2 +16,4 @@ function createEvent(event, args) { | ||
return new PushEvent(args); | ||
case 'message': | ||
return new MessageEvent('message', args); | ||
default: | ||
@@ -17,0 +20,0 @@ return new ExtendableEvent(); |
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
22687
24
607