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

ay-accordion

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ay-accordion - npm Package Compare versions

Comparing version 1.2.3 to 1.2.4

34

dist/accordion.js

@@ -248,22 +248,30 @@ /*! Copyright (c) 2016 Ayogo Health Inc.

};
var attributeCallback = function (el) {
if (el.hasAttribute('ay-accordion-header') || el.querySelector('[ay-accordion-header]')) {
return;
}
// Open if "open" is either truthy or set to an empty string
var isOpen = $element[0].hasAttribute('open') && (!!$element[0].getAttribute('open') || $element[0].getAttribute('open') === '');
if (isOpen && !$element.hasClass('open')) {
selfCtrl.open();
}
else if (!isOpen && $element.hasClass('open')) {
selfCtrl.close();
}
};
Array.prototype.forEach.call($element.children(), childCallback);
if ('MutationObserver' in window) {
var observer = new MutationObserver(function () {
var childObserver = new MutationObserver(function () {
Array.prototype.forEach.call($element.children(), childCallback);
});
observer.observe($element[0], { childList: true });
var attributeObserver = new MutationObserver(function () {
Array.prototype.forEach.call($element.children(), attributeCallback);
});
childObserver.observe($element[0], { childList: true });
attributeObserver.observe($element[0], { attributes: true });
$element.on('$destroy', function () {
observer.disconnect();
childObserver.disconnect();
attributeObserver.disconnect();
});
}
$attrs.$observe('open', function (newval) {
if (newval || newval === "") {
if (!$element.hasClass('open')) {
selfCtrl.open();
}
}
else if ($element.hasClass('open')) {
selfCtrl.close();
}
});
}

@@ -270,0 +278,0 @@ };

{
"name": "ay-accordion",
"version": "1.2.3",
"version": "1.2.4",
"copyright": "Copyright 2016 Ayogo Health Inc.",

@@ -5,0 +5,0 @@ "license": "MIT",

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