-
Notifications
You must be signed in to change notification settings - Fork 571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update widgets CDN for ipywidgets 7 w/fallback #792
Conversation
@mpacer This is the PR I mentioned in the meeting. It should be fully backwards compatible (feel free to try to break it though) 😄 |
I'm feeling rather ignored here. 😢 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> | ||
|
||
{% block ipywidgets %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(nitpick mode on) maybe the ipy
is a bit python-specific.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just followed the convention of nbviewer (https://github.com/jupyter/nbviewer/pull/738/files#diff-613fc8ba3406aefaf7062016d832bbfbR84). I'm not sure how transferrable templates are between the two, but I figured I would try to make things as similar as possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
document.body.appendChild(scriptElement); | ||
} | ||
|
||
document.addEventListener('DOMContentLoaded', addWidgetsRenderer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What could be interesting would be to add an argument to addWidgetsRenderer
for the version of the html manager to load and try to infer it from the content of nb.metadata.widget
(this could be done in a separate PR though.)
Fixes #636.