-
Notifications
You must be signed in to change notification settings - Fork 108
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
fix for relative mathJaxUrl #121
base: develop
Are you sure you want to change the base?
Conversation
Thanks @pmstss At development time: Chrome app distribution: Cloud reader distribution: The option data is passed via the ..but note that the Chrome app transforms content in its own way (as the EPUB files are exploded in the HTML5 filesystem): So to summarize, I am not sure this PR is needed. You should be able to absolutize the URL using |
I'm using
Important remark, thanks. But that |
Right now the MathJax lib ships with the application, and we pass an absolute URL to ensure its location is explicitly known, not obfuscated by an API layer. |
Described use case is for sure possible, and you are right, such kind of flexibility will be lost with this fix. But definitely it is not what comes to mind first when playing with readium options and see "relative url for the MathJax javascript file". I think at least explicit mentioning, that |
… baseHref issue" This reverts commit 718b96f. As discussed in readium#121, relativity to spine item document is expected feature. Converting url to absolute is more safe to be done earlier, before passing mathJaxUrl to readium.
Defer this PR, but we do need to update the documentation. |
mathJaxUrl
is described in API.md as "relative url for the MathJax javascript file" but in viewer and other examples absolute url is used.The bad thing is that if relative url is used - it doesn't work correctly. Reason is that the
<base>
is set for iframe content and it points to epub root, but mathjax url is relative to app, not to epub.Proposed fix "absolutize"
mathJaxUrl
(using main window location) before usage in iframe script element.Short URI.js syntax, discussed in readium-shared-js issue 226, is used :)