Socket
Socket
Sign inDemoInstall

service-worker-mock

Package Overview
Dependencies
2
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.10.2 to 1.11.0

models/WindowClient.js

2

index.js

@@ -11,2 +11,3 @@ // If the WHATWG URL implementation is available via the first-party `url`

const Client = require('./models/Client');
const WindowClient = require('./models/WindowClient');
const Clients = require('./models/Clients');

@@ -58,2 +59,3 @@ const ExtendableEvent = require('./models/ExtendableEvent');

this.Client = Client;
this.WindowClient = WindowClient;
this.Event = ExtendableEvent;

@@ -60,0 +62,0 @@ this.ExtendableEvent = ExtendableEvent;

4

models/Client.js

@@ -5,5 +5,6 @@ const generateRandomId = require('../utils/generateRandomId');

class Client {
constructor(url, frameType) {
constructor(url, type, frameType) {
this.id = generateRandomId();
this.url = url;
this.type = type || 'worker';
this.frameType = frameType;

@@ -19,2 +20,3 @@ }

url: this.url,
type: this.type,
frameType: this.frameType

@@ -21,0 +23,0 @@ };

@@ -1,2 +0,2 @@

const Client = require('./Client');
const WindowClient = require('./WindowClient');

@@ -19,5 +19,5 @@ // https://developer.mozilla.org/en-US/docs/Web/API/Clients

openWindow(url) {
const client = new Client(url);
this.clients.push(client);
return Promise.resolve(client);
const windowClient = new WindowClient(url);
this.clients.push(windowClient);
return Promise.resolve(windowClient);
}

@@ -24,0 +24,0 @@

{
"name": "service-worker-mock",
"version": "1.10.2",
"version": "1.11.0",
"main": "index.js",

@@ -5,0 +5,0 @@ "repository": {

@@ -12,2 +12,3 @@ const ExtendableEvent = require('../models/ExtendableEvent');

case 'notificationclick':
case 'notificationclose':
return new NotificationEvent(args);

@@ -14,0 +15,0 @@ case 'push':

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc