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

Unified Diff: ui/webui/resources/js/cr/event_target.js

Issue 618133002: All changes to ui/webui/ from bookmarks CL that block other CLs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@true_master
Patch Set: add var Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/webui/resources/js/cr/link_controller.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/webui/resources/js/cr/event_target.js
diff --git a/ui/webui/resources/js/cr/event_target.js b/ui/webui/resources/js/cr/event_target.js
index 0d6fbd58adef11a886e548167ea7cd59456e0613..6a73f1ff95a8b9d8a9adebfdadc797385b10763c 100644
--- a/ui/webui/resources/js/cr/event_target.js
+++ b/ui/webui/resources/js/cr/event_target.js
@@ -7,6 +7,11 @@
* as defined by DOM Level 2 Events.
*/
+/**
+ * @typedef {EventListener|function(!Event):(boolean|undefined)}
+ */
+var EventListenerType;
+
cr.define('cr', function() {
/**
@@ -23,8 +28,8 @@ cr.define('cr', function() {
/**
* Adds an event listener to the target.
* @param {string} type The name of the event.
- * @param {!Function|{handleEvent:Function}} handler The handler for the
- * event. This is called when the event is dispatched.
+ * @param {EventListenerType} handler The handler for the event. This is
+ * called when the event is dispatched.
*/
addEventListener: function(type, handler) {
if (!this.listeners_)
@@ -41,8 +46,7 @@ cr.define('cr', function() {
/**
* Removes an event listener from the target.
* @param {string} type The name of the event.
- * @param {!Function|{handleEvent:Function}} handler The handler for the
- * event.
+ * @param {EventListenerType} handler The handler for the event.
*/
removeEventListener: function(type, handler) {
if (!this.listeners_)
« no previous file with comments | « no previous file | ui/webui/resources/js/cr/link_controller.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698