-
Notifications
You must be signed in to change notification settings - Fork 217
Add support for dart2wasm+Safari #2486
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
base: master
Are you sure you want to change the base?
Add support for dart2wasm+Safari #2486
Conversation
PR HealthChangelog Entry ❗
Changes to files need to be accounted for in their respective changelogs. This check can be disabled by tagging the PR with |
dom.window.parent.postMessage( | ||
{'messageType': 'port', 'href': dom.window.location.href}, | ||
dom.window.location.origin, | ||
[channel.port2]); |
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.
This change is not backwards compatible. A compatible host.dart
needs to be rolled out everywhere before we can land this change.
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 suppose maybe I could post two messages, one that is just the 'port' string and the other that's the new structured message?
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.
Hmm, that won't work because we're transferring the port.
This PR attempts to enable dart2wasm testing with Safari. For whatever reason, in Safari, the
message.source.location?.href
check on the message that sends the port from the iframe to the host window actually returns the parent frame rather than the iframe's href, and only when dart2wasm is used. This changes the logic to explicitly add this value to the message being sent to avoid this problem.This fixes #2482