在Jupyter Hub Notebook中,在iframe中渲染内容是不工作的。

问题描述 投票:0回答:1

我有一个本地运行的webserver。当我在笔记本上用localhost:portNumber url做wget时。它似乎可以正常下载html文件。

但是,当我尝试在iframe中渲染它时,我得到的是空白数据,如图所示。我得到的是空白数据,如下图所示。试图找出发生了什么。它甚至没有显示任何异常 :(

enter image description here

jupyter-notebook jupyter jupyter-lab jupyter-console
1个回答
0
投票

看来你的方法应该可以。 另一种方法是将它保存到文件中,然后在iframe中显示(使用curl,因为我在windows上)。

! curl localhost:8080/index.html > ifile.html

然后..:

%%html
<iframe src='ifile.html' width=200 height=200></iframe>
© www.soinside.com 2019 - 2024. All rights reserved.