Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

driver-browser

Package Overview
Dependencies
Maintainers
2
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

driver-browser - npm Package Compare versions

Comparing version 0.4.14 to 0.5.0-beta

20

lib/index.js

@@ -28,2 +28,5 @@ 'use strict';

var ADD_EVENT = 'addEvent';
var REMOVE_EVENT = 'removeEvent';
var Driver = {

@@ -33,2 +36,3 @@

viewportWidth: typeof VIEWPORT_WIDTH !== 'undefined' && VIEWPORT_WIDTH || 750,
eventRegistry: {},

@@ -101,7 +105,15 @@ getDeviceWidth: function getDeviceWidth() {

},
addEventListener: function addEventListener(node, eventName, eventHandler) {
return node.addEventListener(eventName, eventHandler);
addEventListener: function addEventListener(node, eventName, eventHandler, props) {
if (this.eventRegistry[eventName]) {
return this.eventRegistry[eventName](ADD_EVENT, node, eventName, eventHandler, props);
} else {
return node.addEventListener(eventName, eventHandler);
}
},
removeEventListener: function removeEventListener(node, eventName, eventHandler) {
return node.removeEventListener(eventName, eventHandler);
removeEventListener: function removeEventListener(node, eventName, eventHandler, props) {
if (this.eventRegistry[eventName]) {
return this.eventRegistry[eventName](REMOVE_EVENT, node, eventName, eventHandler, props);
} else {
return node.removeEventListener(eventName, eventHandler);
}
},

@@ -108,0 +120,0 @@ removeAllEventListeners: function removeAllEventListeners(node) {

4

package.json
{
"name": "driver-browser",
"version": "0.4.14",
"version": "0.5.0-beta",
"description": "Browser driver for Rax",

@@ -16,4 +16,4 @@ "license": "BSD-3-Clause",

"dependencies": {
"style-unit": "^0.4.14"
"style-unit": "^0.5.0-beta"
}
}

@@ -17,2 +17,5 @@ /**

const ADD_EVENT = 'addEvent';
const REMOVE_EVENT = 'removeEvent';
const Driver = {

@@ -22,2 +25,3 @@

viewportWidth: typeof VIEWPORT_WIDTH !== 'undefined' && VIEWPORT_WIDTH || 750,
eventRegistry: {},

@@ -106,8 +110,16 @@ getDeviceWidth() {

addEventListener(node, eventName, eventHandler) {
return node.addEventListener(eventName, eventHandler);
addEventListener(node, eventName, eventHandler, props) {
if (this.eventRegistry[eventName]) {
return this.eventRegistry[eventName](ADD_EVENT, node, eventName, eventHandler, props);
} else {
return node.addEventListener(eventName, eventHandler);
}
},
removeEventListener(node, eventName, eventHandler) {
return node.removeEventListener(eventName, eventHandler);
removeEventListener(node, eventName, eventHandler, props) {
if (this.eventRegistry[eventName]) {
return this.eventRegistry[eventName](REMOVE_EVENT, node, eventName, eventHandler, props);
} else {
return node.removeEventListener(eventName, eventHandler);
}
},

@@ -114,0 +126,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc