-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose platform webview for initialization to enable customization (#53)
Fixes #45
- Loading branch information
Showing
4 changed files
with
74 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
#if WINDOWS | ||
using Microsoft.Web.WebView2.Core; | ||
using WebView2Control = Microsoft.UI.Xaml.Controls.WebView2; | ||
#elif ANDROID | ||
using AWebView = Android.Webkit.WebView; | ||
#elif IOS || MACCATALYST | ||
using WebKit; | ||
#elif TIZEN | ||
using TWebView = Tizen.WebView.WebView; | ||
#endif | ||
|
||
namespace HybridWebView | ||
{ | ||
/// <summary> | ||
/// Allows configuring the underlying web view after it has been initialized. | ||
/// </summary> | ||
public class HybridWebViewInitializedEventArgs : EventArgs | ||
{ | ||
#nullable disable | ||
#if WINDOWS | ||
/// <summary> | ||
/// Gets the <see cref="WebView2Control"/> instance that was initialized. | ||
/// </summary> | ||
public WebView2Control WebView { get; internal set; } | ||
#elif ANDROID | ||
/// <summary> | ||
/// Gets the <see cref="AWebView"/> instance that was initialized. | ||
/// </summary> | ||
public AWebView WebView { get; internal set; } | ||
#elif MACCATALYST || IOS | ||
/// <summary> | ||
/// Gets the <see cref="WKWebView"/> instance that was initialized. | ||
/// the default values to allow further configuring additional options. | ||
/// </summary> | ||
public WKWebView WebView { get; internal set; } | ||
#elif TIZEN | ||
/// <summary> | ||
/// Gets the <see cref="TWebView"/> instance that was initialized. | ||
/// </summary> | ||
public TWebView WebView { get; internal set; } | ||
#endif | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters