等到Pyscript软件包满载,然后修改DOM
我想等到Pyscript满足所有软件包,然后更改DOM上的元素。
我尝试使用window.addeventlistener('load',create_proxy(func))
在Pyscript中。但无济于事,它不会执行该功能。我还尝试将事件侦听器'更改'
添加到Pyscript修改的元素中。该元素用于使用面板
软件包插入表。插入表之后,我想删除页面上的另一个元素。
任何帮助都赞赏
I want to wait until pyscript has fully loaded all packages and after that alter an element on the DOM.
I tried using window.addEventListener('load', create_proxy(func))
in pyscript. But to no avail, it does not execute the function. I also tried adding the event listener 'change'
to the element that is being modified by pyscript. The element is used for inserting a table using the panel
package. After the table is inserted I'd like to remove another element on the page.
Any help appreciated
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
基本方法是使用pyscript.write()。
加载前客的内容时
Pyscript-测试
带有ID =“输出”的测试div
加载完成后,输出div中有PANDAS DF,并且具有ID =“ MSG”的单独div中的其他文本

“应该就是这样” 提示...
The basic way is to use pyscript.write().
While loading the content of the paage is
Pyscript - Test
Testing div with id="output"
After loading has finished there is a pandas df in the output div and additional text in a separate div with id="msg"

"That should be it" Regards...
加载任何Pyscript软件包之前,请在JS中运行此。
它拦截了控制台日志消息并查找何时强加了加载
Run this in JS before you load any of the pyscript packages.
It intercepts the console log messages and find when it has compelted loading