Bug Tracker

Modify

Ticket #11717 (closed bug: fixed)

Opened 13 months ago

Last modified 7 months ago

Deprecate ajax "global" event behavior

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

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

comment:1 Changed 13 months ago by dmethvin

  • Priority changed from undecided to blocker
  • Status changed from new to open
  • Component changed from unfiled to event
  • Milestone changed from None to 1.8

comment:2 Changed 13 months ago by dmethvin

  • Owner set to dmethvin
  • Status changed from open to assigned

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 10 months ago by dmethvin

  • Keywords needsdocs added
  • Status changed from assigned to closed
  • Resolution set to fixed

comment:4 Changed 7 months ago by mikesherov

  • Keywords needsdocs removed

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.