Process JS API requests through the document
Process JS API requests ($.request(handler, options)) through the document object instead of a non-existent form element. The form element was originally added because the framework only supported requests made from within a form ``` [22:08:12] spunky: The $triggerEl was implemented because previously it was just $form [22:08:24] spunky: For data-requests without a form, these events were being ignored [22:08:31] spunky: So as a workaround I implemented $triggerEl ``` As this is no longer the case, any JS API requests will now be made through the document element instead to support listening to events (such as ajaxSetup) even when there is no real attached element to trigger them on.
This commit is contained in:
parent
f7e80b2cb6
commit
37a735c8ed
|
|
@ -387,7 +387,7 @@ if (window.jQuery.request !== undefined) {
|
|||
$.fn.request.Constructor = Request
|
||||
|
||||
$.request = function(handler, option) {
|
||||
return $('<form />').request(handler, option)
|
||||
return $(document).request(handler, option)
|
||||
}
|
||||
|
||||
// REQUEST NO CONFLICT
|
||||
|
|
|
|||
Loading…
Reference in New Issue