问题
Here is the code snippet that facilitates the INSPECT ELEMENT in WkWebView
preferences.setValue(true, forKey:"developerExtrasEnabled")
Here is the screenshot of INSPECT ELEMENT working in OSX(right click)
Right click is equivalent to Tap & Hold in iOS But I am not able to see anything like I see in OSX
Here is the complete code if anybody wants to try
回答1:
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.
来源:https://stackoverflow.com/questions/34927983/why-inspect-element-or-web-inspector-or-developerextrasenabled-wkwebview-is-no