Update refresh and handle attributes without values #67
7
index.js
7
index.js
@@ -94,7 +94,12 @@ Pjax.prototype = {
|
||||
matches.shift()
|
||||
matches.forEach(function(htmlAttrib) {
|
||||
var attr = htmlAttrib.trim().split("=")
|
||||
tmpEl.documentElement.setAttribute(attr[0], attr[1].slice(1, -1))
|
||||
if (attr.length === 1) {
|
||||
tmpEl.documentElement.setAttribute(attr[0], true)
|
||||
}
|
||||
else {
|
||||
tmpEl.documentElement.setAttribute(attr[0], attr[1].slice(1, -1))
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,3 @@
|
||||
|
||||
var parseDom = require("./parse-dom")
|
||||
|
||||
module.exports = function(el) {
|
||||
parseDom(el || document)
|
||||
this.parseDOM(el || document)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user