‘event.layerX和event.layerY在WebKit中被破坏和弃用。 错误

我刚刚将Chrome更新到版本16.0.912.63,现在我使用jQuery 1.7.1获得了数百个错误。 鼠标移动时似乎会触发……

event.layerX and event.layerY are broken and deprecated in WebKit. They will be removed from the engine in the near future. 

我应该担心这个吗? 是否有其他人收到这些错误?

我的使用者:

 Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7 

更新:在我的情况下,它是Chrome扩展程序“按图搜索(由Google)1.1.0”。 我只是禁用它,它与我的应用程序无关。

如果是这样的话,你应该只担心这个:

  • 你的网站和
  • 您计划将jQuery升级到将来的版本> 1.7
  • 你在整个地方使用layerXlayerY

该消息只是告诉您这两个属性已被弃用(至少在Webkit中),并且将在不久的将来从jQuery中删除。

就我而言,它是Chrome扩展程序“按图搜索(Google)1.1.0”

与我的申请无关。

禁用它,你将免于这些恼人的错误。

将js添加到js文件页脚:

 (function(){ //remove layerX and layerY var all = $.event.props, len = all.length, res = []; while (len--) { var el = all[len]; if (el != 'layerX' && el != 'layerY') res.push(el); } $.event.props = res; }()); 

你可以尝试一下。