Implementing this will be tricky without support for watchpoints, since intercepting the load using an event would present the stack in a new turn of the event loop, with the original call missing.
if we could inject our on onload handler we might be able to fake this. Would be super-useful to have.
Exposing this in the frontend could be as easy as adding a "Pause on navigation" in the debugger's gear menu. There are many stages in a navigation though. We could break when the currently debugged page unloads. Or the next page loads. Or before it loads. Or... I think the most useful use-case that we should support is pausing on what we call "will-navigate", so basically when the current target starts reloading/ navigating away.
How about adding it in the debugger's events tab.
The events tab lists handlers present in the page, so copying the break-on-error UI seems better in this case. I'm still not sure if pausing in the progress listener will have content frames in the stack, which is what both comment 0 and bug 977261 actually need.
Any news about this?