Add support for dart2wasm+Safari#2486
Draft
eyebrowsoffire wants to merge 5 commits intodart-lang:masterfrom
Draft
Add support for dart2wasm+Safari#2486eyebrowsoffire wants to merge 5 commits intodart-lang:masterfrom
eyebrowsoffire wants to merge 5 commits intodart-lang:masterfrom
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 |
natebosch
reviewed
Apr 15, 2025
natebosch
approved these changes
Apr 17, 2025
Comment on lines
+19
to
+22
| dom.window.parent.postMessage( | ||
| {'messageType': 'port', 'href': dom.window.location.href}, | ||
| dom.window.location.origin, | ||
| [channel.port2]); |
Member
There was a problem hiding this comment.
This change is not backwards compatible. A compatible host.dart needs to be rolled out everywhere before we can land this change.
Contributor
Author
There was a problem hiding this comment.
I suppose maybe I could post two messages, one that is just the 'port' string and the other that's the new structured message?
Contributor
Author
There was a problem hiding this comment.
Hmm, that won't work because we're transferring the port.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR attempts to enable dart2wasm testing with Safari. For whatever reason, in Safari, the
message.source.location?.hrefcheck 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