diff --git a/src/display.jl b/src/display.jl index 2659b576..2fdbd4bf 100644 --- a/src/display.jl +++ b/src/display.jl @@ -48,6 +48,7 @@ register_jsonmime(x::AbstractVector{<:MIME}) = push!(ijulia_jsonmime_types, Vect # return a String=>Any dictionary to attach as metadata # in Jupyter display_data and pyout messages metadata(x) = Dict() +transient(x) = Dict() """ Generate the preferred MIME representation of x. diff --git a/src/inline.jl b/src/inline.jl index 2ef69587..339d05ad 100644 --- a/src/inline.jl +++ b/src/inline.jl @@ -62,6 +62,7 @@ for mime in ipy_mime msg_pub(execute_msg, "display_data", Dict( "metadata" => metadata(x), # optional + "transient" => transient(x), # optional "data" => Dict($mime => limitstringmime(MIME($mime), x))))) end displayable(d::InlineDisplay, ::MIME{Symbol($mime)}) = true @@ -87,6 +88,7 @@ function display(d::InlineDisplay, M::MIME, x) send_ipython(publish[], msg_pub(execute_msg, "display_data", Dict("metadata" => metadata(x), # optional + "transient" => transient(x), # optional "data" => d))) end @@ -98,6 +100,7 @@ function display(d::InlineDisplay, x) send_ipython(publish[], msg_pub(execute_msg, "display_data", Dict("metadata" => metadata(x), # optional + "transient" => transient(x), # optional "data" => display_dict(x)))) end