Update refresh and handle attributes without values #67

Merged
compressed merged 2 commits from refresh into master 2016-06-28 00:17:43 -05:00
Showing only changes of commit bf71894395 - Show all commits

View File

@@ -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))
}
})
}
}