如何判断 cocoa webview 何时更新

发布于 2024-12-19 11:34:05 字数 347 浏览 2 评论 0 原文

我有一个托管在 NSWindow 中的可可 webview。我希望在网络视图更新任何内容时收到通知。我没有看到相关的 cocoa api 允许我这样做。理想情况下,我希望无需修改 webkit 源代码即可执行此操作,即使用现有的 cocoa api。我尝试使用 NSWindow 的委托在 NSwindow 更新时收到通知,但这并不涵盖所有 webview 更新。

在 Windows 上,我修改了 webkit 源代码,我可以访问:

IWebUIDelegatePrivate2::WebViewPainted

关于我可以尝试什么的任何想法?

I have a cocoa webview hosted in an NSWindow. I'd like to be notified whenever the webview updates any content. I don't see a relevant cocoa api to allow me to do this. Ideally, I'd like to do this without having to modify webkit source, ie use existing cocoa api. I've tried using NSWindow's delegate to be notified whenever the NSwindow updates, but this doesn't cover all the webview updates.

On windows, where I modified webkit source, I had access to:

IWebUIDelegatePrivate2::WebViewPainted

Any ideas on what I could try?

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

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

发布评论

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

评论(1

烟燃烟灭 2024-12-26 11:34:05

WebResourceLoadDelegate 协议可让您跟踪加载内容,但我认为这不会帮助您进行 dhtml 类型更新。

There is the WebResourceLoadDelegate protocol which lets you track loading content but I dont think that will help you with dhtml type updates.

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