Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/filterNotifier.js

Issue 29746555: Issue 6564 - Replace desc and extend with __proto__ (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created April 8, 2018, 8:57 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/filterClasses.js ('k') | lib/subscriptionClasses.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/filterNotifier.js
===================================================================
--- a/lib/filterNotifier.js
+++ b/lib/filterNotifier.js
@@ -18,32 +18,33 @@
"use strict";
/**
* @fileOverview This component manages listeners and calls them to distributes
* messages about filter changes.
*/
const {EventEmitter} = require("./events");
-const {desc} = require("./coreUtils");
const CATCH_ALL = "__all";
/**
* @callback FilterNotifierCatchAllListener
* @param {string} action
* @param {Subscription|Filter} item
* @param {...*} additionalInfo
*/
/**
* This class allows registering and triggering listeners for filter events.
* @class
*/
-exports.FilterNotifier = Object.create(new EventEmitter(), desc({
+exports.FilterNotifier = {
+ __proto__: new EventEmitter(),
+
/**
* Adds a listener
*
* @deprecated use FilterNotifier.on(action, callback)
* @param {FilterNotifierCatchAllListener} listener
*/
addListener(listener)
{
@@ -78,9 +79,9 @@
* @param {*} param3
* @deprecated use FilterNotifier.emit(action)
*/
triggerListeners(action, item, param1, param2, param3)
{
this.emit(action, item, param1, param2, param3);
this.emit(CATCH_ALL, action, item, param1, param2, param3);
}
-}));
+};
« no previous file with comments | « lib/filterClasses.js ('k') | lib/subscriptionClasses.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld