Closed patrickklick closed 7 years ago
When I bind to the callback function, the "this" variable isn't the element, its the window.
ie:
document.arrive(".my_class", function (item) { console.log(this, item); }.bind(null, myItem))
The this variable is returned as the window object. Can this be fixed?
this
I think the first argument passed to bind always overrides this. In case it's null, this becomes window. Check out the js fiddle https://jsfiddle.net/1xd0rh45/
bind
null
window
When I bind to the callback function, the "this" variable isn't the element, its the window.
ie:
The
this
variable is returned as the window object. Can this be fixed?