Update docs/src/api/class-page.md
Co-authored-by: Max Schmitt <max@schmitt.mx> Signed-off-by: Dmitry Gozman <dgozman@gmail.com>
This commit is contained in:
parent
480e5a2581
commit
871769e473
|
|
@ -2364,7 +2364,7 @@ await page.evaluate("globalThis.suspectWeakRef = new WeakRef(suspect)")
|
||||||
# 2. Request garbage collection.
|
# 2. Request garbage collection.
|
||||||
await page.request_gc()
|
await page.request_gc()
|
||||||
# 3. Check that weak ref does not deref to the original object.
|
# 3. Check that weak ref does not deref to the original object.
|
||||||
assert page.evaluate("!globalThis.suspectWeakRef.deref()")
|
assert await page.evaluate("!globalThis.suspectWeakRef.deref()")
|
||||||
```
|
```
|
||||||
|
|
||||||
```python sync
|
```python sync
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue