-
-
Notifications
You must be signed in to change notification settings - Fork 75
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
Make all exported content apis synchronous (or provide done callback) #108
Comments
body!
synchronous (or provide done callback)Moves the fade/no-fade decision from julia down into javascript, so that more code can be reused between the two. This also simplifies the `content!` function body, which will make fixing JuliaGizmos#108 a bit easier.
Moves the fade/no-fade decision from julia down into javascript, so that more code can be reused between the two. This also simplifies the `content!` function body, which will make fixing JuliaGizmos#108 a bit easier. Updates "Fade False" test to not @test_throws. Tests still pass.
Yeah, this seems like the right way forward. I'd heavily prefer having callbacks though. |
Cool, I think so too! Do any of the functions use "done" callbacks right now? It looks like the only thing I've seen is a synchronous option implemented with the javascript Promise api. To implement a done callback, would we just have the javascript trigger a |
Although actually for me personally, simply having a synchronous method is much simpler. As is, I just find myself putting sleep statements there anyway. |
Moves the fade/no-fade decision from julia down into javascript, so that more code can be reused between the two. This also simplifies the `content!` function body, which will make fixing JuliaGizmos#108 a bit easier. Updates "Fade False" test to not @test_throws. Tests still pass.
Moves the fade/no-fade decision from julia down into javascript, so that more code can be reused between the two. This also simplifies the `content!` function body, which will make fixing JuliaGizmos#108 a bit easier. Updates "Fade False" test to not @test_throws. Tests still pass.
Moves the fade/no-fade decision from julia down into javascript, so that more code can be reused between the two. This also simplifies the `content!` function body, which will make fixing JuliaGizmos#108 a bit easier. Updates "Fade False" test to not @test_throws. Tests still pass.
Moves the fade/no-fade decision from julia down into javascript, so that more code can be reused between the two. This also simplifies the `content!` function body, which will make fixing JuliaGizmos#108 a bit easier. Updates "Fade False" test to not @test_throws. Tests still pass.
Hi! I know it's been literally half a year, but i'm still interested in having synchronous functions for Blink! :)
I liked what Shashi said in this comment:
What do you think? I'll try to look into implementing this again in a day or two! |
Hi! In line with #35, #41 and #56, can we make
body!
(and probably alsocontent!
,loadcss!
,loadjs!
,load!
,importhtml!
) synchronous?It took me a while to track down why my app was sometimes crashing at the beginning, and it's because there's a race with loading javascript and reading it later with
var = @js w varJS
.Can we just make all of those methods synchronous, following the same technique as in those other PRs? Thanks! :)
The text was updated successfully, but these errors were encountered: