Merge pull request #5986 from electron/doc-requires

Access remote from electron require
This commit is contained in:
Kevin Sawicki 2016-06-10 10:27:57 -07:00 committed by GitHub
commit 4ab6429f1d
2 changed files with 2 additions and 2 deletions

View file

@ -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);

View file

@ -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);