Slide 14
Slide 14 text
ରࡦ
this.el.find(‘.show-button’).on('click', this.showModal.bind(this));
this.el.find(‘.hide-button').on('click', this.hideModal.bind(this));
• มʹ this ΛೖΕ͓͍ͯͯɺมΛ͏ɻself, that, _this ͳͲ͕Α͘ΘΕΔɻ
var self = this;
this.el.find('.show-button').on('click', function(e) {
self.showModal();
});
this.el.find('.hide-button').on('click', function(e) {
self.hideModal();
});
• Function.prototype.bind Ͱ this Λࢦఆͨؔ͠Λ࡞ΔɻIE9 Ҏ߱Ͱ͑Δ͕ PhantomJS
Ͱ͑ͳ͍ͷͨΊɺCI Ͱཁҙɻes5-shim ͳͲΛೖΕΕ͑ΔΑ͏ʹͳΔɻ