@marcoms/make-element
Advanced tools
Comparing version 4.1.5 to 4.1.6
@@ -196,12 +196,6 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
const internalAttr = this._attrs[attrName]; | ||
// bind property methods to element context | ||
internalProp.toAttr = internalProp.toAttr.bind(this); | ||
internalProp.fromAttr = internalProp.fromAttr.bind(this); | ||
internalProp.get = internalProp.get.bind(this); | ||
internalProp.set = internalProp.set.bind(this); | ||
internalProp.coerce = internalProp.coerce.bind(this); | ||
Object.defineProperty(this, propName, { | ||
set(val) { | ||
let propVal = val; | ||
propVal = internalProp.coerce(propVal); | ||
propVal = internalProp.coerce.call(this, propVal); | ||
if (internalProp.settingInitialValue) { | ||
@@ -211,3 +205,3 @@ internalProp.settingInitialValue = false; | ||
internalProp.val = propVal; | ||
internalProp.set(propVal); | ||
internalProp.set.call(this, propVal); | ||
/* | ||
@@ -221,3 +215,3 @@ We only propagate from the property to the attribute if: | ||
if (hasLinkedAttr && !beingInitialized) { | ||
const attrVal = internalProp.toAttr(propVal); | ||
const attrVal = internalProp.toAttr.call(this, propVal); | ||
// prevent the attribute from reflowing back to the | ||
@@ -237,3 +231,3 @@ // property in attributeChangedCallback | ||
get() { | ||
const propVal = internalProp.get(internalProp.val); | ||
const propVal = internalProp.get.call(this, internalProp.val); | ||
return propVal; | ||
@@ -323,3 +317,3 @@ }, | ||
const internalProp = this._props[propName]; | ||
const propVal = internalProp.fromAttr(val); | ||
const propVal = internalProp.fromAttr.call(this, val); | ||
this[propName] = propVal; | ||
@@ -326,0 +320,0 @@ } |
{ | ||
"name": "@marcoms/make-element", | ||
"version": "4.1.5", | ||
"version": "4.1.6", | ||
"description": "Create custom elements without boilerplate", | ||
@@ -5,0 +5,0 @@ "main": "build/make-element.js", |
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
204096
1411