我在 Google Chrome 上的 localhost:8080 上運(yùn)行 Vue 應(yīng)用程序,每當(dāng)我刷新頁(yè)面時(shí),我都會(huì)看到:window is normal so RO will run!其次是:RO disabled for this window自動(dòng)記錄到我的控制臺(tái)。我用谷歌搜索了這個(gè),唯一的結(jié)果似乎與 Windows 操作系統(tǒng)有關(guān),但如果相關(guān)的話,我在 Mac 上。為什么會(huì)出現(xiàn)這些控制臺(tái)日志?編輯:以下創(chuàng)建日志消息的函數(shù)似乎是由 WebPack 生成的。它似乎與 Chrome 有關(guān),因?yàn)樵?Firefox 中運(yùn)行時(shí)不會(huì)出現(xiàn)消息。這個(gè)函數(shù)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 將運(yùn)行
明月笑刀無(wú)情
2023-02-17 15:41:30
