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

[iOS ] Webview opened with windowId does not receive javascript handler callback. #2393

Open
1 of 2 tasks
ttb-inc opened this issue Nov 4, 2024 · 1 comment
Open
1 of 2 tasks
Labels
bug Something isn't working

Comments

@ttb-inc
Copy link

ttb-inc commented Nov 4, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Webview opened with windowId on iOS does not receive javascript handler callback.
This works fine on Android.

Expected Behavior

I also want to get a javascript handler callback from a webview opened by windowId on iOS.

Steps with code example to reproduce

Steps with code example to reproduce
      onCreateWindow: (controller, createWindowAction) async {
          InAppWebView webview = InAppWebView(
               windowId: createWindowAction.windowId,
               ...
               );
        navigator.push(webview);
        return true;
      },
      onWebViewCreated: (controller) {
          controller.addJavaScriptHandler(
            handlerName: 'myJavascriptHandler',
            callback: (arguments) {
                 return 'test return';
             },
            );
      },

Stacktrace/Logs

Stacktrace/Logs
<Replace this line by pasting your stacktrace or logs here>

Flutter version

Channel stable, 3.24.4

Operating System, Device-specific and/or Tool

iOS 16.x, 17.x

Plugin version

flutter_inappwebview: 6.1.5

Additional information

This works fine on Android.

Thank you.

Self grab

  • I'm ready to work on this issue!
@ttb-inc ttb-inc added the bug Something isn't working label Nov 4, 2024
@TeamRemited
Copy link

exactly same here!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants