(In reply to Olli Pettay [:smaug][bugs@pettay.fi] from comment #4) > What does "navigation starts" mean in this case? When an <a> element is clicked or when network connection is opened or what? > > NavigationTiming code is notified here: https://searchfox.org/mozilla-central/rev/d31e56f7b3c2c18b8071a7b2a2fb6b4e01e3d3e8/docshell/base/nsDocShell.cpp#9446, right before beforeunload, is that the only thing needed, some new notification? Does this match https://html.spec.whatwg.org/#beginning-navigation step 14? > Invoke WebDriver BiDi navigation started with targetBrowsingContext, and a new WebDriver BiDi navigation status whose id is navigationId, status is "pending", and url is url. That's where we need to be notified.
Bug 1835704 Comment 5 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
(In reply to Olli Pettay [:smaug][bugs@pettay.fi] from comment #4) > What does "navigation starts" mean in this case? When an <a> element is clicked or when network connection is opened or what? > > NavigationTiming code is notified here: https://searchfox.org/mozilla-central/rev/d31e56f7b3c2c18b8071a7b2a2fb6b4e01e3d3e8/docshell/base/nsDocShell.cpp#9446, right before beforeunload, is that the only thing needed, some new notification? Does this match https://html.spec.whatwg.org/#beginning-navigation step 14? > Invoke WebDriver BiDi navigation started with targetBrowsingContext, and a new WebDriver BiDi navigation status whose id is navigationId, status is "pending", and url is url. That's where we need to be notified. Edit: to answer the initial question, I think this needs to be emitted before the request is created, since it should occur before onbeforeunload runs?