chromeã§jQueryããevent.returnValue is deprecated. Please use the standard event.preventDefault() instead.ãã£ã¦warningã«ãªã件
æ£ç¢ºã«ã¯è¦ãã¦ããªãããã1.2é±éä½ã®è©±ã
ãã¤ãã®ããã«Chromeã®DevToolã§éçºãã¦ããçªç¶jQueryã§
ãevent.returnValue is deprecated. Please use the standard event.preventDefault() instead.ãã£ã¦è¦ããã¨ç¡ãã¯ã¼ãã³ã°ãåºãããã«ãªã£ãã
å¥ã«ã¨ã©ã¼ããç¡ããåä½ã«ãåé¡ãªãããæ¾ç½®ãã¦ããã§ããããã¼ã¸ãéããã³ã«ã¯ã¼ãã³ã°ã表示ããã¦ãç²¾ç¥è¡ççã«é常ã«ãããããªãã®ã§èª¿ã¹ã¾ããã
以ä¸ã®ãã¼ã¸ãè¦ã¤ãã¾ããã
jQueryを自前でbuildした話。 - ゆず日記
ããã«æ¸ãã¦ããéãã§ãã
ããæ¢ã«ä¿®æ£ããã¦ããã©ãã¾ã ãªãªã¼ã¹ããã¦ãªãã ãã¿ããã§ãã
ã§ããªãªã¼ã¹ãå¾
ã¦ãªãããèªåã§ãã«ãã¨ãããã©ãã®ã§ã¯ã¼ãã³ã°ã®ç®æã ãä¿®æ£ãã¦ã¿ã¾ãã
jQueryã®1.10.2ã ã¨5374-5375è¡ç®ã«ä»¥ä¸ã®ãããªè¨è¿°ãããã¾ãã
this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
ãããã¯ã¼ãã³ã°ã®è©²å½ç®æã§ãã
ã§ãä¸è¨ã®2è¡ãæ¶ããªãã³ã¡ã³ãã¢ã¦ããã¦
https://github.com/silverwind/jquery/compare/patch-defaultPrevented
Githubã§ä¿®æ£ããã¦ããæ§ã«ä¿®æ£ãã¾ãã
//this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || // src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; this.isDefaultPrevented = src.defaultPrevented ? returnTrue : returnFalse;
ãã£ãããã ãã§ãï½ï¼
ã¨ã©ã¼ãã¯ã¼ãã³ã°ãç¡ãã¨ã¬ã¬ã³ããªDevToolãæ»ã£ã¦ãã¾ããï¼
minifyããã¦ãã½ã¼ã¹ã®æ¹ã¯é å¼µã£ã¦è¦ã¤ããããä¸æ¦å§ç¸®ããã¦ãªãæ¹ãæã£ã¦ãã¦ä¿®æ£ãã¦Google先生の圧縮ツールãå©ç¨ãããªããã¦å§ç¸®ãã¾ãããã
ã¡ãªã¿ã«ãä½æ
åãããã£ããã°ãçªç¶åºãããã«è¡¨ç¤ºãããããã«ãªã£ããã¯ãããã¾ããã§ããã
ããããChromeã®ã¢ãããã¼ãã ã¨æãã®ã§ãããããã¾ã§è¸ã¿å
¥ãã¨æããããªããªããããªã®ã§ãã®è¾ºã§ã
2013/11/25追è¨ï¼
ã³ã¡ã³ãã«ã¦æ
å ±ãé ãã¾ãããï¼ããããã (id:Yuzuemon)ãããããã¨ããããã¾ãï¼ï¼
çºçææã¯2013å¹´9æã®åæ¬ã§ããåãchromeã®ã¢ãããã¼ããã¼ã£ã¦ãã ãã§ãã
#14320 (Calling 'ev.preventDefault()' on latest Chrome Canary (31.0.1619.0) triggers a warning) – jQuery Core - Bug Tracker
ã½ã¼ã¹ãæ¢ã«ä¿®æ£ããããã®ãå
¬å¼ã§ããã£ã¦ã¾ããã
http://code.jquery.com/jquery/
2ç³»ã®ææ°2.1.0-bata2ã¨ã1ç³»ã®ææ°1.11.0-beta2ãä¿®æ£æ¸ã¿ã®ãã®ã§ãã確èªãããã¡ããã¨ç´ã£ã¦ã¾ããã
ãããã³ã¬ã¯ä¸å¿ãã¼ã¿ãªã®ã§ã¾ãéã£ããã°ãããæ½ãã§ããããªã®ã§ããã«çæããªãã¨ã§ããã