Pass the element that triggered Pjax to the pjax:send event

Closes #62.
This commit is contained in:
Behind The Math committed 2017-12-21 00:15:42 -05:00
1 parent 0916c74171
commit f58490867c
2 files changed
+7 -2

No files matched your search

+3 -1
View File
@@ -60,7 +60,9 @@ var formAction = function(el, event){
el.setAttribute(attrClick, "submit");
this.loadUrl(virtLinkElement.href, clone(this.options))
const options = clone(this.options);
options.triggerElement = el;
this.loadUrl(virtLinkElement.href, options);
};
+4 -1
View File
@@ -53,7 +53,10 @@ var linkAction = function(el, event) {
}
this.options.requestOptions = this.options.requestOptions || {};
el.setAttribute(attrClick, "load")
this.loadUrl(el.href, clone(this.options))
const options = clone(this.options)
options.triggerElement = el
this.loadUrl(el.href, options)
}
var isDefaultPrevented = function(event) {