如何以编程方式从WebView对象中弹出Webkit的Web Inspector? [英] How can I pop up Webkit's Web Inspector from my WebView object programmatically?

查看:139
本文介绍了如何以编程方式从WebView对象中弹出Webkit的Web Inspector?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何以编程方式从WebView对象中弹出Webkit的Web Inspector?



我成功了在我的WebView上启用Webkit的Web Inspector
它运行良好,现在我可以通过单击上下文菜单上的检查元素弹出它。
我想用我的按钮做到这一点。但我找不到一个正确的方法来做到这一点。
我的DOM知识是10岁,非常新的HTML DOM的现在。
有任何方法吗?



我找到一个类文档: InspectorController 。我认为这是一种关键。但是我不知道什么对象暴露,如何使用这个。



环境:




  • Mac OS X 10.6

  • Xcode 3.2.1(iPhone SDK,无插件)


解决方案

没有公共API通过DOM或Cocoa与WebInspector交互。您应该通过 https://bugreport.apple.com/ 提出增强请求,要求提供此API。 / p>

InspectorController也是WebInspector的内部实现细节,它可能是一个在文档网站上的错误。


How can I pop up Webkit's Web Inspector from my WebView object programmatically?

I succeed to enable Webkit's Web Inspector on my WebView. It's working well, and now I can pop it up by clicking "Inspect Element" on context menu. And I want to do this with my push button. But I couldn't find a proper way to do this. My DOM knowledge is 10 years old, very newbie on HTML DOM of nowadays. Is there any way to do this?

I found a class document: InspectorController. I think this is a kind of key. But I cannot know what object exposes and how can I use this.

Environment:

  • Mac OS X 10.6
  • Xcode 3.2.1 (iPhone SDK, no plug-in)

解决方案

There is no public API for interacting with the WebInspector via the DOM or Cocoa. You should file an enhancement request at https://bugreport.apple.com/ asking for this API.

InspectorController is also an internal implementation detail of the WebInspector and its likely a bug that its on the documentation website.

这篇关于如何以编程方式从WebView对象中弹出Webkit的Web Inspector?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆