projects
/
platform
/
framework
/
web
/
crosswalk-tizen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ae0c99
)
Simpler way of inheriting EventEmitter.
author
Cheng Zhao
<zcbenz@gmail.com>
Mon, 22 Apr 2013 08:11:56 +0000
(16:11 +0800)
committer
Cheng Zhao
<zcbenz@gmail.com>
Mon, 22 Apr 2013 08:11:56 +0000
(16:11 +0800)
browser/api/lib/window.coffee
patch
|
blob
|
history
diff --git
a/browser/api/lib/window.coffee
b/browser/api/lib/window.coffee
index
c8f2bd5
..
7532339
100644
(file)
--- 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) ->