我在 Google Chrome 上的 localhost:8080 上運行 Vue 應用程序,每當我刷新頁面時,我都會看到:window is normal so RO will run!其次是:RO disabled for this window自動記錄到我的控制臺。我用谷歌搜索了這個,唯一的結果似乎與 Windows 操作系統有關,但如果相關的話,我在 Mac 上。為什么會出現這些控制臺日志?編輯:以下創建日志消息的函數似乎是由 WebPack 生成的。它似乎與 Chrome 有關,因為在 Firefox 中運行時不會出現消息。這個函數index.js似乎拋出了第一條日志:function initRo() { if (problematicChromeVersion === undefined) { problematicChromeVersion = isProblematicChromeVersion(); } return new Promise((resolve, reject) => { $(document) .ready(function () { return utils.getCurrentWindow() .then((windowResp) => { if (windowResp.window.type !== 'normal') { throw(`window is ${windowResp.window.type} so RO wont run!`) } console.log(`window is ${windowResp.window.type} so RO will run!`); isRoAllowedOnPage = windowResp.isAllowed; if (!isRoAllowedOnPage) { throw DISABLED_RO_MSG; } }) .then(() => initExtension(isRoAllowedOnPage)) .then(() => initButtons()) .then(() => initLoader(isRoAllowedOnPage)) .then(() => initIFrame()) .then(() => resolve()) .catch(function (err) { reject(err); }) }); });}
Windows 正常,因此 RO 將運行
明月笑刀無情
2023-02-17 15:41:30