Skip to content

Commit 2b50aca

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

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ch06.asciidoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ While ((("proxies", "schema validation with", startref="prox6svw")))((("schema v
244244

245245
=== Revocable Proxies
246246

247-
Revocable proxies offer more fine-grained control than plain `Proxy` objects. The API is a bit different in that there is no `new` keyword involved, as opposed to `new Proxy(target, handler)`; and a `{ proxy, revoke }` object is returned, instead of just the `proxy` object being returned. Once `revoke()` is called, the `proxy` will throw an error on any operation.
247+
Revocable ((("proxies", "revokable", id="prox6r")))((("revokable proxies", id="rp6")))proxies offer more fine-grained control than plain `Proxy` objects. The API is a bit different in that there is no `new` keyword involved, as opposed to `new Proxy(target, handler)`; and a `{ proxy, revoke }` object is returned, instead of just the `proxy` object being returned. Once `revoke()` is called, the `proxy` will throw an error on any operation.
248248

249249
Let's go back to our pass-through `Proxy` example and make it revocable. Note how we're no longer using `new`, how calling `revoke()` over and over has no effect, and how an error is thrown if we attempt to interact with the underlying object in any way.
250250

@@ -285,7 +285,7 @@ function revokeStorage(proxy) {
285285
}
286286
----
287287

288-
Given that `revoke` is available on the same scope where your `handler` traps are defined, you could set up unforgiving access rules such that if a consumer attempts to access a private property more than once you revoke their `proxy` access entirely.
288+
Given that `revoke` is available on the same scope where your `handler` traps are defined, you could set up unforgiving access rules such that if a consumer attempts to access a private property more than once you revoke their `proxy` ((("proxies", "revokable", startref="prox6r")))((("revokable proxies", startref="rp6")))access entirely.
289289

290290
=== Proxy Trap Handlers
291291

0 commit comments

Comments
 (0)