为什么INSPECT ELEMENT或WEB INSPECTOR或者developerExtrasEnabled(WkWebView)在iOS中不起作用它为OSX工作 [英] Why INSPECT ELEMENT or WEB INSPECTOR or developerExtrasEnabled (WkWebView) is not working in iOS While its working for OSX

查看:463
本文介绍了为什么INSPECT ELEMENT或WEB INSPECTOR或者developerExtrasEnabled(WkWebView)在iOS中不起作用它为OSX工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下是便于WkWebView中的INSPECT ELEMENT的代码片段

Here is the code snippet that facilitates the INSPECT ELEMENT in WkWebView

preferences.setValue(true, forKey:"developerExtrasEnabled")

以下是在OSX中工作的INSPECT ELEMENT的屏幕截图(右键单击)

Here is the screenshot of INSPECT ELEMENT working in OSX(right click)

右键单击等同于Tap&在iOS中保留但我无法看到我在OSX中看到的任何内容

Right click is equivalent to Tap & Hold in iOS But I am not able to see anything like I see in OSX

这是完整代码如果有人想尝试

推荐答案

它不可能在iOS中,因为键 developerExtrasEnabled
WKPreference 不是关键值编码兼容所以我们无法使用此功能执行此操作方法。

Its not possible to do in iOS as WKPreference is not key value coding-compliant for the key developerExtrasEnabled so we can't do this using this approach.

这篇关于为什么INSPECT ELEMENT或WEB INSPECTOR或者developerExtrasEnabled(WkWebView)在iOS中不起作用它为OSX工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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