mirror of
https://github.com/dart-lang/sdk
synced 2024-09-06 00:59:09 +00:00
![Joshua Litt](/assets/img/avatar_default.png)
Adds an experimental `@trustTypes` annotation which can be used during migration to static interop to preserve the older semantics for JS interop. Change-Id: Ic00a6c968b15f8c8f5d0840b82db5a6670eaf0eb Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241362 Reviewed-by: Riley Porter <rileyporter@google.com> Reviewed-by: Srujan Gaddam <srujzs@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com> Commit-Queue: Joshua Litt <joshualitt@google.com>
13 lines
430 B
Dart
13 lines
430 B
Dart
// Copyright (c) 2022, 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.
|
|
|
|
import 'package:js/js.dart';
|
|
|
|
@JS()
|
|
@staticInterop
|
|
@trustTypes
|
|
class Incorrect {}
|
|
// ^
|
|
// [web] JS interop class 'Incorrect' has an `@trustTypes` annotation, but `@trustTypes` is only supported within the sdk.
|