-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expand dom interop to cover more uses (#2066)
Add a `parent` getter on `window`. Use it to post a parent message instead of a private copy of the JS interop for the same. This had been using `@JS()` locally as a workaround for a bug in `dart:html`, and now that we aren't using `dart:html` anywhere in this code we can drop the extra copy. Expose the `source` field on `MessageEvent`. Use `js_util` to read the properties which may be missing to get to the `href` for the message. Trying to read the field through `dart:html` could throw, but after the migration to `@JS()` style interop the difference interfaces for the event source can be handled safely. Even though the host is no longer reading the href key from the messages they are still sent from the frame side for backwards compatibility with other host implementations. See #2065
- Loading branch information
Showing
4 changed files
with
19 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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