#1342 update m.route.link target if href changes
This commit is contained in:
parent
0e918f14c2
commit
40251c6c16
7 changed files with 153 additions and 44 deletions
|
|
@ -60,6 +60,10 @@ module.exports = function() {
|
|||
}
|
||||
}
|
||||
}
|
||||
function getAttribute(name) {
|
||||
if (this.attributes[name] == null) return null
|
||||
return this.attributes[name].nodeValue
|
||||
}
|
||||
function setAttribute(name, value) {
|
||||
var nodeValue = String(value)
|
||||
this.attributes[name] = {
|
||||
|
|
@ -146,6 +150,7 @@ module.exports = function() {
|
|||
appendChild: appendChild,
|
||||
removeChild: removeChild,
|
||||
insertBefore: insertBefore,
|
||||
getAttribute: getAttribute,
|
||||
setAttribute: setAttribute,
|
||||
setAttributeNS: setAttributeNS,
|
||||
removeAttribute: removeAttribute,
|
||||
|
|
|
|||
|
|
@ -313,6 +313,15 @@ o.spec("domMock", function() {
|
|||
})
|
||||
})
|
||||
|
||||
o.spec("getAttribute", function() {
|
||||
o("works", function() {
|
||||
var div = $document.createElement("div")
|
||||
div.setAttribute("id", "aaa")
|
||||
|
||||
o(div.getAttribute("id")).equals("aaa")
|
||||
})
|
||||
})
|
||||
|
||||
o.spec("setAttribute", function() {
|
||||
o("works", function() {
|
||||
var div = $document.createElement("div")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue