You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we remove the element containing WGLMakie before its initailsed there is an exception:
using HTTP
using Bonito: App
using Makie
using WGLMakie
function main()
HTTP.listen() do http::HTTP.Stream
HTTP.setstatus(http, 200)
HTTP.startwrite(http)
write(http, "<html><body>")
write(http, "<h1>Bonito element removal</h1>")
app = App() do
sleep(2)
fig = Figure()
return fig
end
io = IOBuffer()
show(io, "text/html", app)
body = take!(io)
write(http, "<div id=\"bonito\">")
write(http, body)
write(http, "</div>")
write(http, "<script>setTimeout(() => {document.getElementById('bonito').remove()}, 1000);</script>")
write(http, "</body></html>")
end
end
if abspath(PROGRAM_FILE) == @__FILE__
main()
end
The exception is:
An exception was thrown in JS: TypeError: Cannot read properties of null (reading 'getContext')
Additional message: error initializing scene
Stack trace:
TypeError: Cannot read properties of null (reading 'getContext')
at threejs_module (http://localhost:9385/assets/435ec4531f8729b0dfad48036f91f9e1eab0aa39-wglmakie.bundled.js:23033:26)
at Module.create_scene (http://localhost:9385/assets/435ec4531f8729b0dfad48036f91f9e1eab0aa39-wglmakie.bundled.js:23099:22)
at eval (eval at <anonymous> (http://localhost:9385/assets/f1a88e34853c38ba45791ee4149df30a0c07525a-Bonito.bundled.js:3561:27), <anonymous>:5:30)
┌ Warning: error while processing received msg
│ exception =
│ Three object should be ready after init, but isn't - connection interrupted? Session: Session{Bonito.WebSocketConnection}:
│ id: 9d871a24-7426-425e-98a3-946845037797
│ parent: Nothing
│ connection: open
│ isready: true
│ asset_server: Bonito.ChildAssetServer
│ queued messages: 0
│ , initialized: false
But there could be legitimate reasons to have this happen, e.g. plot shown in a model element that the user immediately closes.
The text was updated successfully, but these errors were encountered:
If we remove the element containing WGLMakie before its initailsed there is an exception:
The exception is:
But there could be legitimate reasons to have this happen, e.g. plot shown in a model element that the user immediately closes.
The text was updated successfully, but these errors were encountered: