886624cbf9
Fixes these: https://dart-ci.firebaseapp.com/#showLatestFailures=true&configurations=dart2js-minified-csp-linux-chrome Change-Id: I2939e3ce1fdee45d570d038f2f4382747cd617dc Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/436140 Commit-Queue: Nate Biggs <natebiggs@google.com> Reviewed-by: Mayank Patke <fishythefish@google.com>
15 lines
381 B
Dart
15 lines
381 B
Dart
// Copyright (c) 2025, 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 "dart:js" as js;
|
|
|
|
final isCspEnabled = (() {
|
|
try {
|
|
js.context.callMethod('eval', ['5;']);
|
|
return false;
|
|
} catch (e) {
|
|
return true;
|
|
}
|
|
})();
|