Socket
Socket
Sign inDemoInstall

@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.7.0 to 0.7.1

11

lib/DOMInteractions.js

@@ -20,6 +20,9 @@ const watchers = [];

events.forEach(name => window.addEventListener(name, dispatch, true));
if ('MutationObserver' in window) {
const observerConfig = { attributes: true, characterData: true, childList: true, subtree: true };
new MutationObserver(dispatch).observe(document.body, observerConfig);
}
const createObserver = () => {
if ('MutationObserver' in window) {
const observerConfig = { attributes: true, characterData: true, childList: true, subtree: true };
new MutationObserver(dispatch).observe(document.body, observerConfig);
}
};
document.body ? createObserver() : document.addEventListener('DOMContentLoaded', createObserver);
class DOMInteractions {

@@ -26,0 +29,0 @@ static watch(callback) {

{
"name": "@juggle/resize-observer",
"version": "0.7.0",
"version": "0.7.1",
"description": "ResizeObserver - Based on the official draft specification",

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

@@ -30,7 +30,11 @@ type StandardCallback = () => any;

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

@@ -37,0 +41,0 @@ class DOMInteractions {

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