Browse Source

将 CustomTokenList 实装到 pad-icon 里

tags/v24.9
枫谷剑仙 3 years ago
parent
commit
7cc2d7cb5b
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      script-custom_elements.js

+ 3
- 0
script-custom_elements.js View File

@@ -295,6 +295,8 @@ class PadIcon extends HTMLElement {
'flags', //各种选项开关,类似className
];
}
#flags = null;
get flagsList() { return this.#flags; }
#number = 0;
#type = 'awoken';
#iconType = null;
@@ -327,6 +329,7 @@ class PadIcon extends HTMLElement {
constructor() {
// Always call super first in constructor
super();
this.#flags = new CustomTokenList(this, "flags");
// Create a shadow root
const shadow = this.attachShadow({mode: 'open'});
// Create some CSS to apply to the shadow dom


Loading…
Cancel
Save