Last modified: 2014-02-12 23:53:13 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T46128, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 44128 - Don't bind events to $( window ) object
Don't bind events to $( window ) object
Status: RESOLVED FIXED
Product: MobileFrontend
Classification: Unclassified
stable (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Jon
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-18 23:41 UTC by Juliusz Gonera
Modified: 2014-02-12 23:53 UTC (History)
10 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Juliusz Gonera 2013-01-18 23:41:52 UTC
Currently we bind all our application events to the $( window ) object. Instead, we should create a wrapper around the jQuery events mechanism and bind events to a separate JavaScript object as described in the following blog posts:

http://clock.co.uk/tech-blogs/use-jquery-events-on-plain-javascript-objects
http://james.padolsey.com/javascript/jquery-eventemitter/

This will allow us to drop the "mw-mf-" prefix from event names as there will be no possibility of other external JavaScript code binding events to the same object.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links