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

[dartpad_ui] Use the new cross origin window support from pkg:web #3068

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

parlough
Copy link
Member

No description provided.

Copy link

PR Health

Breaking changes ✔️
Package Change Current Version New Version Needed Version Looking good?
Changelog Entry ✔️
Package Changed Files

Changes to files need to be accounted for in their respective changelogs.

Coverage ✔️
File Coverage

This check for test coverage is informational (issues shown here will not fail the PR).

API leaks ✔️

The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.

Package Leaked API symbols
License Headers ✔️
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
Files
no missing headers

All source files should start with a license header.

Unrelated files missing license headers
Files
pkgs/samples/lib/brick_breaker.dart
pkgs/samples/lib/default_dart.dart
pkgs/samples/lib/default_flutter.dart
pkgs/samples/lib/fibonacci.dart
pkgs/samples/lib/google_ai.dart
pkgs/samples/lib/hello_world.dart
pkgs/samples/lib/main.dart
pkgs/samples/lib/sunflower.dart
pkgs/samples/tool/samples.dart
Package publish validation ✔️
Package Version Status

Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

@parlough parlough requested a review from devoncarew October 1, 2024 20:08
@@ -11,7 +11,7 @@ import 'model.dart';
/// Listen to frame messages if embedded as an iFrame
/// to accept injected snippets.
void handleEmbedMessage(AppServices services, {bool runOnInject = false}) {
final parent = web.window.parent;
final parent = web.window.parentCrossOrigin;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For my own edification - this is nullable? Or, won't throw in cross origin situations?

Copy link
Member Author

@parlough parlough Oct 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

window.parent was nullable as well, this just won't throw when calling its members (postMessage) when cross origin due to implicit null or types assertions that the web compilers would add.

@parlough parlough merged commit 26580f5 into main Oct 1, 2024
12 checks passed
@parlough parlough deleted the misc/pkg-web-cross-origin-window branch October 1, 2024 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants