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

Unified Diff: chrome/renderer/resources/extensions/event.js

Issue 10826295: Revert 151420 - Add documentation for filtered events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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
Index: chrome/renderer/resources/extensions/event.js
===================================================================
--- chrome/renderer/resources/extensions/event.js (revision 151420)
+++ chrome/renderer/resources/extensions/event.js (working copy)
@@ -158,15 +158,6 @@
return result;
};
- // Adds keys in |src| that aren't present in |dest| to |dest|.
- function merge(dest, src) {
- for (var k in src) {
- if (!dest.hasOwnProperty(k)) {
- dest[k] = src[k];
- }
- }
- }
-
// Event object. If opt_eventName is provided, this object represents
// the unique instance of that named event, and dispatching an event
// with that name will route through this object's listeners. Note that
@@ -183,12 +174,11 @@
chrome.Event = function(opt_eventName, opt_argSchemas, opt_eventOptions) {
this.eventName_ = opt_eventName;
this.listeners_ = [];
- this.eventOptions_ = opt_eventOptions || {};
- merge(this.eventOptions_,
+ this.eventOptions_ = opt_eventOptions ||
{supportsFilters: false,
supportsListeners: true,
supportsRules: false,
- });
+ };
if (this.eventOptions_.supportsRules && !opt_eventName)
throw new Error("Events that support rules require an event name.");

Powered by Google App Engine
This is Rietveld 408576698