gpt4 book ai didi

javascript - Electron < WebView > : Uncaught SyntaxError: Unexpected token

转载 作者:行者123 更新时间:2023-12-03 07:13:37 27 4
gpt4 key购买 nike

在 Windows 上使用我的 Electron 应用程序时(问题未出现在 Mac 上),我开始收到加载到 <webview> 中的一些外部 URL 的错误。标签: Uncaught SyntaxError: Unexpected token ... (我认为这是指传播语法)。

我很难找到解决方案,因为它是一个外部 URL。 https://instagram.com是在我的控制台中产生此错误的网站示例。

这是我的网页 View

<webview src="https://www.instagram.com/" preload="./custom_scripts/preload-manager.js" allowpopups="" webpreferences="webSecurity=no" partition="persist:default"></webview>

使用 Instagram 示例,这是抛出错误的脚本:https://www.instagram.com/static/bundles/es6/ConsumerCommons.js/c86cd1388003.js .

这是包含错误位置的脚本片段

const {
allowStale: c,
onCached: v
} = {
allowStale: !1,
...s
}, p = l[o];

最佳答案

我遇到了同样的问题。进入外部页面的devtool,在网络面板中禁用缓存。有用。但我不知道为什么以及如何摆脱它。

关于javascript - Electron < WebView > : Uncaught SyntaxError: Unexpected token,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55330533/

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