addEventListenerã®ç¬¬äºå¼æ°ã¯ãé¢æ°ä»¥å¤ã«ããhandleEventãã¡ã½ããã¨ãã¦æã£ããªãã¸ã§ã¯ãã渡ããã¨ãåºæ¥ãã window.addEventListener("click", { handleEvent: function (e) { console.log(e); } }, false); ã¾ãããã®ä»æ§ãå©ç¨ããã¨ã ({ run: function () { window.addEventListener("click", this, false); this.counter = 0; }, handleEvent: function () { this.counter++ if (this.counter < 3) alert(this.counter + "clicked!"); else this.destroy(); }, destroy: fun
{{#tags}}- {{label}}
{{/tags}}