uzairfarooq / arrive

Watch for DOM elements creation and removal
MIT License
869 stars 99 forks source link

'this' is not guaranteed to be bound to the window object #40

Closed majames closed 8 years ago

majames commented 8 years ago

Passing in 'this' into the top level closure in arrive.js assumes that it is bound to the browser 'window' object.

It is safer to pass in 'window' object directly because 'this' is not guaranteed to be bound to the window object when arrive.js is used in build tools like gulp, webpack, etc...

uzairfarooq commented 8 years ago

I wanted the target branch to be dev i.e. uzairfarooq:dev :) Sorry if it wasn't clear earlier.