I am trying to wrap my head around the HTML5 alternate code. I am trying to wrap my head around the .bind(this);
I understand 'this' for the start and it is reffereing to this instance ( I think). But then the call to teh function adds .bind(this). What is the purpose of this when simply calling a function? I tried to revove it, but that casued it to no longer work.
Also, is the 'fl_' important to have in the function name?
Bind forces a function to execute in the desired context, which means the value of "this". Without it, all event handlers execute in the global context, which means "this" points to the browser window object. This is only a problem if the event handler uses "this". Apparently yours does.
Thank you for explaning it.