Relocate all the things
This commit is contained in:
14
lib/proto/parse-element.js
Normal file
14
lib/proto/parse-element.js
Normal file
@@ -0,0 +1,14 @@
|
||||
module.exports = function(el) {
|
||||
switch (el.tagName.toLowerCase()) {
|
||||
case "a":
|
||||
this.attachLink(el)
|
||||
break
|
||||
|
||||
case "form":
|
||||
throw "Pjax doesnt support <form> yet."
|
||||
break
|
||||
|
||||
default:
|
||||
throw "Pjax can only be applied on <a> or <form> submit"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user