-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add support for alert
and confirm
#76
Conversation
fd451ca
to
09b2d5c
Compare
packages/turbo/android/src/main/java/com/reactnativeturbowebview/RNWebChromeClient.kt
Outdated
Show resolved
Hide resolved
packages/turbo/android/src/main/java/com/reactnativeturbowebview/RNWebChromeClient.kt
Outdated
Show resolved
Hide resolved
packages/turbo/android/src/main/java/com/reactnativeturbowebview/RNWebChromeClient.kt
Outdated
Show resolved
Hide resolved
packages/turbo/android/src/main/java/com/reactnativeturbowebview/RNVisitableView.kt
Outdated
Show resolved
Hide resolved
let session = Session(webViewConfiguration: webViewConfiguration) | ||
session.delegate = self | ||
session.webView.allowsLinkPreview = false | ||
session.webView.uiDelegate = self.wkUiDelegate |
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.
Maybe let's remove wkUiDelegate
variable and set TurboUIDelegate(uiHandler: self)
here? We don't use self.wkUiDelegate
anywhere.
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.
I did it because uiDelegate is weak property. Is there better way of making it correct in swift? 🤔
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.
I did it because uiDelegate is weak property.
You're right, let's leave it as it is.
Add new props to VisitableView to support web
alert
andconfirm
dialogs.There is also default support for both (that was missing before). So both
alert
andconfirm
will now work as React Native'sAlert.alert
call.