fix svg class updates
This commit is contained in:
parent
6ff63b224c
commit
693c87f5f1
6 changed files with 82 additions and 40 deletions
|
|
@ -151,6 +151,13 @@ module.exports = function() {
|
|||
}
|
||||
}
|
||||
},
|
||||
get className() {
|
||||
return this.attributes["class"] ? this.attributes["class"].nodeValue : ""
|
||||
},
|
||||
set className(value) {
|
||||
if (this.namespaceURI === "http://www.w3.org/2000/svg") throw new Error("Cannot set property className of SVGElement")
|
||||
else this.setAttribute("class", value)
|
||||
},
|
||||
focus: function() {activeElement = this},
|
||||
addEventListener: function(type, callback, useCapture) {
|
||||
if (events[type] == null) events[type] = [callback]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue