@@ -32,7 +32,7 @@ <h1>Bokeh Example</h1>
32
32
33
33
from bokeh import __version__
34
34
from bokeh.document import Document
35
- from bokeh.embed.util import OutputDocumentFor, standalone_docs_json
35
+ from bokeh.embed.util import OutputDocumentFor, standalone_docs_json_and_render_items
36
36
from bokeh.models import Slider, Div
37
37
from bokeh.layouts import Row
38
38
from bokeh.protocol.messages.patch_doc import process_document_events
@@ -48,12 +48,12 @@ <h1>Bokeh Example</h1>
48
48
49
49
row = Row(children=[p, div])
50
50
51
- print("about to embed")
52
-
53
51
def doc_json(model, target):
54
52
with OutputDocumentFor([model]) as doc:
55
53
doc.title = ""
56
- docs_json = standalone_docs_json([model])
54
+ docs_json, _ = standalone_docs_json_and_render_items(
55
+ [model], suppress_callback_warning=True
56
+ )
57
57
58
58
doc_json = list(docs_json.values())[0]
59
59
root_id = doc_json['roots']['root_ids'][0]
@@ -87,7 +87,6 @@ <h1>Bokeh Example</h1>
87
87
async def show(plot, target):
88
88
pydoc, model_json = doc_json(plot, target)
89
89
views = await Bokeh.embed.embed_item(JSON.parse(model_json))
90
- print("Done embedding...")
91
90
jsdoc = views[0].model.document
92
91
_link_docs(pydoc, jsdoc)
93
92
0 commit comments