Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigation: inner navigate firing algorithm does not say what to do if invoking NavigationInterceptHandler throws #9774

Closed
ADKaster opened this issue Sep 22, 2023 · 1 comment
Labels
clarification Standard could be clearer topic: navigation

Comments

@ADKaster
Copy link
Contributor

Step 33.2.1 of the inner navigate firing algorithm simply states:

Append the result of invoking handler with an empty arguments list to promisesList.

However, handler is an IDL callback, so invoking it, even if the return type is a Promise type, could throw. ... assuming my reading of https://webidl.spec.whatwg.org/#invoke-a-callback-function is correct.

Other parts of the HTML specification make sure to say that "invoke such and such callback, and if that throws, report the exception", pointing towards https://html.spec.whatwg.org/multipage/webappapis.html#report-the-exception

Are these steps not necessary as NavigationInterceptHandler is Promise<undefined> ()? Or do we need a "report the exception" step in 33.2 of the inner navigate firing algorithm?

@keithamus keithamus added clarification Standard could be clearer topic: navigation labels Sep 23, 2023
@domenic
Copy link
Member

domenic commented Sep 26, 2023

Are these steps not necessary as NavigationInterceptHandler is Promise<undefined> ()?

That is correct. It is impossible for invoking a promise-returning callback to throw, as any exceptions are converted into rejected promises. See https://webidl.spec.whatwg.org/#invoke-a-callback-function step 11-14, which never allow an exception (abrupt completion) to escape.

@domenic domenic closed this as completed Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification Standard could be clearer topic: navigation
Development

No branches or pull requests

3 participants