Merge pull request #5986 from electron/doc-requires
Access remote from electron require
This commit is contained in:
commit
4ab6429f1d
2 changed files with 2 additions and 2 deletions
|
@ -76,7 +76,7 @@ exports.withLocalCallback = () => {
|
|||
|
||||
```javascript
|
||||
// 렌더러 프로세스
|
||||
const mapNumbers = require('remote').require('./mapNumbers');
|
||||
const mapNumbers = require('electron').remote.require('./mapNumbers');
|
||||
|
||||
const withRendererCb = mapNumbers.withRendererCallback(x => x + 1);
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ exports.withLocalCallback = () => {
|
|||
|
||||
```javascript
|
||||
// renderer process
|
||||
const mapNumbers = require('remote').require('./mapNumbers');
|
||||
const mapNumbers = require('electron').remote.require('./mapNumbers');
|
||||
|
||||
const withRendererCb = mapNumbers.withRendererCallback(x => x + 1);
|
||||
|
||||
|
|
Loading…
Reference in a new issue