gpt4 book ai didi

javascript - window.onpaint 是什么?

转载 作者:搜寻专家 更新时间:2023-11-01 05:23:06 25 4
gpt4 key购买 nike

有人推荐here window.onpaint 用于在页面加载之前运行一些 javascript。我以前从未真正见过这个,有人能解释一下它的用法/用处吗?

最佳答案

来自 the MDN :

onpaint doesn't work currently, and it is questionable whether this event is going to work at all, see bug 239074.

所以有用性为零。

这可能取决于您的确切用例,但如果您想“在页面加载之前”运行脚本,最简单的解决方案可能是将它放在 head 中。

关于javascript - window.onpaint 是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23657239/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com