Skip to main content

Bug Tracker

Side navigation

#11717 closed bug (fixed)

Opened May 07, 2012 02:37PM UTC

Closed August 10, 2012 05:52PM UTC

Last modified October 15, 2012 09:55PM UTC

Deprecate ajax "global" event behavior

Reported by: dmethvin Owned by: dmethvin
Priority: blocker Milestone: 1.8
Component: event Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:

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.

Attachments (0)
Change History (4)

Changed May 07, 2012 02:38PM UTC by dmethvin comment:1

component: unfiledevent
milestone: None1.8
priority: undecidedblocker
status: newopen

Changed May 07, 2012 02:42PM UTC by dmethvin comment:2

owner: → dmethvin
status: openassigned

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 to jQuery.event.trigger (which isn't a public API). So this is deprecating both some ajax behavior and an internal event feature.

Changed August 10, 2012 05:52PM UTC by dmethvin comment:3

keywords: → needsdocs
resolution: → fixed
status: assignedclosed

Changed October 15, 2012 09:55PM UTC by mikesherov comment:4

keywords: needsdocs