Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix Android and cross origin postMessage issue#380

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
dat-boris wants to merge3 commits intoLonelyCpp:master
base:master
Choose a base branch
Loading
fromdat-boris:android-fix

Conversation

@dat-boris
Copy link

@dat-borisdat-boris commentedAug 16, 2025
edited
Loading

The latest version ~2.4.* is broken on Android. This is due to an oddity inreact-native-webview/react-native-webview#356 that the addEventListener needs to be modified for Android WebView. This now fixes the issue.

The previous web version is also broken if we host the iframe on a different domain due to the cross-origin policy. This also ensures that we are more relaxed on targetOrigin.

Fixes#378

Testing

Tested on:

"react-native": "0.79.5""react-native-webview": "13.13.5"
  • works on iOS
  • works on Android
  • works on web-webview (cross orign)

@dat-boris
Copy link
Author

cc@LonelyCpp - thanks for the project! The latest version is broken on android#378

added a fix for this.


if(window.ReactNativeWebView){
// React Native WebView
window.ReactNativeWebView.postMessage(JSON.stringify(msg));
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Note: An interesting quirk is that adding targetOrigin here will break Android native.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Auto play not working in android 16

1 participant

@dat-boris

[8]ページ先頭

©2009-2025 Movatter.jp