我在 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);
})
});
});
}
一只名叫tom的猫
相关分类