mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Add "electron" module
This commit is contained in:
17
atom/renderer/api/lib/exports/electron.coffee
Normal file
17
atom/renderer/api/lib/exports/electron.coffee
Normal file
@@ -0,0 +1,17 @@
|
||||
# Import common modules.
|
||||
module.exports = require '../../../../common/api/lib/exports/electron'
|
||||
|
||||
Object.defineProperties module.exports,
|
||||
# Renderer side modules, please sort with alphabet order.
|
||||
ipcRenderer:
|
||||
enumerable: true
|
||||
get: -> require '../ipc-renderer'
|
||||
remote:
|
||||
enumerable: true
|
||||
get: -> require '../remote'
|
||||
screen:
|
||||
enumerable: true
|
||||
get: -> require '../screen'
|
||||
webFrame:
|
||||
enumerable: true
|
||||
get: -> require '../web-frame'
|
||||
@@ -17,6 +17,7 @@ require path.resolve(__dirname, '..', '..', 'common', 'lib', 'init')
|
||||
# of Atom's built-in libraries.
|
||||
globalPaths = Module.globalPaths
|
||||
globalPaths.push path.resolve(__dirname, '..', 'api', 'lib')
|
||||
globalPaths.push path.resolve(__dirname, '..', 'api', 'lib', 'exports')
|
||||
|
||||
# The global variable will be used by ipc for event dispatching
|
||||
v8Util = process.atomBinding 'v8_util'
|
||||
|
||||
Reference in New Issue
Block a user