readium / readium-shared-js

Repository for the shared JavaScript libraries that are used in the SDK-Launchers and other applications developed on top of the SDK
BSD 3-Clause "New" or "Revised" License
78 stars 102 forks source link

CSS insertRule sometimes fail (Helpers.js, triggerLayout()) #352

Open danielweck opened 7 years ago

danielweck commented 7 years ago

Open the following link and load the web console to see error messages:

DOMException: Failed to execute 'insertRule' on 'CSSStyleSheet': Failed to insert the rule.

https://readium.firebaseapp.com/?epub=https%3A%2F%2Fcdn.rawgit.com%2Fstandardebooks%2Fmark-twain_a-connecticut-yankee-in-king-arthurs-court%2Fmaster%2Fsrc

( https://github.com/standardebooks/mark-twain_a-connecticut-yankee-in-king-arthurs-court/tree/master/src )

Note that other EPUBs accessed via the RawGit CDN (i.e. exploded EPUB stored in a GitHub repository) seem to work just fine. For example:

https://readium.firebaseapp.com/?epub=https%3A%2F%2Fcdn.rawgit.com%2FIDPF%2Fepub-testsuite%2Fmaster%2Fcontent%2F30%2Fepub30-test-0100

Another example of failure: https://readium.firebaseapp.com/?epub=https%3A%2F%2Fcrossorigin.me%2Fhttps%3A%2F%2Fwww.readbeyond.it%2Freadium%2Fepub_content%2Fa00e164a&goto=%7B%22idref%22%3A%22colophon%22%2C%22elementCfi%22%3A%22%2F4%2F2%2F2%22%7D&

danielweck commented 7 years ago

Note the OPDS feed: https://readium.firebaseapp.com/?epubs=https%3A%2F%2Fcrossorigin.me%2Fhttps%3A%2F%2Fstandardebooks.org%2Fopds%2Fall

Source: https://standardebooks.org

GitHub library: https://github.com/standardebooks