]> khamidou — GitHub mirrors - electron.git/commitdiff
Update process.md
authorEran Tiktin <eran.t@mce-sys.com>
Mon, 5 Oct 2015 13:51:49 +0000 (16:51 +0300)
committerEran Tiktin <eran.t@mce-sys.com>
Mon, 5 Oct 2015 13:51:49 +0000 (16:51 +0300)
Fixed the `loaded` example according to
[this](https://github.com/atom/electron/issues/2984#issuecomment-145465907)
comment.

docs/api/process.md

index 4e0fa4d602ef21d8eb3489bd28b1d4b30e7927e8..a2157886bc61b1c2cdecfa2769dd224a0bca1dea 100644 (file)
@@ -21,9 +21,11 @@ the global scope when node integration is turned off:
 
 ```js
 // preload.js
+var _setImmediate = setImmediate;
+var _clearImmediate = clearImmediate;
 process.once('loaded', function() {
-  global.setImmediate = setImmediate;
-  global.clearImmediate = clearImmediate;
+  global.setImmediate = _setImmediate;
+  global.clearImmediate = _clearImmediate;
 });
 ```