是否有“页面渲染完成”提示GWT 中的事件?

发布于 2024-11-18 19:44:51 字数 188 浏览 7 评论 0原文

我有一个小部件(第三方),它根据父元素的大小计算他的大小。它不起作用,因为在创建小部件期间父元素的大小为 0。仅当我在页面完全加载时显式调用 onResize() 方法时,它才有效。在 Scheduler.scheduleDeferred 中调用 onResize() 没有帮助,因为它是在页面渲染之前调用的。 如何识别页面已完全渲染并立即调用onResize?

I have a widget (third-party) that calculates his size depending on the size of parent element. It does not work because the size of parent element is 0 during the creating of the widget. It works only if I call the onResize() method explicitly when the page was completely loaded. Calling onResize() in Scheduler.scheduleDeferred does not help because it is calling before the page was rendered.
How can I recognize that the page is completely rendered and immediately call onResize?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文