NEW 273572
Web Inspector: await is not supported in console in some scenarios
https://bugs.webkit.org/show_bug.cgi?id=273572
Summary Web Inspector: await is not supported in console in some scenarios
Tim Guan-tin Chien [:timdream]
Reported 2024-05-01 13:23:01 PDT
The following works: ``` const a = await Promise.resolve("hi"); ``` The following does not, if I paste the lines and run it at once: ``` const a = await Promise.resolve("hi"); console.log(a); ``` neither does this: ``` console.log(await Promise.resolve("hi")); ``` Safari Version 17.5 (19618.2.2.1)
Attachments
Radar WebKit Bug Importer
Comment 1 2024-05-01 13:23:22 PDT
Tim Guan-tin Chien [:timdream]
Comment 2 2024-05-01 13:36:50 PDT
Expected result for the not working case is for console to print "hi". The first not working case prints the following error: SyntaxError: Unexpected identifier 'Promise'. Expected ';' after variable declaration The second one prints: SyntaxError: Unexpected identifier 'Promise'. Expected ')' to end an argument list.
Note You need to log in before you can comment on or make changes to this bug.