Closed georgestagg closed 1 year ago
@georgestagg Thanks for the note! I just rolled out the new meta variable option in #32. This is a great development since webR is now able to be used on Quarto Pub 🎉 🎉
https://coatless.quarto.pub/hidden-webr-code-cells/
On the fallback note, I noticed that the ChannelType.Automatic
option is the default for WebROptions; however, it only tries to setup SharedBufferChannelMain
and ServiceWorkerChannelMain
.
Is there any way I could convince you to add PostMessageChannelMain
fallback upstream?
Hey, I noticed you've updated to webR 0.2.1. That version contains a new communication channel, named
PostMessage
, which works even if the web page is not Cross-Origin Isolated, without the (admin & performance) overhead of setting up the Service Worker channel.You might consider using it as a fallback in quarto-webr when
crossOriginIsolated
returnsfalse
in JS, in place of the automatic Service Worker-based fallback. Or at least provide it as an option to the user via a yaml option.Positives:
webr-serviceworker.js
andwebr-worker.js
)Negatives:
readline()
,menu()
,browser()
) don't work.If you'd like to experiment, you should be able to make the following (temporary!) change to
webr-init.html
to importChannelType
and force webR to useChannelType.PostMessage
: