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

postMessage not working #158

Open
JJins opened this issue Dec 29, 2021 · 4 comments
Open

postMessage not working #158

JJins opened this issue Dec 29, 2021 · 4 comments
Labels
blocked Blocked by framework capabilities bug Something isn't working

Comments

@JJins
Copy link

JJins commented Dec 29, 2021

When I do something like window.open and post data to that new open window in a user script, nothing works. That window couldn’t receive any message. Same code works well on safari browser or alook app.
Trying this scripts on android.
Platform: ios
App version: 2.6.3

@Manuito83
Copy link
Owner

Hi, thanks. Could you provide a small example? I'm not really sure if that's possible with the webview implementation.

Your other tests (Safari, etc.) are on mobile or desktop? You said you are trying on Android, but then also mentioned iOS as a platform.

@JJins
Copy link
Author

JJins commented Dec 29, 2021

iOS Pda

tab A:

let newWindow = window.open('https://example.com')
window.setInterval(()=>{
  newWindow.postMessage('connect', '*')
},1000)

tab B (newWindow):

window.addEventListener("message", (e) => {
  console.log(e.data);
}, false);

tab B (newWindow) couldn't get any message from tab A.

@JJins
Copy link
Author

JJins commented Dec 29, 2021

Sorry for the late reply, we are RWing...
I usually use iOS device, did not have a chance to test this on some Android devices. But I tested this api works well on other Browser.
BTW PDA is awsome, many of our members are using your app. Thanks a lot for your contribution!

@Manuito83
Copy link
Owner

Thanks! I'll have a look when I can. I don't think there is direct communication between tabs due to framework restrictions, but there might be a way around it with the webview implementation I use.

@Manuito83 Manuito83 self-assigned this Jan 2, 2022
@Manuito83 Manuito83 added the bug Something isn't working label Jan 2, 2022
@Manuito83 Manuito83 added the blocked Blocked by framework capabilities label Apr 23, 2022
@Manuito83 Manuito83 added the P2 label Feb 9, 2024
@Manuito83 Manuito83 removed their assignment Feb 10, 2024
@Manuito83 Manuito83 removed the P2 label Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Blocked by framework capabilities bug Something isn't working
Projects
Status: Blocked
Development

No branches or pull requests

2 participants