WebView.SetIsJavaScriptAlertEnabled 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
SetIsJavaScriptAlertEnabled(BindableObject, Boolean) |
设置一个布尔值,该值指示 Web 视图是否允许 JavaScript 警报。 |
SetIsJavaScriptAlertEnabled(IPlatformElementConfiguration<Windows,WebView>, Boolean) |
设置一个布尔值,该值指示 Web 视图是否允许 JavaScript 警报。 |
SetIsJavaScriptAlertEnabled(BindableObject, Boolean)
设置一个布尔值,该值指示 Web 视图是否允许 JavaScript 警报。
public static void SetIsJavaScriptAlertEnabled (Xamarin.Forms.BindableObject element, bool value);
static member SetIsJavaScriptAlertEnabled : Xamarin.Forms.BindableObject * bool -> unit
参数
- element
- BindableObject
要设置其 JavaScript 警报权限的 Web 视图元素。
- value
- System.Boolean
若为 ,则允许 JavaScript 警报。 否则为 false
。
适用于
SetIsJavaScriptAlertEnabled(IPlatformElementConfiguration<Windows,WebView>, Boolean)
设置一个布尔值,该值指示 Web 视图是否允许 JavaScript 警报。
public static Xamarin.Forms.IPlatformElementConfiguration<Xamarin.Forms.PlatformConfiguration.Windows,Xamarin.Forms.WebView> SetIsJavaScriptAlertEnabled (this Xamarin.Forms.IPlatformElementConfiguration<Xamarin.Forms.PlatformConfiguration.Windows,Xamarin.Forms.WebView> config, bool value);
static member SetIsJavaScriptAlertEnabled : Xamarin.Forms.IPlatformElementConfiguration<Xamarin.Forms.PlatformConfiguration.Windows, Xamarin.Forms.WebView> * bool -> Xamarin.Forms.IPlatformElementConfiguration<Xamarin.Forms.PlatformConfiguration.Windows, Xamarin.Forms.WebView>
参数
要设置其 JavaScript 警报权限的 Web 视图元素的平台配置。
- value
- System.Boolean
若为 ,则允许 JavaScript 警报。 否则为 false
。
返回
开发者可对其进行进一步方法调用的 fluent 对象。