Skip to content

Commit

Permalink
fix: address issues with unsupoprted shadow DOM attributes
Browse files Browse the repository at this point in the history
BREAKING CHANGE: this update removes native button form attributes as
they are unable to be used outside the scope of the shadow DOM
  • Loading branch information
blackfalcon committed Aug 25, 2020
1 parent ab16495 commit 4ad5483
Showing 1 changed file with 6 additions and 19 deletions.
25 changes: 6 additions & 19 deletions src/auro-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,11 @@ class AuroButton extends LitElement {
return {
autofocus: { type: Boolean },
disabled: { type: Boolean },
formnovalidate: { type: Boolean },
ondark: { type: Boolean },
secondary: { type: Boolean },
tertiary: { type: Boolean },
arialabel: { type: String },
arialabelledby: { type: String },
form: { type: String },
formaction: { type: String },
formenctype: { type: String },
formmethod: { type: String },
formtarget: { type: String },
id: { type: String },
name: { type: String },
title: { type: String },
Expand All @@ -45,13 +39,6 @@ class AuroButton extends LitElement {
this.renderRoot.querySelector('button').focus();
}

// getIcon(svgIcon) {
// this.dom = new DOMParser().parseFromString(svgIcon, 'text/html');
// this.svg = this.dom.body.firstChild;

// return this.svg;
// }

render() {

const classes = {
Expand All @@ -71,12 +58,12 @@ class AuroButton extends LitElement {
?autofocus="${this.autofocus}"
class="${classMap(classes)}"
?disabled="${this.disabled}"
form="${ifDefined(this.form ? this.form : undefined)}"
formaction="${ifDefined(this.formaction ? this.formaction : undefined)}"
formenctype="${ifDefined(this.formenctype ? this.formenctype : undefined)}"
formmethod="${ifDefined(this.formmethod ? this.formmethod : undefined)}"
?formnovalidate="${this.formnovalidate}"
formtarget="${ifDefined(this.formtarget ? this.formtarget : undefined)}"
id="${ifDefined(this.id ? this.id : undefined)}"
title="${ifDefined(this.title ? this.title : undefined)}"
name="${ifDefined(this.name ? this.name : undefined)}"
Expand Down

0 comments on commit 4ad5483

Please sign in to comment.