We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc8bf09 commit 9b02758Copy full SHA for 9b02758
src/core/jupyter/widgets.ts
@@ -190,9 +190,11 @@ function isWidgetIncludeHtml(html: string) {
190
}
191
192
function isPlotlyLibrary(html: string) {
193
- return /^\s*<script type="text\/javascript">/.test(html) &&
+ return (/^\s*<script type="text\/javascript">/.test(html) &&
194
(/require\.undef\(["']plotly["']\)/.test(html) ||
195
- /define\('plotly'/.test(html));
+ /define\('plotly'/.test(html))) ||
196
+ // also handle new module syntax from plotly.py 6+
197
+ /\s*<script type=\"module\">import .*plotly.*<\/script>/.test(html);
198
199
200
function htmlLibrariesText(htmlText: string) {
0 commit comments