UIWebView:你能禁用 Javascript 吗?

UIWebView: Can You Disable Javascript?(UIWebView:你能禁用 Javascript 吗?)
本文介绍了UIWebView:你能禁用 Javascript 吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您可以在移动 Safari 和 Cocoa 的 WebView 中禁用 Javascript,但在 UIWebView 中我看不到这样做的方法.

You can disable Javascript in both mobile Safari and Cocoa's WebView but I can see no means of doing so in UIWebView.

我说的对吗?

我问这个问题 关于使用 Javascript 获取 UIWebView 中显示的页面标题.我担心如果禁用 Javascript 会失败,但似乎 API 不允许禁用 Javascript.

I ask in relation to this question regarding obtaining the title of page displayed in an UIWebView using Javascript. I had worried that it would fail if Javascript was disabled but it appears the API does not allow the disabling of Javascript.

如果 Javascript 不能被停用 UIWebView,这会使我之前的问题变得毫无意义.

If Javascript cannot be deactivated UIWebView,that renders my previous question moot.

推荐答案

没有公共 API 可以禁用 Javascript.所以假设它不会被禁用是相当安全的.

There is no public API to disable Javascript. So it is fairly safe to assume that it won't be disabled.

这篇关于UIWebView:你能禁用 Javascript 吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Pushing UIViewController above UITabBar(将UIView控制器推送到UITabBar上方)
How to render something in an if statement React Native(如何在If语句中呈现某些内容Reaction Native)
java.lang.IllegalStateException: SimpleTypeImpl should not be created for error type(异常:不应为错误类型创建SimpleTypeImpl)
userContentController never called back from JS injection(用户内容控制器从未从JS注入回调)
Capture barcode reader (keyboard-wedge) events from javascript(从Java脚本捕获条形码读取器(键盘按钮)事件)
Android IllegalArgumentException: The tag for fragment_XXX is invalid. Received: layout-sw600dp/fragment_XXX_0(Android IlLegalArgumentException:Fragment_XXX的标签无效。收到:Layout-sw600dp/Fragment_XXX_0)