Skip to content
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

Feat/refactor webview #3

Merged
merged 9 commits into from
Jul 20, 2023
Merged

Feat/refactor webview #3

merged 9 commits into from
Jul 20, 2023

Conversation

huhuanming
Copy link

No description provided.

commit e33cf02
Author: Yannick Chiron <yannick.chiron@gmail.com>
Date:   Sat Oct 29 17:48:53 2022 +0200

    fix: Store mHasOnOpenWindowEvent state in RNCWebViewManager

commit 0c8ad2e
Author: Yannick Chiron <yannick.chiron@gmail.com>
Date:   Mon Aug 15 21:46:54 2022 +0200

    feat(ios): Call `onOpenWindow` only if react-native props is set

    On iOS, `onOpenWindow` event should be called only if the
    react-native prop is defined

    If not defined, then the default behavior should be run (navigate the
    current WebView to the target link)

commit 3f0b008
Author: Yannick Chiron <yannick.chiron@gmail.com>
Date:   Thu Sep 8 17:47:44 2022 +0200

    feat(android): Call `onOpenWindow` only if react-native props is set

    On Android, `onOpenWindow` event should be called only if the
    react-native prop is defined

    If not defined, then the default behavior should be run (opening the
    device's browser)

commit baedc99
Author: Yannick Chiron <yannick.chiron@gmail.com>
Date:   Wed Sep 7 11:56:13 2022 +0200

    feat(ios): Add `hasTargetFrame` prop on `onShouldStartLoadWithRequest`

    On iOS, current implementation of `onShouldStartLoadWithRequest` does
    not allow to differentiate links that target the current WebView from
    ones that target a new WebView (i.e. `target="_blank"` links).

    In some scenario we want to have this info to prevent the WebView
    navigation

    This info can be useful if `onOpenWindow` event is not registered.
    Otherwise this event will be called instead of
    `onShouldStartLoadWithRequest`

commit 04e7387
Author: Yannick Chiron <yannick.chiron@gmail.com>
Date:   Wed Sep 7 12:13:07 2022 +0200

    chore: Add documentation for `onOpenWindow`

commit 539ba07
Author: Yannick Chiron <yannick.chiron@gmail.com>
Date:   Thu Sep 8 17:46:44 2022 +0200

    chore: Add examples for `onOpenWindow` event

commit 85fa577
Author: Yannick Chiron <yannick.chiron@gmail.com>
Date:   Thu Sep 8 18:24:27 2022 +0200

    feat(ios): Call `onOpenWindow` for links with `target="_blank"`

    On iOS, default behavior is to navigate the WebView to the target URL
    when a link with `target="_blank"` is clicked

    In some scenario we want to be able to intercept this from react-native
    and to handle the link by ourselves (i.e. to open it into an InApp
    Browser)

    The `onOpenWindow` event is now called in this scenario. Then the
    default "open browser" scenario does not occur

    Note that previous implementation only worked in apparence, but the
    WebView ref url would still be updated with new URL even if
    `return nil` is done in `createWebViewWithConfiguration`. So we want to
    intercept this earlier in `decidePolicyForNavigationAction` when the
    WebView did not update its ref yet

commit eb6e3ef
Author: Yannick Chiron <yannick.chiron@gmail.com>
Date:   Thu Sep 8 14:31:07 2022 +0200

    feat(iOS): Add `onOpenWindow` event

    On iOS, default behavior is to navigate the WebView to the target URL
    when `window.open('http://someurl, '_blank')` is called from JS

    In some scenario we want to be able to intercept this from react-native
    and to handle the link by ourselves (i.e. to open it into an InApp
    Browser)

    The `onOpenWindow` event is now called in this scenario. Then the
    default "open browser" scenario does not occur

commit 84fd919
Author: Yannick Chiron <yannick.chiron@gmail.com>
Date:   Mon Sep 5 15:51:56 2022 +0200

    feat(android): Add `onOpenWindow` event

    On Android, default behavior is to open the device's browser when
    `window.open('http://someurl, '_blank')` is called from JS or when a
    link with `target="_blank"` is clicked

    In some scenario we want to be able to intercept this from react-native
    and to handle the link by ourselves (i.e. to open it into an InApp
    Browser)

    The `onOpenWindow` event is now called on those scenario. In this case,
    the default "open browser" scenario does not occur

commit f2fc2c6
Author: Yannick Chiron <yannick.chiron@gmail.com>
Date:   Mon Aug 15 18:56:18 2022 +0200

    chore: Fix iOS example's build instructions
commit 70e84de
Author: semantic-release-bot <semantic-release-bot@martynus.net>
Date:   Wed Nov 23 01:04:51 2022 +0000

    chore(release): 11.24.0 [skip ci]

    # [11.24.0](react-native-webview/react-native-webview@v11.23.1...v11.24.0) (2022-11-23)

    ### Features

    * **ios:** Cookie sync improvements ([react-native-webview#2535](react-native-webview#2535)) ([4ac0d74](react-native-webview@4ac0d74))

commit 4ac0d74
Author: Matias Korhonen <matias.korhonen@kaikuhealth.com>
Date:   Wed Nov 23 03:03:21 2022 +0200

    feat(ios): Cookie sync improvements (react-native-webview#2535)

commit a5e2a9f
Author: Handschrift <privacy.mtehw@aleeas.com>
Date:   Wed Nov 23 00:11:43 2022 +0000

    chore(docs): Add information that custom menu items are only available for iOS (react-native-webview#2748)

commit d6af98f
Author: Caleb Clarke <TheAlmightyBob@users.noreply.github.com>
Date:   Wed Nov 9 12:39:52 2022 -0800

    chore(ci): Update React Native to fix Android build (react-native-webview#2734)

    See facebook/react-native#35210
@huhuanming huhuanming merged commit f4022c0 into master Jul 20, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants