Skip to content

Commit 2c4aa2d

Browse files
author
wendy@lastlookeditorial.com
committed
Edited ch06.asciidoc with Atlas code editor
1 parent 8a3957a commit 2c4aa2d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ch06.asciidoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,7 @@ Up to what point is the abstraction justifiable over a few `.bind` statements in
852852

853853
==== construct Trap
854854

855-
The `construct` trap intercepts uses of the `new` operator. In the following code sample, we implement a custom `construct` trap that behaves identically to the `construct` trap. We use the spread operator, in combination with the `new` keyword, so that we can pass any arguments to the `Target` constructor.
855+
The `construct` trap ((("construct trap", id="t6")))((("traps", "construct trap", id="t6ct")))((("proxies", "construct trap", id="prox6ct")))intercepts uses of the `new` operator. In the following code sample, we implement a custom `construct` trap that behaves identically to the `construct` trap. We use the spread operator, in combination with the `new` keyword, so that we can pass any arguments to the `Target` constructor.
856856

857857
[source,javascript]
858858
----
@@ -912,7 +912,7 @@ proxy.hello()
912912
// <- 'Hello, Nicolás'
913913
----
914914

915-
Note that arrow functions can't be used as constructors, and thus we can't use the `construct` trap on them. Let's move onto the last few traps.
915+
Note that arrow functions can't be used as constructors, and thus we can't use the `construct` trap on them. Let's move onto the last ((("construct trap", startref="t6")))((("traps", "construct trap", startref="t6ct")))((("proxies", "construct trap", startref="prox6ct")))few traps.
916916

917917
==== getPrototypeOf Trap
918918

0 commit comments

Comments
 (0)