f6d67a549b
For this to work properly, we first need the test infrastructure to have support for the `--output-directory` flag (see base CL) Change-Id: I75f788d19ad3b4e9523830250c4a1c9de8418cda Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104400 Reviewed-by: Johnni Winther <johnniwinther@google.com>
28 lines
731 B
Dart
28 lines
731 B
Dart
// Copyright (c) 2019, 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.
|
|
|
|
/// Calls to [console.log] and to [log] from other modules don't work if the
|
|
/// js-interop annotations are not preserved. However, calls via [log2] and
|
|
/// [log3] do work because the annotation is available when compiling this
|
|
/// module.
|
|
@JS()
|
|
library log;
|
|
|
|
import 'package:js/js.dart';
|
|
|
|
@JS()
|
|
class Console {
|
|
@JS()
|
|
external void log(arg);
|
|
}
|
|
|
|
@JS('console')
|
|
external Console get console;
|
|
|
|
@JS('console.log')
|
|
external void log(String s);
|
|
|
|
void log2(String s) => log(s);
|
|
void log3(String s) => console.log(s);
|