-
-
Notifications
You must be signed in to change notification settings - Fork 322
Open
Labels
bugSomething isn't workingSomething isn't working
Description
When evaluating an asynchronous function in the main world execution mode, the return value is always { }
.
Example:
from camoufox.sync_api import Camoufox
with Camoufox(
main_world_eval=True
) as camoufox:
page = camoufox.new_page()
result = page.evaluate("""mw:async () => ({"test": "value"})""")
print(result)
Prints
{ }
After removing the mw:
label, the script prints {'test': 'value'}
as expected. Making the function sync (removing the async
keyword while keeping mw:
) will also run the function and print {'test': 'value'}
.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working