JavaScriptã®ä¸ã«ã¯ã³ã¼ãããã£ã¨ã·ã³ãã«ã§è¦ãããã§ãããã¿ã¼ã³ãããã®ã«ããã¾ã使ããã¦ããªããã®ãããã¾ããçããã Function.prototype.bind ã¯ãåãã§ããããé »ç¹ã«ä½¿ããã¦ãã var that = this ã var self = this ã®ä»£ããã«ãªãé¢æ°ã§ããããããã®ã以ä¸ã®ãããªä¾ã§ãã this.setup = function () { this.on('event', this.handleEvent.bind(this)); }; 第1å¼æ°ã bind ï¼æç¸ï¼ãããè¿ãããé¢æ°å 㧠this ã¨ãã¦åãã¾ãããã¾ãç¥ããã¦ãã¾ããã bind ã¯è¤æ°ã®ä»®å¼æ°ãåããã¨ãã§ãã bind ãããé¢æ°ãå¼ã³åºããã㨠bind ãããå¾ç¶ã®ãã¹ã¦ã®ä»®å¼æ°ã¯ããã®ä»®å¼æ°ãªã¹ãã®åã«ä»å ããã¾ãã ã¤ã¾ã以ä¸ã®ããã«ãé¢æ°ãé¨åé©ç¨ã
{{#tags}}- {{label}}
{{/tags}}