Closed Fil closed 7 years ago
I'm going to mark this issue as a bug (I've checked the json schema for .ipynb
files and multiple outputs are allowed).
IJavascript used to allow multiple results per cell, but recently I decided to enforce a single output policy, because some frontends (most notably the Jupyter notebook) don't handle multiple results gracefully; see the screenshot below).
Once I publish the fix, you should be able to do as below:
@n-riesco You should publish multiple display_data
rather than execute_result
within IJavaScript.
The only thing that should end up as execute_result
should be the last result -- the result from vm.runInContext
(and should be the one to be inspected). Everything else should come across on display_data
, stream
, or error
all of which can be asynchronously emitted.
This whole time I thought you were taking an artistic choice for why it was a global assignment $$html = ...
. Is there a way to set other headers for a full display_data
as well? I want to start using the transient
object to set display_id
s.
@rgbkrk Oh! I see this is new in v5.1 of the messaging protocol.
@Fil I've updated the nel
package and extended the signature of the functions in $$
with the argument keepAlive
; e.g. $$.text("Hello, World!", true); $$.text("Bye!");
.
At the moment, IJavascript doesn't implement the transient
API in protocol v5.1. It simply sends multiple responses (which most frontends won't handle gracefully).
If you want to try it out. You'll have to ensure IJavascript is using the latest version of the nel
package.
it works 👍
I'd like to produce images and push them asynchronously using
$$.svg()
or$$.html()
, but it seems that only the first thing I send makes it to the screen.=>
Is there a way to fix this?