Skip to content

Commit 40b3e43

Browse files
Edited ch06.asciidoc with Atlas code editor
1 parent 1d6cd4a commit 40b3e43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ch06.asciidoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1018,7 +1018,7 @@ proxy.setPrototypeOf(proxy, base)
10181018
// <- Error: Changing the prototype is forbidden
10191019
----
10201020

1021-
In these cases, it's best to fail with an exception so that consumers can understand what is going on. By explicitly disallowing prototype changes, the consumer can start looking elsewhere. If we didn't throw an exception, the consumer could still eventually learn that the prototype isn't changing through debugging. You might as well save them ((("setPrototypeOf trap", startref="sptot6")))((("traps", "setPrototypeOf", startref="t6spto")))((("proxies", "setPrototypeOf trap", startref="prox6sptot")))from that pain!
1021+
In these cases, it's best to fail with an exception so that consumers can understand what is going on. By explicitly disallowing prototype changes, the consumer can start looking elsewhere. If we didn't throw an exception, the consumer could still eventually learn that the prototype isn't changing through debugging. You might as well save them ((("setPrototypeOf trap", startref="sptot6")))((("traps", "setPrototypeOf trap", startref="t6spto")))((("proxies", "setPrototypeOf trap", startref="prox6sptot")))from that pain!
10221022

10231023
==== preventExtensions Trap
10241024

0 commit comments

Comments
 (0)