Deprecate ajax "global" event behavior
Currently the ajax events are "global" events in that they will fire on any element, e.g., $(".anything").ajaxStart(fn)
. The element doesn't even need to be attached to the DOM! This requires us to do some expensive bookkeeping and special-case code.
As of jQuery 1.8, the docs should encourage users to attach ajax events only to document
. In 1.9 we can have them only fire on document
, with a plugin for backcompat.
Change History (4)
Component: |
unfiled →
event
|
Milestone: |
None →
1.8
|
Priority: |
undecided →
blocker
|
Status: |
new →
open
|
Owner: |
set to dmethvin
|
Status: |
open →
assigned
|
Keywords: |
needsdocs added
|
Resolution: |
→ fixed
|
Status: |
assigned →
closed
|
Keywords: |
needsdocs removed
|
Although the ajax events are the only ones in the public API to be global events, the event subsystem allows any caller to trigger a global event by passing a
null
tojQuery.event.trigger
(which isn't a public API). So this is deprecating both some ajax behavior and an internal event feature.