-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expose several internal fields and add factory functions #182
base: main
Are you sure you want to change the base?
Conversation
This adds a common webView field to the IWebView interface allowing multiplatform code to access the native web view. This native web view is exposed in the WebViewState.
Please review this PR and hopefully create a new release! Thanks. |
@coderforlife Thanks for your contribution! I will review it this week and give you feedback! Thanks! |
@coderforlife Great jobs! Could you please add the wrapper function to match the old version? Thank you! |
Changes complete. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great Jobs!
This works to address #181.
Changes:
expect
/actual
set of typealiases is made for each platform defining aNativeWebView
as eitherandroid.webkit.WebView
,WKWebView
, orKCEFBrowser
.webView
field in each platform'sIWebView
is publicly exposed as aNativeWebView
WebViewState
has a new fieldnativeWebView
which publicly exposes this in the state without exposing anything elseonCreate
andonDispose
callbacks ofWebView()
composable take aNativeWebView
argument{ }
around the callback call to make it work again.factory
function to theWebView()
composable that allows the caller to specify how web view objects should be created.WebView()
composable is theonDispose
callback and moved the lambda out of the paratheses will have to move it into the paratheses.Both of the minor issues could be mitigated with creating a wrapper function that matches the old version. If you want this added, I can add it to the PR.