是否可以将 dart 用于 chrome 扩展内容脚本?以下似乎没有调用 main() 中的任何内容
import 'dart:html';
import 'package:js/js.dart' as js;
void main() {
js.context.alert('Hello from Dart via JavaScript');
window.console.log("START!!!");
window.alert("alert");
}
清单.json...
"content_scripts": [
{
"matches": [
"http://docs.google.com/*",
"https://docs.google.com/*"
],
"js": [
"packages/browser/dart.js",
"packages/browser/interop.js",
"packages/js/dart_interop.js",
"out.js"
],
"run_at" : "document_idle",
"all_frames" : false
}
],