Kaynağa Gözat

Use bold to refer to phosphor widgets and italics to ipywidgets in the last example

Carol Willing 8 yıl önce
ebeveyn
işleme
a03a1097f7
1 değiştirilmiş dosya ile 8 ekleme ve 4 silme
  1. 8 4
      tutorial/notebook.md

+ 8 - 4
tutorial/notebook.md

@@ -190,11 +190,15 @@ Then add this extension to the JupyterLab extensions list in the
 ```
 
 
-### The ipywidgets extension
+### The *ipywidgets* extension
 
-This discussion will be a bit confusing since we've been using "widget" to refer to phosphor widgets. In the discussion below, ipython widgets will be referred to as "ipywidgets". There is no intrinsic relation between phosphor widgets and ipython widgets.
+This discussion will be a bit confusing since we've been using the term **widget**
+to refer to **phosphor widgets**. In the discussion below, *ipython widgets*
+will be referred to as *ipywidgets*. There is no intrinsic relation between
+**phosphor widgets** and *ipython widgets*.
 
-The ipywidgets plugin registers a factory for a notebook widget extension 
-using the [Document Registry](http://jupyter.org/jupyterlab/classes/_docregistry_registry_.documentregistry.html#registermodelfactory). The `createNew()` function is called with a NotebookPanel and [DocumentContext](http://jupyter.org/jupyterlab/interfaces/_docregistry_interfaces_.idocumentcontext.html). The plugin then creates a ipywidget manager (which uses the context to interact the kernel and kernel's comm manager). The plugin then registers an ipywidget renderer with the notebook instance's rendermime (which is specific to that particular notebook).
+The *ipywidgets* plugin registers a factory for a notebook **widget** extension
+using the [Document Registry](http://jupyter.org/jupyterlab/classes/_docregistry_registry_.documentregistry.html#registermodelfactory).
+The `createNew()` function is called with a NotebookPanel and [DocumentContext](http://jupyter.org/jupyterlab/interfaces/_docregistry_interfaces_.idocumentcontext.html). The plugin then creates a ipywidget manager (which uses the context to interact the kernel and kernel's comm manager). The plugin then registers an ipywidget renderer with the notebook instance's rendermime (which is specific to that particular notebook).
 
 When an ipywidget model is created in the kernel, a comm message is sent to the browser and handled by the ipywidget manager to create a browser-side ipywidget model. When the model is displayed in the kernel, a `display_data` output is sent to the browser with the ipywidget model id. The renderer registered in that notebook's rendermime is asked to render the output. The renderer asks the ipywidget manager instance to render the corresponding model, which returns a javascript promise. The renderer creates a container *phosphor* widget which it hands back synchronously to the OutputAreaWidget, and then fills the container with the rendered ipywidget when the promise resolves.