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

Expand dom interop to cover more uses #2066

Merged
merged 2 commits into from
Jul 19, 2023
Merged

Expand dom interop to cover more uses #2066

merged 2 commits into from
Jul 19, 2023

Commits on Jul 19, 2023

  1. Expand dom interop to cover more uses

    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
    natebosch committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    a58241c View commit details
    Browse the repository at this point in the history
  2. dart format

    natebosch committed Jul 19, 2023
    Configuration menu
    Copy the full SHA
    a7cad14 View commit details
    Browse the repository at this point in the history