-
Notifications
You must be signed in to change notification settings - Fork 3
CheerpJ loader now is called directly from path stored in .env #3
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks mostly good to me. @alexp-sssup which version of cj should we use here? The latest nightly or did we want to use some major version?
We should stick to 4.0 @Orpheus-3145 please use the public 4.0/loader.js path, not the internal 4.0_NNN one. JavaFiddle is based on Java 8, which is now very stable. |
79795c2
to
c74ec89
Compare
Deploying javafiddle with
|
Latest commit: |
c74ec89
|
Status: | ✅ Deploy successful! |
Preview URL: | https://bad9fcac.javafiddle.pages.dev |
Branch Preview URL: | https://killlatest.javafiddle.pages.dev |
I updated the path with the 4.0 version |
<!-- CheerpJ is loading --> | ||
{:then src} | ||
{#if src} | ||
<script {src} on:load={onLoad}></script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Build the script using the svelte syntax, we can hardcode the known URL and remove the onMount handler
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are suggesting to do something like this:
<svelte:head>
<script {src} on:load={onLoad}></script>
</svelte:head>
It will not work, that is way I used raw js instead.
I also saw some posts on github addressing the same problem; if we do not want to stick with ugly js, a possible solution would be to upgrade svelteKit to a newer version, but I'm not sure about that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need onLoad at all. If the script is directly added to the page then you are guaranteed that by the time later scripts are executed the loader is ready to be used.
Changed made: