Emit 'page-title-updated' as javascript event for window.

This commit is contained in:
Cheng Zhao 2013-04-18 23:50:47 +08:00
parent 1309d04ca7
commit d3e4db7ba3
9 changed files with 82 additions and 4 deletions

View file

@ -1,5 +1,11 @@
EventEmitter = require('events').EventEmitter
Window = process.atom_binding('window').Window
# Inherits EventEmitter.
for prop, func of EventEmitter.prototype
Window.prototype[prop] = func
# Convient accessors.
setupGetterAndSetter = (constructor, name, getter, setter) ->
constructor.prototype.__defineGetter__ name, ->