Socket
Socket
Sign inDemoInstall

@juggle/resize-observer

Package Overview
Dependencies
0
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.0.0-3 to 4.0.0-4

22

lib/resize-observer.js

@@ -408,10 +408,4 @@ (function (global, factory) {

var observedElements = 0;
var documents = [];
var windows = [];
var isKnownDocument = function (document) {
return documents.indexOf(document) >= 0;
};
var isKnownWindow = function (window) {
return windows.indexOf(window) >= 0;
};
var documents = new WeakMap();
var windows = new WeakMap();
var observerConfig = { attributes: true, characterData: true, childList: true, subtree: true };

@@ -428,7 +422,7 @@ var handleEvent = function () { return observedElements && scheduler.schedule(); };

var addWindow = function (window) {
if (!isKnownWindow(window)) {
windows.push(window);
if (!windows.has(window)) {
windows.set(window, 1);
for (var _i = 0, windowEvents_1 = windowEvents; _i < windowEvents_1.length; _i++) {
var event_1 = windowEvents_1[_i];
window.addEventListener(event_1, handleEvent);
window.addEventListener(event_1, handleEvent, true);
}

@@ -438,7 +432,7 @@ }

var addDocument = function (document) {
if (!isKnownDocument(document)) {
documents.push(document);
if (!documents.has(document)) {
documents.set(document, 1);
for (var _i = 0, documentEvents_1 = documentEvents; _i < documentEvents_1.length; _i++) {
var event_2 = documentEvents_1[_i];
document.addEventListener(event_2, handleEvent);
document.addEventListener(event_2, handleEvent, true);
}

@@ -445,0 +439,0 @@ mo.observe(document, observerConfig);

{
"name": "@juggle/resize-observer",
"version": "4.0.0-3",
"version": "4.0.0-4",
"description": "Polyfills the latest ResizeObserver API",

@@ -5,0 +5,0 @@ "main": "./lib/resize-observer.js",

Sorry, the diff of this file is not supported yet

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