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

element-resize-event

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

element-resize-event - npm Package Compare versions

Comparing version 2.0.6 to 2.0.7

21

index.js

@@ -41,5 +41,7 @@ var exports = function exports(element, fn) {

var trigger = win.__resizeTrigger__
trigger.__resizeListeners__.forEach(function (fn) {
fn.call(trigger, e)
})
if(trigger !== undefined) {
trigger.__resizeListeners__.forEach(function (fn) {
fn.call(trigger, e)
})
}
})

@@ -80,2 +82,15 @@ }

exports.unbind = function(element, fn){
var attachEvent = document.attachEvent;
element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);
if (!element.__resizeListeners__.length) {
if (attachEvent) {
element.detachEvent('onresize', resizeListener);
} else {
element.__resizeTrigger__.contentDocument.defaultView.removeEventListener('resize', resizeListener);
element.__resizeTrigger__ = !element.removeChild(element.__resizeTrigger__);
}
}
}
module.exports = (typeof window === 'undefined') ? exports : exports.bind(window)

2

package.json
{
"name": "element-resize-event",
"description": "Polyfill to make it easy to listen for element resize events",
"version": "2.0.6",
"version": "2.0.7",
"author": "Kyle Mathews <mathews.kyle@gmail.com>",

@@ -6,0 +6,0 @@ "bugs": {

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