Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(837)

Side by Side Diff: resources/bookmark_manager/js/cr/event.js

Issue 853002: Updating the Chromium reference build for Windows. The continuous... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/reference_builds/chrome/
Patch Set: Added the symbol files back. Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « resources/bookmark_manager/js/cr.js ('k') | resources/bookmark_manager/js/cr/eventtarget.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /**
6 * @fileoverview This is a simple pure JS event class that can be used with
7 * {@code cr.ui.EventTarget}. It should not be used with DOM EventTargets.
8 */
9
10 cr.define('cr', function() {
11
12 // cr.Event is called CustomEvent in here to prevent naming conflicts. We
13 // alse store the original Event in case someone does a global alias of
14 // cr.Event.
15
16 const DomEvent = Event;
17
18 /**
19 * Creates a new event to be used with cr.EventTarget or DOM EventTarget
20 * objects.
21 * @param {string} type The name of the event.
22 * @param {boolean=}
23 * @constructor
24 */
25 function CustomEvent(type, opt_bubbles, opt_capture) {
26 var e = cr.doc.createEvent('Event');
27 e.initEvent(type, !!opt_bubbles, !!opt_capture);
28 e.__proto__ = CustomEvent.prototype;
29 return e;
30 }
31
32 CustomEvent.prototype = {
33 __proto__: DomEvent.prototype
34 };
35
36 // Export
37 return {
38 Event: CustomEvent
39 };
40 });
OLDNEW
« no previous file with comments | « resources/bookmark_manager/js/cr.js ('k') | resources/bookmark_manager/js/cr/eventtarget.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698