remove attributes correctly
This commit is contained in:
1 parent
fe1279a1c5
commit
38de26d0e4
1 file changed
+3
-1
@@ -140,7 +140,9 @@ export class Interpreter {
|
|||||||
RemoveAttribute(root, field, ns) {
|
RemoveAttribute(root, field, ns) {
|
||||||
const name = field;
|
const name = field;
|
||||||
const node = this.nodes[root];
|
const node = this.nodes[root];
|
||||||
if (ns !== null || ns !== undefined) {
|
if (ns == "style") {
|
||||||
|
node.style.removeProperty(name);
|
||||||
|
} else if (ns !== null || ns !== undefined) {
|
||||||
node.removeAttributeNS(ns, name);
|
node.removeAttributeNS(ns, name);
|
||||||
} else if (name === "value") {
|
} else if (name === "value") {
|
||||||
node.value = "";
|
node.value = "";
|
||||||
|
|||||||
Reference in new issue
Block a user