Rhino 中的 XMLHttpRequest?

2022-01-15 00:00:00 xmlhttprequest javascript java rhino

最近我一直在玩 Java 的 ScriptEngine API,即 javascript 引擎,它使用 Rhino 来处理所有事情.我偶然发现 Rhino 没有 XMLHttpRequest.我想知道是否有人知道解决此问题的可能方法?

Lately I have been playing around with Java's ScriptEngine API, namely the javascript engine, which uses Rhino for everything.. I sumbled upon the fact that Rhino has no XMLHttpRequest. I was wondering if anyone knew of a possible way around this?

推荐答案

您实际上需要在 Java 中定义 XMLHttpRequest.它已经完成了 - 检查 this.

You practically need to define XMLHttpRequest in Java. And it is already done - check this out.

相关文章