再次小修订一下

This commit is contained in:
枫谷剑仙 2022-08-04 20:37:06 +08:00
parent 2e9cc2713a
commit 3224779f6f
1 changed files with 3 additions and 3 deletions

View File

@ -84,7 +84,7 @@ class CustomTokenList extends Array {
if (!this.#attribute) {
this.#node.setAttributeNode(document.createAttribute(this.#attributeName));
}
this.#attribute.value = this.join(' ');
this.#attribute.value = this.value;
this.#observer.observe(this.#node, this.#observerOptions); //恢复绑定
}
return;
@ -104,7 +104,7 @@ class CustomTokenList extends Array {
if (this.#refreshAttribute) {
this.#observer.disconnect(); //解除绑定
this.#attribute.value = this.join(' ');
this.#attribute.value = this.value;
this.#observer.observe(this.#node, this.#observerOptions); //恢复绑定
}
return;
@ -151,7 +151,7 @@ class CustomTokenList extends Array {
this.splice(index,1, newToken);
if (this.#refreshAttribute) {
this.#observer.disconnect(); //解除绑定
this.#attribute.value = this.join(' ');
this.#attribute.value = this.value;
this.#observer.observe(this.#node, this.#observerOptions); //恢复绑定
}
return true;