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.1.0 to 0.1.1

6

lib/DOMInteractions.js

@@ -40,3 +40,5 @@ const watchers = [];

window.addEventListener('resize', notify);
const observerConfig = { attributes: true, characterData: true, childList: true, subtree: true };
new MutationObserver(notify).observe(document.body, observerConfig);
if ('MutationObserver' in window) {
const observerConfig = { attributes: true, characterData: true, childList: true, subtree: true };
new MutationObserver(notify).observe(document.body, observerConfig);
}

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

import ResizeObserverCallback from './ResizeObserverCallback';
export default class ResizeObserver {
private constructor();
constructor(callback: ResizeObserverCallback);
observe(target: Element): void;

@@ -4,0 +5,0 @@ unobserve(target: Element): void;

{
"name": "@juggle/resize-observer",
"version": "0.1.0",
"version": "0.1.1",
"description": "ResizeObserver class based on the draft specification",

@@ -11,3 +11,3 @@ "main": "./lib/ResizeObserver.js",

"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "jest --coverage"
},

@@ -19,2 +19,3 @@ "repository": {

"keywords": [
"ResizeObserver",
"resize",

@@ -27,4 +28,13 @@ "observer",

"component",
"web components",
"webcomponents",
"polyfill",
"ponyfill"
"ponyfill",
"event",
"vue",
"react",
"angular",
"polymer",
"lit",
"html"
],

@@ -36,3 +46,12 @@ "author": "Juggle",

},
"homepage": "https://github.com/juggle/resize-observer#readme"
"homepage": "https://github.com/juggle/resize-observer#readme",
"devDependencies": {
"@types/jest": "^23.3.12",
"jest": "^23.6.0",
"jest-cli": "^23.6.0",
"jsdom": "^13.1.0",
"sinon": "^7.2.2",
"ts-jest": "^23.10.5",
"typescript": "^3.2.2"
}
}

@@ -52,3 +52,5 @@ type StandardCallback = () => any;

// Listen for any other DOM changes which could affect sizes
const observerConfig = { attributes: true, characterData: true, childList: true, subtree: true };
new MutationObserver(notify).observe(document.body, observerConfig);
if ('MutationObserver' in window) {
const observerConfig = { attributes: true, characterData: true, childList: true, subtree: true };
new MutationObserver(notify).observe(document.body, observerConfig);
}

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

private constructor (callback: ResizeObserverCallback) {
public constructor (callback: ResizeObserverCallback) {
ResizeObserverController.connect(this, callback);

@@ -9,0 +9,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