是否可以在Dart中写出GNOME扩展并将其编译为JS?

发布于 2025-01-22 12:04:16 字数 315 浏览 6 评论 0 原文

从理论上讲,看起来应该有可能。有: dart-to-javascript编译器甚至 package togpain in dart and frother

但是我没有找到任何资源。有人尝试过吗?是否有人知道这是不可能的?

In theory it looks like it should be possible. There is: Dart-to-JavaScript compiler and even package to call JS from Dart and opposite.

But I didn't find any resources about it. Did anybody tried? Does anybody knows for sure that it is not possible?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

带刺的爱情 2025-01-29 12:04:16

简短的答案:也许,但我严重怀疑这是值得的。

要对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 the vm 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文