HeinrichApfelmus / threepenny-gui

GUI framework that uses the web browser as a display.
https://heinrichapfelmus.github.io/threepenny-gui/
Other
437 stars 77 forks source link

loadfile does have no effect #251

Open WolfgangSpahn opened 3 years ago

WolfgangSpahn commented 3 years ago

failed to load javascript library, but css is loaded.

whereas

bradrn commented 3 years ago

I strongly suspect this is caused by the issue I mentioned in #249:

In theory, loadDirectory looks like it could help with [loading JavaScript libraries], but it also seems like I can use it only after the HTML page has been loaded …

HeinrichApfelmus commented 3 years ago

Note that loadFile returns an URL where the file can now be reached via HTTP, but doesn't do anything to the browser window. You would still need to add a <script> element with this URL in the src attribute. Does that help? If not, could you post a minimal example that does not work as intended?