A spot of cleanup
This commit is contained in:
parent
c5c5a71587
commit
92652262f3
1 changed files with 4 additions and 1 deletions
|
|
@ -28,9 +28,13 @@ export class DotDungeonIncrementer extends HTMLElement {
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
this._shadow = this.attachShadow({ mode: `open`, delegatesFocus: true });
|
this._shadow = this.attachShadow({ mode: `open`, delegatesFocus: true });
|
||||||
|
if (DotDungeonIncrementer.#styles) this.#embedStyles();
|
||||||
|
|
||||||
|
// Form internals
|
||||||
this._internals = this.attachInternals();
|
this._internals = this.attachInternals();
|
||||||
this._internals.role = `spinbutton`;
|
this._internals.role = `spinbutton`;
|
||||||
|
|
||||||
|
// Attribute parsing / registration
|
||||||
const value = this.getAttribute(`value`);
|
const value = this.getAttribute(`value`);
|
||||||
this._min = parseInt(this.getAttribute(`min`) ?? 0);
|
this._min = parseInt(this.getAttribute(`min`) ?? 0);
|
||||||
this._max = parseInt(this.getAttribute(`max`) ?? 0);
|
this._max = parseInt(this.getAttribute(`max`) ?? 0);
|
||||||
|
|
@ -41,7 +45,6 @@ export class DotDungeonIncrementer extends HTMLElement {
|
||||||
this._internals.ariaValueMax = this._max;
|
this._internals.ariaValueMax = this._max;
|
||||||
|
|
||||||
const container = document.createElement(`div`);
|
const container = document.createElement(`div`);
|
||||||
if (DotDungeonIncrementer.#styles) this.#embedStyles();
|
|
||||||
|
|
||||||
// The input that the user can see / modify
|
// The input that the user can see / modify
|
||||||
const input = document.createElement(`input`);
|
const input = document.createElement(`input`);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue