Socket
Socket
Sign inDemoInstall

@zag-js/element-size

Package Overview
Dependencies
0
Maintainers
1
Versions
658
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.2.3 to 0.3.0

7

dist/index.js

@@ -30,2 +30,3 @@ "use strict";

function trackElementSize(element, callback) {
var _a;
if (!element) {

@@ -36,3 +37,3 @@ callback(void 0);

callback({ width: element.offsetWidth, height: element.offsetHeight });
const win = element.ownerDocument.defaultView ?? window;
const win = (_a = element.ownerDocument.defaultView) != null ? _a : window;
const observer = new win.ResizeObserver((entries) => {

@@ -86,6 +87,6 @@ if (!Array.isArray(entries) || !entries.length)

function trackMutation(el, cb) {
var _a;
var _a, _b;
if (!el || !el.parentElement)
return;
const win = ((_a = el.ownerDocument) == null ? void 0 : _a.defaultView) ?? window;
const win = (_b = (_a = el.ownerDocument) == null ? void 0 : _a.defaultView) != null ? _b : window;
const observer = new win.MutationObserver(() => {

@@ -92,0 +93,0 @@ cb();

{
"name": "@zag-js/element-size",
"version": "0.2.3",
"version": "0.3.0",
"description": "Observer the size of an element over time",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc