Exactly, though it may need to be more carefully done in some circumstances.
Page.js does this._onpopstate.bind(...), but it doesn’t define that function if window.onpopstate doesn’t exist, so the error pushed down a layer instead of fixed entirely.