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

@juggle/resize-observer

Package Overview
Dependencies
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@juggle/resize-observer - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

4

lib/algorithms/broadcastActiveObservations.js

@@ -25,5 +25,7 @@ import { resizeObservers } from '../ResizeObserverController';

});
callbacks.forEach(function fireCallback(callback) { return callback(); });
for (let callback of callbacks) {
callback();
}
return shallowestDepth;
};
export { broadcastActiveObservations };

@@ -31,10 +31,18 @@ import { process } from '../ResizeObserverController';

scheduled = false;
const callbacks = [];
rafSlot.forEach(callback => callbacks.push(callback));
resizeObserverSlot.forEach(callback => callbacks.push(callback));
const frameCallbacks = [];
const resizeObserverCallbacks = [];
rafSlot.forEach(callback => frameCallbacks.push(callback));
resizeObserverSlot.forEach(callback => resizeObserverCallbacks.push(callback));
rafSlot.clear();
resizeObserverSlot.clear();
for (let callback of callbacks) {
callback(t);
try {
for (let callback of frameCallbacks) {
callback(t);
}
}
finally {
for (let callback of resizeObserverCallbacks) {
callback(t);
}
}
}

@@ -52,7 +60,16 @@ ;

resizeObserverSlot.set(this, function ResizeObserver() {
if (process()) {
scheduler.run(60);
let elementsHaveResized = false;
try {
elementsHaveResized = process();
}
else if (frames) {
scheduler.run(frames - 1);
finally {
if (elementsHaveResized) {
scheduler.run(60);
}
else if (frames) {
scheduler.run(frames - 1);
}
else {
scheduler.start();
}
}

@@ -63,2 +80,6 @@ });

schedule() {
if (scheduled) {
return;
}
this.stop();
this.run(1);

@@ -65,0 +86,0 @@ }

{
"name": "@juggle/resize-observer",
"version": "1.0.1",
"version": "1.1.0",
"description": "Polyfills the ResizeObserver API and supports box size options from the latest spec",

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

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