super-media-element
Advanced tools
Comparing version 1.1.2 to 1.1.3
{ | ||
"name": "super-media-element", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "Helps you create a custom element w/ a HTMLMediaElement API.", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -111,3 +111,5 @@ /** | ||
const observedAttributes = this.observedAttributes; | ||
const propsToAttrs = new Set(this.observedAttributes); | ||
// defaultMuted maps to the muted attribute, handled manually below. | ||
propsToAttrs.delete('muted'); | ||
@@ -143,3 +145,3 @@ // Passthrough native el functions from the custom el to the native el | ||
let attr = prop.toLowerCase(); | ||
if (observedAttributes.includes(attr)) { | ||
if (propsToAttrs.has(attr)) { | ||
const val = this.getAttribute(attr); | ||
@@ -166,3 +168,3 @@ return val === null ? false : val === '' ? true : val; | ||
let attr = prop.toLowerCase(); | ||
if (observedAttributes.includes(attr)) { | ||
if (propsToAttrs.has(attr)) { | ||
if (val === true || val === false || val == null) { | ||
@@ -169,0 +171,0 @@ this.toggleAttribute(attr, Boolean(val)); |
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
17567
391