-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Material for MkDocs and other doctools (I think that Docusaurus too) implement a feature that load the content of the page without making a regular request to the server 1:
When instant loading is enabled, clicks on all internal links will be intercepted and dispatched via XHR without fully reloading the page.
This makes addons that depend on the actual URL to not work as expected (e.g. docdiff). When loading the page, the addons API is hit with url=
but then the user clicks on an internal link, which uses the instant reload feature to load the page content but our addons doesn't do another request with the url=
field updated, making docdiff to use the old URL to compare against.
I think we could listen to an event to check if the URL has changed and if so, make a request to the addons API again with the updated url=
attribute. It seems there is a navigator API to do this, but it's experimental for now, tho: https://developer.mozilla.org/en-US/docs/Web/API/Navigation_API
Footnotes
Metadata
Metadata
Labels
Type
Projects
Status