Error: not implemented: navigation (except hash changes)

The error “not implemented: navigation (except hash changes)” occurs when trying to use certain navigation methods or features that are not fully supported or implemented in the current context. This error typically arises in JavaScript applications or web browsers.

One example of this error is when attempting to use the “history.pushState()” method to push a new state to the browser history. This method allows you to modify the browser’s URL without triggering a full page reload. However, in some contexts or older browsers that do not support this feature, you may encounter the “not implemented: navigation” error.

Here’s an example:


    var stateObj = { foo: "bar" };
    history.pushState(stateObj, "page 2", "page2.html");
  

In the above code snippet, we are attempting to push a new state to the browser history using the “pushState()” method. The state object “stateObj” contains data associated with the new state, “page 2” represents the new page’s title, and “page2.html” is the URL we want to update without triggering a full page reload.

However, if the browser or current context does not support the “pushState()” method or navigation modifications, the “not implemented: navigation (except hash changes)” error will be thrown.

Read more

Leave a comment