-
-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
javascript error when using documentation in old browsers #353
Comments
No, sorry. pdoc only supports recent browser versions, i.e. the latest Chrome, Firefox, Edge, and Safari. It's not viable for us to support Windows XP or a six year old Chrome version. The maintenance burden is too high. |
Thanks @mhils
Of course, I was assuming that those javascript problems are related to search tool. Is this assumption correct? As I final option, what are my chances to handle this problem using pdoc configuration options?
Thanks again! |
Again, old browsers are completely unsupported to reduce my maintenance load. This includes any workarounds, error detection, etc. It's a hard and definite no, sorry. I also won't accept pull requests that restore support for Windows XP or Chrome 49, simply based on the premise that I don't want to create the impression that they would be supported in any way.
The search functionality is the only part in pdoc that requires JavaScript, so yes.
Yes. The relevant stuff is in the templates directory. I'm sorry, but I don't have the capacity to answer additional questions on what could be done here. |
I didn't mention The example is linked |
Problem Description
Search bar is not working when browsing documentation in old computers.
If I use google Chrome (49.0.2623.112 m) inspector console, I see this error message:
Uncaught SyntaxError: Unexpected token function
The error happens on this line, in every .html document:
If I use Mozilla Firefox (52.9.0 32bit) inspector console, I see this error message:
TypeError: doc.modulename.replaceAll is not a function
[Know more]Now the error happens on this line:
Not sure if these are related or not to search bar functionality, but I have no way to update that computer OS or browsers.
I guess this might happen to many users of old machines which are still perfectly suitable for running Python up to v.3.4 (plenty of them in my institution).
So it would be a shame they cannot use pdoc documentation.
Would it be possible to make pdoc backwards compatible in old browsers?
Browsing elasticlunr.js documentation, I saw this sentence:
I hope that gives a chance to make docs work in old browsers.
But if not, would it be possible to at least detect old-browsers and avoid that error message, so further javascript code is not affected?
On my to-do list, I was planning to add some javascript with a custom template (trying to sort items shown in left index) ... but with this error I guess that would be impossible.
Steps to reproduce the behavior:
System Information (machine generating documentation)
pdoc: 8.3.0 & 10.0.1 (same result)
Python: 3.8.7
Platform: Windows-7-6.1.7601-SP1
System Information (machine reading documentation)
Platform: Windows-XP-SP3
Google Chrome version 49.0.2623.112 m
Mozilla Firefox version 52.9.0 32bit
The text was updated successfully, but these errors were encountered: