[英]How to show a Webview in a Mac Dashboard Widget?
I am making a simple Mac Dashboard widget which would show a webpage in a webview, from a user selectable URL. 我正在制作一个简单的Mac Dashboard小部件,该小部件将通过用户可选的URL在webview中显示一个网页。
To be honest, I assumed there would simply be a 'webview' type part in the Library which I could just drop on. 老实说,我认为图书馆中只是一个“ webview”类型的部分,我可以放在上面。 I've tried fiddling with the canvas part and Googling, but to no avail.
我尝试摆弄画布部分和谷歌搜索,但无济于事。
Any ideas of how to simply show http://www.example.com/page.html
in a widget? 关于如何在小部件中简单显示
http://www.example.com/page.html
任何想法?
Thanks! 谢谢!
In case anybody comes here from a search or something, I ended up solving my problem by just viewing the widget's HTML and adding an <iframe>
to it. 如果有人通过搜索或其他方式来这里,我最终通过仅查看小部件的HTML并向其中添加
<iframe>
来解决了我的问题。 Don't know why I didn't think of that before, but it all works fine. 不知道为什么我以前没有想到过,但是一切正常。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.