mirror of
https://github.com/electron/electron.git
synced 2026-05-02 03:00:22 -04:00
12 lines
358 B
CoffeeScript
12 lines
358 B
CoffeeScript
binding = process.atomBinding 'screen'
|
|
|
|
checkAppIsReady = ->
|
|
unless process.type is 'renderer' or require('app').isReady()
|
|
throw new Error('Can not use screen module before the "ready" event of app module gets emitted')
|
|
|
|
for name, _ of binding
|
|
do (name) ->
|
|
module.exports[name] = (args...) ->
|
|
checkAppIsReady()
|
|
binding[name](args...)
|