Skip to content

Commit 136cf14

Browse files
committed
fixup! src: add Realm document in the src README.md
1 parent f0da57c commit 136cf14

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ heap. Node.js exposes this ability through the [`vm` module][].
265265
V8 refers to each of these global objects and their associated builtins as a
266266
`Context`.
267267
268-
Currently, in Node.js there is one main `Context` associated with an
268+
Currently, in Node.js there is one main `Context` associated with a
269269
[`Realm`][] instance, and most Node.js features will only work inside
270270
that context. (The only exception at the time of writing are
271271
[`MessagePort`][] objects.) This restriction is not inherent to the design of
@@ -278,7 +278,7 @@ Typical ways of accessing the current `Context` in the Node.js code are:
278278
* Given an [`Isolate`][], using `isolate->GetCurrentContext()`.
279279
* Given an [`Environment`][], using `env->context()` to get the `Environment`'s
280280
principal [`Realm`][]'s context.
281-
* Given an [`Realm`][], using `realm->context()` to get the `Realm`'s
281+
* Given a [`Realm`][], using `realm->context()` to get the `Realm`'s
282282
context.
283283
284284
<a id="event-loop"></a>
@@ -329,15 +329,15 @@ Typical ways of accessing the current `Environment` in the Node.js code are:
329329
### `Realm`
330330
331331
The `Realm` class is a container for a set of JavaScript objects and functions
332-
that associated with a particular ECMAScript global environment.
332+
that are associated with a particular ECMAScript global environment.
333333
334334
Every `Realm` instance is associated with a [`Context`][].
335335
336336
A `Realm` can be a principal realm or a synthetic realm. A principal realm is
337337
created with an `Environment` as its principal global environment to evaluate
338338
scripts. A synthetic realm is created with JS APIs like `ShadowRealm`.
339339
340-
Native bindings and builtin modules can be evaluated in either a principal
340+
Native bindings and built-in modules can be evaluated in either a principal
341341
realm or a synthetic realm.
342342
343343
The `Realm` class contains a large number of different fields for
@@ -744,7 +744,7 @@ any resources owned by it, e.g. memory or libuv requests/handles.
744744
#### Cleanup hooks
745745

746746
Cleanup hooks are provided that run before the [`Environment`][] or the
747-
[`Realm`][] is destroyed. They can be added and removed through by using
747+
[`Realm`][] is destroyed. They can be added and removed by using
748748
`env->AddCleanupHook(callback, hint);` and
749749
`env->RemoveCleanupHook(callback, hint);`, or
750750
`realm->AddCleanupHook(callback, hint);` and

0 commit comments

Comments
 (0)