更新Google Chrome v57.0.2987后,
打开Collorbox时,我们的网站出现错误:
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
[Violation] 'readystatechange' handler took 760ms
[Violation] Forced reflow while executing JavaScript took 51ms
[Violation] Forced reflow while executing JavaScript took 43ms
[Violation] Forced reflow while executing JavaScript took 38ms
这仅在有时发生。当我们收到这些错误时,Colorbox对我们不起作用。Google Chrome浏览器可能存在错误吗?
编辑:
Magento合并JavaScript导致此错误。这是行不通的。如果我不合并它们,那么我不会得到这些错误,并且正确加载。
VM23586:4 Uncaught TypeError: Cannot set property 'value' of null at choose (eval at <anonymous> (0a9e2e3….js:11743), <anonymous>:4:73) at HTMLImageElement.onclick (letto-moderno-imbottito-prisma.html:1)
Uncaught TypeError: Cannot read property 'close' of undefined at HTMLDivElement.onclick (letto-moderno-imbottito-prisma.html:1)
最佳答案
Chrome只是说您的代码is blocking the UI too much。