Bug 218284 - Error event not captured when error originates in module
Summary: Error event not captured when error originates in module
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: Safari 14
Hardware: Mac All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-10-28 07:25 PDT by Andreas
Modified: 2020-10-28 19:16 PDT (History)
6 users (show)

See Also:


Attachments
Not all errors (in module) are captured by the listener (1.10 KB, text/html)
2020-10-28 07:25 PDT, Andreas
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas 2020-10-28 07:25:45 PDT
Created attachment 412527 [details]
Not all errors (in module) are captured by the listener

Some syntax errors are not captured by the event listener when originated in a module.

Syntax errors inside a module in situations like:
	function a() {  // missing closing bracket

won’t get captured by the listener.
While other errors like:
	const a = 1
	a = 2

will get captured, even when generated inside the module.
This works as expected in FF and Chrome.

In the attachment a demo with 4 examples.
Comment 1 Radar WebKit Bug Importer 2020-10-28 10:50:33 PDT
<rdar://problem/70770789>