Huge News!Announcing our $40M Series B led by Abstract Ventures.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.12 to 0.11.0-beta.0

16

package.json
{
"name": "html-element-property-mixins",
"version": "0.10.12",
"version": "0.11.0-beta.0",
"description": "A collection of mixins extending HTMLElement with properties.",

@@ -10,3 +10,3 @@ "main": "src/index.js",

"lint": "eslint --ext .js . --ignore-path .gitignore",
"format": "eslint --ext .js . --fix --ignore-path .gitignore",
"format": "eslint --ext .js src/ --fix --ignore-path .gitignore",
"release": "release-it"

@@ -21,8 +21,8 @@ },

"devDependencies": {
"chai": "^4.2.0",
"es-dev-server": "^1.40.0",
"eslint": "^6.8.0",
"husky": "^3.0.9",
"mocha": "^7.1.0",
"release-it": "^13.1.1"
"chai": "^4.3.4",
"es-dev-server": "^2.1.0",
"eslint": "^7.26.0",
"husky": "^6.0.0",
"mocha": "^8.4.0",
"release-it": "^14.6.2"
},

@@ -29,0 +29,0 @@ "husky": {

@@ -11,3 +11,3 @@ export const PropertiesChangedCallback = (SuperClass) => class extends SuperClass {

if(!this.__changedProperties.has(propName)) this.__changedProperties.set(propName, oldValue);
window.requestAnimationFrame(this.constructor.__invokeCallback.bind(this));
window.setTimeout(this.constructor.__invokeCallback.bind(this));
}

@@ -14,0 +14,0 @@

@@ -55,3 +55,2 @@ export const ObservedProperties = (SuperClass) => class extends SuperClass {

if(oldValue === newValue) return;
try { if(JSON.stringify(oldValue) === JSON.stringify(newValue)) return; } catch(e) {};
this.propertyChangedCallback && this.propertyChangedCallback(propName, oldValue, newValue);

@@ -62,5 +61,7 @@ }

if(!obj) return;
return Object.getOwnPropertyDescriptor(obj, key) || this.__getPropertyDescriptor(Object.getPrototypeOf(obj), key)
const item = Object.getOwnPropertyDescriptor(obj, key);
if(item && !item.value) return item;
return this.__getPropertyDescriptor(Object.getPrototypeOf(obj), key);
}
};
export const ReflectedProperties = (SuperClass) => class extends SuperClass {
connectedCallback() {
super.connectedCallback();
for(var i in this.constructor.reflectedProperties) {

@@ -10,2 +9,3 @@ const propName = this.constructor.reflectedProperties[i];

}
super.connectedCallback();
}

@@ -28,3 +28,3 @@

const converter = converters[propName];
if(converter) value = converter.call(this, value)
if(converter) value = converter.call(this, value);
if(value === null || value === undefined) return this.removeAttribute(attrName);

@@ -31,0 +31,0 @@ this.setAttribute(attrName, value);

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