@@ -202,12 +202,12 @@ added: v0.3.1
202
202
* ` sandbox ` {Object}
203
203
204
204
If given a ` sandbox ` object, the ` vm.createContext() ` method will [ prepare
205
- that sandbox] [ #vm_what_does_it_mean_to_contextify_an_object ] so that it can be
206
- used in calls to [ ` vm.runInContext() ` ] [ ] or [ ` script.runInContext() ` ] [ ] . Inside
207
- such scripts, the ` sandbox ` object will be the global object, retaining all of
208
- its existing properties but also having the built-in objects and functions any
209
- standard [ global object] [ ] has. Outside of scripts run by the vm module,
210
- ` sandbox ` will remain unchanged.
205
+ that sandbox] [ contextified ] so that it can be used in calls to
206
+ [ ` vm.runInContext() ` ] [ ] or [ ` script.runInContext() ` ] [ ] . Inside such scripts,
207
+ the ` sandbox ` object will be the global object, retaining all of its existing
208
+ properties but also having the built-in objects and functions any standard
209
+ [ global object] [ ] has. Outside of scripts run by the vm module, ` sandbox ` will
210
+ remain unchanged.
211
211
212
212
If ` sandbox ` is omitted (or passed explicitly as ` undefined ` ), a new, empty
213
213
[ contextified] [ ] sandbox object will be returned.
@@ -384,7 +384,7 @@ console.log('localVar: ', localVar);
384
384
Because ` vm.runInThisContext() ` does not have access to the local scope,
385
385
` localVar ` is unchanged. In contrast, [ ` eval() ` ] [ ] * does* have access to the
386
386
local scope, so the value ` localVar ` is changed. In this way
387
- ` vm.runInThisContext() ` is much like an [ indirect ` eval() ` call] [ ] , e.g.
387
+ ` vm.runInThisContext() ` is much like an [ indirect ` eval() ` call] [ ] , e.g.
388
388
` (0,eval)('code') ` .
389
389
390
390
## Example: Running an HTTP Server within a VM
@@ -415,7 +415,7 @@ let code =
415
415
})` ;
416
416
417
417
vm .runInThisContext (code)(require);
418
- ```
418
+ ```
419
419
420
420
* Note* : The ` require() ` in the above case shares the state with context it is
421
421
passed from. This may introduce risks when untrusted code is executed, e.g.
0 commit comments