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

Side by Side Diff: chrome/tools/test/reference_build/chrome_linux/resources/bookmark_manager/js/cr/event.js

Issue 877003: Updating the Chromium reference build on Linux. The continuous build... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: 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
Property Changes:
Name: svn:eol-style
+ LF
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

Powered by Google App Engine
This is Rietveld 408576698