iOS WKWebView WKPreferences

iOS WKWebView WKPreferences

A WKPreferences object encapsulates the preference settings for a web view. The preferences object associated with a web view is specified by its web view configuration.

WKPreferences对象封装了WebView的首选项设置。与WebView关联的首选项对象由指定其WebViewConfiguration

/** @abstract The minimum font size in points.
     @discussion The default value is 0.
     */最小字体大小(以磅为单位)
    open var minimumFontSize: CGFloat

    
    /** @abstract A Boolean value indicating whether JavaScript is enabled.
     @discussion The default value is YES.
     */开启JS
    open var javaScriptEnabled: Bool

    
    /** @abstract A Boolean value indicating whether JavaScript can open
     windows without user interaction.
     @discussion The default value is NO in iOS and YES in OS X.
     */JavaScript可以打开没有用户交互的窗口
    open var javaScriptCanOpenWindowsAutomatically: Bool

    
    /** @abstract A Boolean value indicating whether warnings should be
     shown for suspected fraudulent content such as phishing or malware.
     @discussion The default value is YES. This feature is currently available
     in the following region: China.
     */是否应警告针对可疑的欺诈性内容(例如网络钓鱼或恶意软件)显示
     	该功能目前在中国可用
    @available(iOS 13.0, *)
    open var isFraudulentWebsiteWarningEnabled: Bool


extension WKPreferences {
	//是否启用Java --- Deprecated
    open var javaEnabled: Bool
	//是否启用了插件 --- Deprecated
    open var plugInsEnabled: Bool
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值