mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Simpler way of inheriting EventEmitter.
This commit is contained in:
@@ -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) ->
|
||||
|
||||
Reference in New Issue
Block a user