New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

html-element-extended

Package Overview
Dependencies
Maintainers
0
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-element-extended - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

1

CHANGELOG.md

@@ -0,1 +1,2 @@

* 0.1.2 support boolAttributes (for discover on frugal-iot)
* 0.1.1 Fixed an issue with boolean parameters not showing boolean false

@@ -2,0 +3,0 @@ * 0.1.0 Split out qrelementextended and videoelementextended as own repos and modules

10

htmlelementextended.js

@@ -111,3 +111,4 @@ /* Summary

function toBool(value) {
return ["true", "TRUE", 1, "1", true].includes(value);
// The "" may or may not be correct, when used as a webcomponent <foo-bar discover> will pass a value of "", unclear if there is any existing example where empty string is presumed false
return ["true", "TRUE", 1, "1", true, ""].includes(value);
}

@@ -204,2 +205,4 @@ // Standardish routing to allow nesting Elements inside JS

static get floatAttributes() { return []; }
// Overriddden to add new boolean attributes
static get boolAttributes() { return []; }
// Override this to return an array of (string) attributes passed

@@ -230,3 +233,6 @@ static get observedAttributes() { return []; }

} // Fine if value is already an int
if ((name === 'visible') && (newValue === 'false')) newValue = false;
if (this.constructor.boolAttributes.includes(name)) {
newValue = toBool(newValue);
}
if ((name === 'visible') && (newValue === 'false')) newValue = false; // TODO find where used and create boolAttributes
this.state[name] = newValue;

@@ -233,0 +239,0 @@ }

@@ -29,3 +29,3 @@ {

"type": "module",
"version": "0.1.1"
"version": "0.1.2"
}
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