2014-05-01ãã1ã¶æéã®è¨äºä¸è¦§
Javascriptåå¿è ã«åå¿è ++ç¨åº¦ã®èªåãè¨èªä»æ§ã説æããã¨ãã®ã¡ã¢ï¼ç¬¬ä¸åï¼ã®ç¶ããååã§ã¯prototypeã®ã¡ãªããã®ï¼ã¤ã§ãããè¤æ°ãªãã¸ã§ã¯ãã®é¢æ°ã®å ±æã確èªãããä»åã¯ã次ã®ã¡ãªããã®ãããããããã¿ã¤ããã§ã¼ã³ã«ã¤ãã¦ç¢ºèªãã¦ã¿ãããâ¦
Uncaught TypeError: Cannot use 'in' operator to search for 'model' in #{element} ãããªã¨ã©ã¼ãã§ããã»ã»ã»ãã¶ãBackbone.Viewã®ã³ã³ã¹ãã©ã¯ã¿ã«è¤æ°ã®å¼æ°ã渡ãã¦ããã®ã§ã¯ãinitializeã¯å¼æ°ï¼ã¤ããã¨ããªãã®ã§ãããã·ã¥ã§æ¸¡ãããã ã§ãã¾â¦
Javascriptåå¿è ã«åå¿è ++ç¨åº¦ã®èªåãè¨èªä»æ§ã説æããã¨ãã®ã¡ã¢ï¼ç¬¬ä¸åï¼ Javascriptåå¿è ã«åå¿è ++ç¨åº¦ã®èªåãè¨èªä»æ§ã説æããã¨ãã®ã¡ã¢ï¼ç¬¬äºåï¼ç¬¬ä¸åç®ã¯ãprototypeã¨newã«ææ¦ã ã¾ããprototypeã¨ã¯ãªããªã®ããã¨ãããã¨ãªãã ãã©â¦
method=PATCHãªæ´æ°å¦çããµã¼ããµã¤ãã«ãªã¯ã¨ã¹ããããæ£å¸¸çµäºãããã©ã®ã³ã¼ããè¿ããï¼ã¨ãããã¨ãªãã ãã©ããå¥ã«ã¯ã©ã¤ã¢ã³ãå´ã§200å°ã®ã³ã¼ãå¤å¥ããããããããªãã®ã§ã200ãã¨ããããããã ãã©ãããããã«ãä»ã®ã³ã¼ãã®ç¨éãç¥ã£ãä¸â¦
ä»åã¯thisã«ã¤ãã¦èª¬æãããã¨ã«ææ¦ãä»ã®å¤ãã®è¨èªã§ã¯ããªãã¸ã§ã¯ãã®ã¤ã³ã¹ã¿ã³ã¹èªèº«ãæãäºç´èªã¨ãã¦ãthisã¨ãselfã¨ããããããJavascriptã«ãthisãããã ããJavascriptã®thisã¯ç¶æ³ã«ãã£ã¦æãå 容ãå¤ãã£ã¦ããããããMDNã§ã¯ããthiâ¦
ãªãããã®ã¯ã©ã¹ãã¼ã¹è¨èªã®çµé¨ããã人åãã®Javascriptåå¼·ä¼ã®ç¬¬ä¸åã¡ã¢ã Javascriptã¯ãããã¿ã¤ããã¼ã¹ã®ãªãã¸ã§ã¯ãæåè¨èª ã¯ã©ã¹ãã¼ã¹ã§ã¯ãªããã¨ãããã¨ã ãè¦ãã¦ããã¦å ã«é²ãã ãã¼ã¿å ããªããã£ãã¨ãªãã¸ã§ã¯ãåã®ï¼ç¨®é¡ããâ¦