gpt4 book ai didi

jquery - 在 node-webkit 中使用 JQuery 是不可能的

转载 作者:太空宇宙 更新时间:2023-11-03 22:14:47 24 4
gpt4 key购买 nike

我正在尝试在node-webkit 0.12.3版本中使用jquery。我通过添加

成功完成了此操作
<script src="js/jquery-2.1.4.js" type="text/javascript"></script>

到我的index.html。

我已经在版本 0.12.2 中成功完成了此操作,但现在我收到一个我无法理解的错误。我在日志中收到警告。

Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.

紧接着出现错误

Failed to load resourcejquery-2.1.4.js:8630 file:///.../jquery-2.1.4.js send

这是下面一行xhr.send( options.hasContent && options.data || null );

我读到,我访问另一个应用程序的文件系统可能会出现问题,但这是不正确的。

我做错了什么?

最佳答案

你应该像“superagent”一样使用nodejs模块而不是ajax。如果你想使用 jquery,你应该托管本地 http 服务器并在你的服务器上添加 cros 域;

关于jquery - 在 node-webkit 中使用 JQuery 是不可能的,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32612163/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com