You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It has never been clear how to derive the filename, lineno, and colno for error events fired with the ErrorEvent class. #10404 makes this explicit, introducing "extract error information" which says
Set attributes[message], attributes[filename], attributes[lineno], and attributes[colno] to implementation-defined values derived from exception.
NOTE: Browsers implement behavior not specified here or in the JavaScript specification to gather values which are helpful, including in unusual cases (e.g., eval). In the future, this might be specified in greater detail.
Ideally, we would have a clear specification for these cases. Tricky cases include:
Exceptions created by the browser, instead of the web developer
Filename when redirects are involved: apparently some browsers use the pre-redirect filename, for security reasons? Some discussion in Clarify "report an exception" #958 (comment) and the following comments.
Exceptions that are created in one location and thrown in a different location
Cases of "extract error information" that aren't related to the global error event. (Currently only in the navigation API.)
The first step is to create a large amount of web platform tests covering these cases, and seeing where things stand today.
#958 (comment) has a plan for how to specify the result rigorously, by adding hooks to the JavaScript specification.
The text was updated successfully, but these errors were encountered:
What is the issue with the HTML Standard?
It has never been clear how to derive the
filename
,lineno
, andcolno
forerror
events fired with theErrorEvent
class. #10404 makes this explicit, introducing "extract error information" which saysIdeally, we would have a clear specification for these cases. Tricky cases include:
blob:
and especiallyjavascript:
(see e.g. javascript: URLs, window.onerror, and filenames #1960)error
event. (Currently only in the navigation API.)The first step is to create a large amount of web platform tests covering these cases, and seeing where things stand today.
#958 (comment) has a plan for how to specify the result rigorously, by adding hooks to the JavaScript specification.
The text was updated successfully, but these errors were encountered: