Share via


WebView.SetIsJavaScriptAlertEnabled Method

Definition

Overloads

SetIsJavaScriptAlertEnabled(BindableObject, Boolean)

Sets a Boolean value that tells whether the web view allows JavaScript alerts.

SetIsJavaScriptAlertEnabled(IPlatformElementConfiguration<Windows,WebView>, Boolean)

Sets a Boolean value that tells whether the web view allows JavaScript alerts.

SetIsJavaScriptAlertEnabled(BindableObject, Boolean)

Source:
WebView.cs
Source:
WebView.cs

Sets a Boolean value that tells whether the web view allows JavaScript alerts.

public:
 static void SetIsJavaScriptAlertEnabled(Microsoft::Maui::Controls::BindableObject ^ element, bool value);
public static void SetIsJavaScriptAlertEnabled (Microsoft.Maui.Controls.BindableObject element, bool value);
static member SetIsJavaScriptAlertEnabled : Microsoft.Maui.Controls.BindableObject * bool -> unit
Public Sub SetIsJavaScriptAlertEnabled (element As BindableObject, value As Boolean)

Parameters

element
BindableObject

The web view element whose JavaScript alert permissions to set.

value
Boolean

True to allow JavaScript alerts. Otherwise, false.

Applies to

SetIsJavaScriptAlertEnabled(IPlatformElementConfiguration<Windows,WebView>, Boolean)

Source:
WebView.cs
Source:
WebView.cs

Sets a Boolean value that tells whether the web view allows JavaScript alerts.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Maui::Controls::IPlatformElementConfiguration<Microsoft::Maui::Controls::PlatformConfiguration::Windows ^, Microsoft::Maui::Controls::WebView ^> ^ SetIsJavaScriptAlertEnabled(Microsoft::Maui::Controls::IPlatformElementConfiguration<Microsoft::Maui::Controls::PlatformConfiguration::Windows ^, Microsoft::Maui::Controls::WebView ^> ^ config, bool value);
public static Microsoft.Maui.Controls.IPlatformElementConfiguration<Microsoft.Maui.Controls.PlatformConfiguration.Windows,Microsoft.Maui.Controls.WebView> SetIsJavaScriptAlertEnabled (this Microsoft.Maui.Controls.IPlatformElementConfiguration<Microsoft.Maui.Controls.PlatformConfiguration.Windows,Microsoft.Maui.Controls.WebView> config, bool value);
static member SetIsJavaScriptAlertEnabled : Microsoft.Maui.Controls.IPlatformElementConfiguration<Microsoft.Maui.Controls.PlatformConfiguration.Windows, Microsoft.Maui.Controls.WebView> * bool -> Microsoft.Maui.Controls.IPlatformElementConfiguration<Microsoft.Maui.Controls.PlatformConfiguration.Windows, Microsoft.Maui.Controls.WebView>
<Extension()>
Public Function SetIsJavaScriptAlertEnabled (config As IPlatformElementConfiguration(Of Windows, WebView), value As Boolean) As IPlatformElementConfiguration(Of Windows, WebView)

Parameters

config
IPlatformElementConfiguration<Windows,WebView>

The platform configuration for the web view element whose JavaScript alert permissions to set.

value
Boolean

True to allow JavaScript alerts. Otherwise, false.

Returns

A fluent object on which the developer may make further method calls.

Applies to