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

html-element-property-mixins

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-element-property-mixins - npm Package Compare versions

Comparing version 0.10.2 to 0.10.3

2

package.json
{
"name": "html-element-property-mixins",
"version": "0.10.2",
"version": "0.10.3",
"description": "A collection of mixins extending HTMLElement with properties.",

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

@@ -290,4 +290,4 @@ # # html-element-property-mixins

attributeName: 'first-name', //map to custom attribute name,
toAttributeConverter: ParseString.toAttribute, //run when converting to attribute
fromAttributeConverter: ParseString.fromAttribute //run when converting from attribute
toAttributeConverter: StringConverter.toAttribute, //run when converting to attribute
fromAttributeConverter: StringConverter.fromAttribute //run when converting from attribute
}

@@ -436,2 +436,2 @@ }

> **Note**: `PropertiesChangedHandler` should always be used in conjunction with `ObservedProperties`.
> **Note**: `PropertiesChangedHandler` should always be used in conjunction with `ObservedProperties`.

@@ -30,7 +30,7 @@ export const DOMProperties = (SuperClass) => class extends SuperClass {

this.getAttributeNames().map(attrName => attrValues.set(attrName, this.getAttribute(attrName)));
this.constructor.__initialAttributeValues = attrValues;
this.__initialAttributeValues = attrValues;
}
static __setInitialAttributeValues() {
const attrValues = this.constructor.__initialAttributeValues;
const attrValues = this.__initialAttributeValues;
attrValues.forEach((val, attrName) => this.setAttribute(attrName, val));

@@ -37,0 +37,0 @@ }

@@ -16,8 +16,8 @@ export const ObservedProperties = (SuperClass) => class extends SuperClass {

static __saveInitialPropertyValues() {
this.constructor.__initialPropertyValues = new Map();
(this.constructor.observedProperties || []).map(propName => this.constructor.__initialPropertyValues.set(propName, this[propName]));
this.__initialPropertyValues = new Map();
(this.constructor.observedProperties || []).map(propName => this.__initialPropertyValues.set(propName, this[propName]));
}
static __setInitialPropertyValues() {
this.constructor.__initialPropertyValues.forEach((val, propName) => {
this.__initialPropertyValues.forEach((val, propName) => {
if(val !== undefined) this[propName] = val;

@@ -24,0 +24,0 @@ });

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