From db0717851d40734998b140bf0fb3310ac0a8e74a Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Mon, 22 Apr 2013 16:11:56 +0800 Subject: [PATCH] Simpler way of inheriting EventEmitter. --- browser/api/lib/window.coffee | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/browser/api/lib/window.coffee b/browser/api/lib/window.coffee index c8f2bd5..7532339 100644 --- a/browser/api/lib/window.coffee +++ b/browser/api/lib/window.coffee @@ -1,10 +1,7 @@ EventEmitter = require('events').EventEmitter Window = process.atom_binding('window').Window - -# Inherits EventEmitter. -for prop, func of EventEmitter.prototype - Window.prototype[prop] = func +Window.prototype.__proto__ = EventEmitter.prototype # Convient accessors. setupGetterAndSetter = (constructor, name, getter, setter) -> -- 2.7.4