-
Notifications
You must be signed in to change notification settings - Fork 106
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
Programmatic fetching on Internet Explorer fails with InDesign demo EPUB #54
Comments
I have a fix in vicinity - it turns out that Trident engine doesn't support loading documents from a Blob object URL. For IE, going back to the old (pre commit dc6f4c6) logic of replacing content document DOM fixes this. I currently have a quick and dirty fix based around a |
Do you think this may have an impact on epubReadingSystem injection? |
@aadamowski Would something like iframe.contentWindow.document.open() , write(), close() work for you? https://github.com/readium/readium-shared-js/blob/feature/iframe_injection/js/views/iframe_loader.js#L61-L76 You can load HTML as plaintext programatically to the iframe using this API, and it seems to work well in Trident. A caveat is that to fix all relative URLs a |
@danielweck , yes, it would. So that was the rationale behind commit dc6f4c6. I was trying to track it down, but found no info in the original pull request #45 . This means we need a different approach for Trident. I'll try out @jccr 's suggestion. Does anyone have a quick test EPUB for epubReadingSystem, like the one mentioned in readium/readium-js-viewer#13? |
Submitted a pull request. Using document.write() indeed works under IE. Availability of epubReadingSystem must still be tested - can you point to some test EPUBs? Surprisingly, the |
@aadamowski Do the CSS namespace selectors break on IE + document.write()? |
I didn't test that yet, since the I don't have other test EPUBs that would employ CSS namespace selectors. |
EPUB3 samples with CSS namespaces: https://code.google.com/p/epub-samples/source/browse/trunk/30/georgia-cfi/EPUB/css/epub.css https://code.google.com/p/epub-samples/source/browse/trunk/30/wasteland/EPUB/wasteland.css With Media Queries: |
It seems that XHTML namespaces don't work for documents constructed using The resulting document has a null For example, the childrens-media-query sample has the following namespaced
When the document is constructed either programmatically (as in older Readium.js versions) or by setting the iframe's src to a
On the other hand, when the document is constructed through
Moreover, this behaviour is consistent between browsers and is probably by design: |
Thanks for pointers to samples, Daniel. Will investigate further. |
OK, the georgia-cfi sample was a bit easier for IE to render (albeit also problematic - the whole content is being rendered in an area the size of a poststamp, so I had to scroll through it by mouse-selecting the text). The behaviour on IE is the same as on Chrome - namespaces on attributes aren't applied, and CSS selectors don't match. But this means that the |
For now, I recommend merging pull request #56 as it makes IE at least render the document. The other issues (small rendering area, XHTML namespaces) should be tracked separately. |
@aadamowski, thank you for the XML NS tests. I commented on the Pull Request #56 discussion thread. If we collegially agree on merging, this will close this issue. As you said, we will need to file a separate issue to address XML namespace issues / CSS selector matching, etc. |
@aadamowski Thanks for looking in to the XML issues with document.write() Let's see if we can find a solution for this one. |
I wonder if this issue is related? |
This was fixed some time ago (PR merged) |
...even after "Blob-pinning" implemented by @aadamowski
Bugzilla 78:
https://app.devzing.com/Readium/bugzilla/show_bug.cgi?id=78
The text was updated successfully, but these errors were encountered: