Bug Tracker

Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#11717 closed bug (fixed)

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:

Description

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)

comment:1 Changed 7 years ago by dmethvin

Component: unfiledevent
Milestone: None1.8
Priority: undecidedblocker
Status: newopen

comment:2 Changed 7 years ago by dmethvin

Owner: set to 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.

comment:3 Changed 7 years ago by dmethvin

Keywords: needsdocs added
Resolution: fixed
Status: assignedclosed

comment:4 Changed 6 years ago by mikesherov

Keywords: needsdocs removed
Note: See TracTickets for help on using tickets.