@marcoms/make-element
Advanced tools
Comparing version 3.2.0 to 4.0.0
@@ -189,7 +189,4 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
let propVal = val; | ||
// we don't coerce the user-defined initial value from the attribute | ||
if (!internalProp.settingInitialValue) { | ||
propVal = internalProp.coerce(val); | ||
} | ||
else { | ||
propVal = internalProp.coerce(propVal); | ||
if (internalProp.settingInitialValue) { | ||
internalProp.settingInitialValue = false; | ||
@@ -201,11 +198,4 @@ } | ||
We only propagate from the property to the attribute if: | ||
- There is an attribute to propagate to | ||
- It is not the case where the property has not | ||
propagated and yet the attribute exists | ||
In the latter case the attribute has already been | ||
defined in the markup, so there is no need to propagate | ||
the property's value. Instead, the attribute value | ||
should propagate to the property in | ||
attributeChangedCallback. | ||
- A linked attribute was defined | ||
- The property setter is not being triggered by attributeChangedCallback | ||
*/ | ||
@@ -264,3 +254,3 @@ const beingInitialized = (this.hasAttribute(attrName) | ||
} | ||
if (def.cacheIds !== false) { | ||
if (def.cacheIds) { | ||
this.$ = {}; | ||
@@ -287,2 +277,3 @@ let elsWithIds; | ||
const internalProp = registeredProps[propName]; | ||
// if there is a value but the setter has not run | ||
if (internalProp.val !== undefined | ||
@@ -289,0 +280,0 @@ && internalProp.val !== null |
@@ -261,7 +261,4 @@ /******/ (function(modules) { // webpackBootstrap | ||
let propVal = val; | ||
// we don't coerce the user-defined initial value from the attribute | ||
if (!internalProp.settingInitialValue) { | ||
propVal = internalProp.coerce(val); | ||
} | ||
else { | ||
propVal = internalProp.coerce(propVal); | ||
if (internalProp.settingInitialValue) { | ||
internalProp.settingInitialValue = false; | ||
@@ -273,11 +270,4 @@ } | ||
We only propagate from the property to the attribute if: | ||
- There is an attribute to propagate to | ||
- It is not the case where the property has not | ||
propagated and yet the attribute exists | ||
In the latter case the attribute has already been | ||
defined in the markup, so there is no need to propagate | ||
the property's value. Instead, the attribute value | ||
should propagate to the property in | ||
attributeChangedCallback. | ||
- A linked attribute was defined | ||
- The property setter is not being triggered by attributeChangedCallback | ||
*/ | ||
@@ -336,3 +326,3 @@ const beingInitialized = (this.hasAttribute(attrName) | ||
} | ||
if (def.cacheIds !== false) { | ||
if (def.cacheIds) { | ||
this.$ = {}; | ||
@@ -359,2 +349,3 @@ let elsWithIds; | ||
const internalProp = registeredProps[propName]; | ||
// if there is a value but the setter has not run | ||
if (internalProp.val !== undefined | ||
@@ -361,0 +352,0 @@ && internalProp.val !== null |
{ | ||
"name": "@marcoms/make-element", | ||
"version": "3.2.0", | ||
"version": "4.0.0", | ||
"description": "Create custom elements without boilerplate", | ||
@@ -5,0 +5,0 @@ "main": "build/make-element.js", |
@@ -73,3 +73,3 @@ export interface ElementDef { | ||
interface InternalAttr extends RegisteredAttr {} | ||
type InternalAttr = RegisteredAttr; | ||
@@ -216,7 +216,5 @@ // utility functions | ||
// we don't coerce the user-defined initial value from the attribute | ||
propVal = internalProp.coerce(propVal); | ||
if (!internalProp.settingInitialValue) { | ||
propVal = internalProp.coerce(val); | ||
} else { | ||
if (internalProp.settingInitialValue) { | ||
internalProp.settingInitialValue = false; | ||
@@ -230,11 +228,4 @@ } | ||
We only propagate from the property to the attribute if: | ||
- There is an attribute to propagate to | ||
- It is not the case where the property has not | ||
propagated and yet the attribute exists | ||
In the latter case the attribute has already been | ||
defined in the markup, so there is no need to propagate | ||
the property's value. Instead, the attribute value | ||
should propagate to the property in | ||
attributeChangedCallback. | ||
- A linked attribute was defined | ||
- The property setter is not being triggered by attributeChangedCallback | ||
*/ | ||
@@ -304,3 +295,3 @@ | ||
if (def.cacheIds !== false) { | ||
if (def.cacheIds) { | ||
this.$ = {}; | ||
@@ -317,3 +308,2 @@ | ||
const castEl = el as HTMLElement; | ||
this.$[castEl.id] = castEl; | ||
@@ -334,2 +324,4 @@ } | ||
// if there is a value but the setter has not run | ||
if ( | ||
@@ -336,0 +328,0 @@ internalProp.val !== undefined |
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
131756
1146