Closed EnixCoda closed 4 years ago
Looks like your extension is using pjax on the host page. Since overriding the host page by pjax from third party tools almost certainly breaks the host page I don't support such usage.
Since overriding the host page by pjax from third party tools almost certainly breaks the host page
I do agree with this point.
There is another thing to mention. GitHub officially uses PJAX to redirect, e.g. clicking on files/folders as shown below. You shall see a progress bar show at top and page re-renders without redirecting. If you look into the GitHub's source code and network activity, pjax
is mentioned specifically there. So my extension is just adding more elements with PJAX turned on into a site already support PJAX.
Also, one of the functions extensions provide is extending the ability of the host page, like adding stuff into page as well as making those stuff work with pjax as host page elements do. So I believe PJAX usages of my extension is not that bad, right? :)
It's totally fine if you still disagree on pushing this PR forward. I do understand your concerns. 😄Please close it if you've made up your mind.
Thanks for your patience on this anyway 😄
Unfortunately, injecting pjax breaks the state transition managed by the host page even when the host page uses pjax. On the host page, every developer of third party tools must use the page transition provided by the host.
After #44 , add-ons won't crash during module initialization. However, I encountered other two issues when trying to redirect with pjax-api. Luckily, I managed to solve them by myself.
SyntaxError: The URI is malformed.
- XHR in add-on context need host fragment in URL to work properly.NS_ERROR_UNEXPECTED
- cloning Document failure.Please review for any cases I did not take care of.