Skip to content

Commit

Permalink
Merge pull request #1444 from mwcraig/widget-event-link-explanation
Browse files Browse the repository at this point in the history
Add more explanation to description of links
  • Loading branch information
jasongrout authored Jun 22, 2017
2 parents 189370b + 5d44db5 commit 3884064
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/source/examples/Widget Events.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,19 @@
"# dl.unlink()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### The difference between linking in the kernel and linking in the client\n",
"\n",
"Linking in the kernel means linking via python. If two sliders are linked in the kernel, when one slider is changed the browser sends a message to the kernel (python in this case) updating the changed slider, the link widget in the kernel then propagates the change to the other slider object in the kernel, and then the other slider's kernel object sends a message to the browser to update the other slider's views in the browser. If the kernel is not running (as in a static web page), then the controls will not be linked.\n",
"\n",
"Linking using jslink (i.e., on the browser side) means contructing the link in Javascript. When one slider is changed, Javascript running in the browser changes the value of the other slider in the browser, without needing to communicate with the kernel at all. If the sliders are attached to kernel objects, each slider will update their kernel-side objects independently.\n",
"\n",
"To see the difference between the two, go to the [static version of this page in the ipywidgets documentation](http://ipywidgets.readthedocs.io/en/latest/examples/Widget%20Events.html) and try out the sliders near the bottom. The ones linked in the kernel with `link` and `dlink` are no longer linked, but the ones linked in the browser with `jslink` and `jsdlink` are still linked."
]
},
{
"cell_type": "markdown",
"metadata": {
Expand Down

0 comments on commit 3884064

Please sign in to comment.