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 0.9.0 to 0.10.0

lib/utils/scheduler.d.ts

1

lib/ResizeObserver.d.ts

@@ -8,3 +8,4 @@ import { ResizeObserverCallback } from './ResizeObserverCallback';

disconnect(): void;
static toString(): string;
}
export { ResizeObserver };

@@ -20,3 +20,6 @@ import { ResizeObserverController } from './ResizeObserverController';

}
static toString() {
return 'function ResizeObserver () { [polyfill code] }';
}
}
export { ResizeObserver };

3

lib/ResizeObserverController.d.ts

@@ -6,2 +6,3 @@ import { ResizeObserver } from './ResizeObserver';

declare const resizeObservers: ResizeObserverDetail[];
declare const process: () => boolean;
export default class ResizeObserverController {

@@ -13,2 +14,2 @@ static connect(resizeObserver: ResizeObserver, callback: ResizeObserverCallback): void;

}
export { ResizeObserverController, resizeObservers };
export { ResizeObserverController, resizeObservers, process };

@@ -0,4 +1,4 @@

import { schedule } from './utils/scheduler';
import { ResizeObservation } from './ResizeObservation';
import { ResizeObserverDetail } from './ResizeObserverDetail';
import { DOMInteractions } from './DOMInteractions';
import { hasActiveObservations } from './algorithms/hasActiveObservations';

@@ -31,17 +31,2 @@ import { hasSkippedObservations } from './algorithms/hasSkippedObservations';

};
let frameId;
let extraFrames = 0;
const notify = () => {
cancelAnimationFrame(frameId);
frameId = requestAnimationFrame(() => {
if (process()) {
extraFrames = 0;
notify();
}
else if (extraFrames < 60) {
extraFrames += 1;
notify();
}
});
};
export default class ResizeObserverController {

@@ -58,3 +43,3 @@ static connect(resizeObserver, callback) {

detail.observationTargets.push(new ResizeObservation(target, options && options.box));
notify();
schedule();
}

@@ -80,3 +65,2 @@ }

}
DOMInteractions.watch(notify);
export { ResizeObserverController, resizeObservers };
export { ResizeObserverController, resizeObservers, process };
{
"name": "@juggle/resize-observer",
"version": "0.9.0",
"version": "0.10.0",
"description": "ResizeObserver - Based on the official draft specification",

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

@@ -125,3 +125,3 @@ # Resize Observer Polyfill

- Building responsive applications.
- Creating 'self-aware' Web Components.
- Creating self-aware, responsive Web Components.
- Making 3rd party libraries more responsive. e.g. charts and grids.

@@ -128,0 +128,0 @@ - Locking scroll position to the bottom of elements - useful for chat windows and logs.

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