add docs for SVG, and better tests
This commit is contained in:
parent
1aef5dd942
commit
5c9f9d782f
9 changed files with 100 additions and 9 deletions
|
|
@ -20,6 +20,7 @@ mock.window = new function() {
|
|||
this[name] = value.toString()
|
||||
},
|
||||
setAttributeNS: function(namespace, name, value) {
|
||||
this.namespaceURI = namespace
|
||||
this[name] = value.toString()
|
||||
},
|
||||
getAttribute: function(name, value) {
|
||||
|
|
@ -28,7 +29,9 @@ mock.window = new function() {
|
|||
}
|
||||
}
|
||||
window.document.createElementNS = function(namespace, tag) {
|
||||
return window.document.createElement(tag)
|
||||
var element = window.document.createElement(tag)
|
||||
element.namespaceURI = namespace
|
||||
return element
|
||||
}
|
||||
window.document.createTextNode = function(text) {
|
||||
return {nodeValue: text.toString()}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue