“Violation readystatechange handler took 760ms” after update to latest Chrome

China☆狼群 提交于 2019-12-10 12:49:05

问题


After updating to the latest Google Chrome release we are getting errors when we open colorbox on our website:

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

This only happens sometimes and when we get those errors colorbox isn't working properly, is there maybe a bug on Google Chrome?

edit: Magento merging javascript is causing the error, it's not working right, if I don't merge them I don't get these errors and it's loading correctly

 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)

回答1:


Chrome is just saying that your code is blocking the UI too much.



来源:https://stackoverflow.com/questions/43274361/violation-readystatechange-handler-took-760ms-after-update-to-latest-chrome

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!