Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 08a9aa3

Browse filesBrowse files
lpincaevanlucas
authored andcommitted
doc: fix broken link in vm.md
PR-URL: #7304 Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Claudio Rodriguez <cjrodr@yahoo.com> Reviewed-By: Roman Reiss <me@silverwind.io>
1 parent 12fbac1 commit 08a9aa3
Copy full SHA for 08a9aa3

File tree

Expand file treeCollapse file tree

1 file changed

+8
-8
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-8
lines changed
Open diff view settings
Collapse file

‎doc/api/vm.md‎

Copy file name to clipboardExpand all lines: doc/api/vm.md
+8-8Lines changed: 8 additions & 8 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -202,12 +202,12 @@ added: v0.3.1
202202
* `sandbox` {Object}
203203

204204
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.
211211

212212
If `sandbox` is omitted (or passed explicitly as `undefined`), a new, empty
213213
[contextified][] sandbox object will be returned.
@@ -384,7 +384,7 @@ console.log('localVar: ', localVar);
384384
Because `vm.runInThisContext()` does not have access to the local scope,
385385
`localVar` is unchanged. In contrast, [`eval()`][] *does* have access to the
386386
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.
388388
`(0,eval)('code')`.
389389

390390
## Example: Running an HTTP Server within a VM
@@ -415,7 +415,7 @@ let code =
415415
})`;
416416

417417
vm.runInThisContext(code)(require);
418-
```
418+
```
419419

420420
*Note*: The `require()` in the above case shares the state with context it is
421421
passed from. This may introduce risks when untrusted code is executed, e.g.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.