Skip to content

Commit

Permalink
Update the python embed URL to match JS one
Browse files Browse the repository at this point in the history
Also copy over the TODO
  • Loading branch information
vidartf committed Jun 29, 2017
1 parent 287eac0 commit ce13271
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ipywidgets/embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
{view_spec}
</script>"""

# TODO: This always points to the latest version of the html-manager. A better strategy
# would be to point to a version of the html-manager that has been tested with this
# release of jupyter-widgets/controls.
DEFAULT_EMBED_SCRIPT_URL = u'https://unpkg.com/@jupyter-widgets/html-manager@*/dist/index.js'


def _find_widget_refs_by_state(widget, state):
"""Find references to other widgets in a widget's state"""
Expand Down Expand Up @@ -205,8 +210,7 @@ def embed_snippet(views,
)

if embed_url is None:
# TODO: Get widgets npm version automatically:
embed_url = u'https://unpkg.com/jupyter-js-widgets@~3.0.0-alpha.0/dist/embed.js'
embed_url = DEFAULT_EMBED_SCRIPT_URL

values = {
'embed_url': embed_url,
Expand Down

0 comments on commit ce13271

Please sign in to comment.