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:
Dmitry Gozman 2024-09-26 05:08:20 -07:00 committed by GitHub
parent 480e5a2581
commit 871769e473
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2364,7 +2364,7 @@ await page.evaluate("globalThis.suspectWeakRef = new WeakRef(suspect)")
# 2. Request garbage collection.
await page.request_gc()
# 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