是否可以在Dart中写出GNOME扩展并将其编译为JS?
从理论上讲,看起来应该有可能。有: dart-to-javascript编译器甚至 package togpain in dart and frother 。
但是我没有找到任何资源。有人尝试过吗?是否有人知道这是不可能的?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
简短的答案:也许,但我严重怀疑这是值得的。
要对JavaScript做任何有用的事情,您需要为, node.js 或 gnome 在GJ中。 DART似乎使用其
Web
库及其自己的平台支持Web API,并使用vm
库来支持Web API。您也许可以编写一个可以从一部分向GJ转移到GJ的转介剂,但是使用任何现有的Dart Transpiler可能是不可能的。
Short answer: maybe, but I seriously doubt it's worth the effort.
To do anything useful with JavaScript, you need to write for a platform like the Web API, node.js, or GNOME in the case of GJS. Dart seems to support the Web API with its
web
library and its own platform with thevm
library.You might be able to write a transpiler that could transpose from a subset of Dart to GJS, but using any existing dart transpiler is probably impossible.