View Single Post
Old 07-28-2025, 10:21 AM   #9
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,893
Karma: 6120478
Join Date: Nov 2009
Device: many
Okay I figured out how to force load Hyphenopoly using the following and disabling hyphenation in the css:

Code:
<script type="text/javascript">
    Hyphenopoly.config({
        require: {
            "es": "FORCEHYPHENOPOLY"
        }
    });
</script>
Then I changed the sigil scheme to allow it to use the fetch api and rebuilt Sigil.

That gets me to here: (Debug info from Sigil's URLInterceptor.cpp and URLSchemeHandler.cpp)

Code:
Debug: URLInterceptor
Debug:     method:  "GET"
Debug:     1st party url:  QUrl("sigil:///Users/kbhend/Library/Application Support/sigil-ebook/sigil/workspace/Sigil-PAbpkt/OEBPS/Text/Section0001.xhtml")
Debug:     request url:  QUrl("sigil:///Users/kbhend/Library/Application Support/sigil-ebook/sigil/workspace/Sigil-PAbpkt/OEBPS/Misc/patterns/es.wasm")
Debug:     navtype:  0
Debug:     restype:  13
Debug:     ActiveWindow:  MainWindow(0x7f8828226c00, name="MainWindow")
     
Debug: In URLSchemeHandler with url:  QUrl("sigil:///Users/kbhend/Library/Application Support/sigil-ebook/sigil/workspace/Sigil-PAbpkt/OEBPS/Misc/patterns/es.wasm")
Debug: In URLSchemeHandler with method:  "GET"
Debug: In URLSchemeHandler with initiator:  QUrl("sigil:")

Debug: URLSchemeHandler will fail request because no local file found:  QUrl("sigil:///Users/kbhend/Library/Application Support/sigil-ebook/sigil/workspace/Sigil-PAbpkt/OEBPS/Misc/patterns/es.wasm")

Debug: URLSchemeHandler failed request for:  QUrl("sigil:///Users/kbhend/Library/Application Support/sigil-ebook/sigil/workspace/Sigil-PAbpkt/OEBPS/Misc/patterns/es.wasm")
which shows it fails because it is not trying to load the .wasm files from the correct location inside the META-INF folder:

QUrl("sigil:///Users/kbhend/Library/Application Support/sigil-ebook/sigil/workspace/Sigil-PAbpkt/OEBPS/Misc/patterns/es.wasm")

instead it is looking right beside the other js files.

Where in your javascript loader do you tell it where to find the .wasm files?


Someplace there should be a "../../../META-INF/" appended before the file name to actually load the wasm files:

Last edited by KevinH; 07-28-2025 at 11:14 AM.
KevinH is offline   Reply With Quote