Typos
2 small fixes
This commit is contained in:
parent
340ce43421
commit
74caa865f3
1 changed files with 2 additions and 2 deletions
|
@ -840,7 +840,7 @@ So there's no such problem when proxying an array.
|
|||
|
||||
### Private fields
|
||||
|
||||
The similar thing happens with private class fields.
|
||||
A similar thing happens with private class fields.
|
||||
|
||||
For example, `getName()` method accesses the private `#name` property and breaks after proxying:
|
||||
|
||||
|
@ -963,7 +963,7 @@ revoke();
|
|||
alert(proxy.data); // Error
|
||||
```
|
||||
|
||||
A call to `revoke()` removes all internal references to the target object from the proxy, so they are no more connected. The target object can be garbage-collected after that.
|
||||
A call to `revoke()` removes all internal references to the target object from the proxy, so they are no longer connected. The target object can be garbage-collected after that.
|
||||
|
||||
We can also store `revoke` in a `WeakMap`, to be able to easily find it by a proxy object:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue