html-element-property-mixins
Advanced tools
Comparing version 0.10.7 to 0.10.8
{ | ||
"name": "html-element-property-mixins", | ||
"version": "0.10.7", | ||
"version": "0.10.8", | ||
"description": "A collection of mixins extending HTMLElement with properties.", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -5,3 +5,3 @@ export const PropertiesChangedCallback = (SuperClass) => class extends SuperClass { | ||
super.propertyChangedCallback && super.propertyChangedCallback(propName, oldValue, newValue); | ||
if(!this.constructor.__changedProperties) this.constructor.__changedProperties = new Map(); | ||
if(!this.__changedProperties) this.__changedProperties = new Map(); | ||
this.constructor.__addChangedProperty.call(this, propName, oldValue); | ||
@@ -12,3 +12,3 @@ } | ||
window.cancelAnimationFrame(this.__propertiesChangedCallbackDebouncer); | ||
const changedProps = this.constructor.__changedProperties; | ||
const changedProps = this.__changedProperties; | ||
if(!changedProps.has(propName)) changedProps.set(propName, oldValue); | ||
@@ -21,7 +21,7 @@ this.__propertiesChangedCallbackDebouncer = window.requestAnimationFrame(this.constructor.__invokeCallback.bind(this)); | ||
const newValues = {}; | ||
this.constructor.__changedProperties.forEach((oldValue, propName) => oldValues[propName] = oldValue); | ||
this.constructor.__changedProperties.forEach((oldValue, propName) => newValues[propName] = this[propName]); | ||
this.__changedProperties.forEach((oldValue, propName) => oldValues[propName] = oldValue); | ||
this.__changedProperties.forEach((oldValue, propName) => newValues[propName] = this[propName]); | ||
const propNames = Object.keys(oldValues); | ||
this.constructor.__changedProperties.clear(); | ||
this.__changedProperties.clear(); | ||
this.propertiesChangedCallback && this.propertiesChangedCallback(propNames, oldValues, newValues); | ||
@@ -28,0 +28,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
44070