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

resize-observer-lite

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

resize-observer-lite - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

30

lib/index.js

@@ -24,10 +24,12 @@ "use strict";

}
if (this.hasResizeObserver) {
this.rz.observe(element);
if (element) {
if (this.hasResizeObserver) {
this.rz.observe(element);
}
else {
this.erd.listenTo(element, function (element) {
_this.handler(getSize(element));
});
}
}
else {
this.erd.listenTo(element, function (element) {
_this.handler(getSize(element));
});
}
this.listenedElement = element;

@@ -37,9 +39,11 @@ }

ResizeObserverLite.prototype.disconnect = function () {
if (this.hasResizeObserver) {
this.rz.disconnect();
if (this.listenedElement) {
if (this.hasResizeObserver) {
this.rz.disconnect();
}
else {
this.erd.uninstall(this.listenedElement);
}
this.listenedElement = null;
}
else {
this.erd.uninstall(this.listenedElement);
}
this.listenedElement = null;
};

@@ -46,0 +50,0 @@ return ResizeObserverLite;

{
"name": "resize-observer-lite",
"version": "0.2.0",
"version": "0.2.1",
"description": "A ResizeObserver polyfill that has limited functionality of ResizeObserver.",

@@ -5,0 +5,0 @@ "repository": {

Sorry, the diff of this file is not supported yet

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