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 #39

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

Can you send the pull request on dev branch?

majames commented 8 years ago

Will do.

majames commented 8 years ago

new pr can be found here: https://github.com/uzairfarooq/arrive/pull/40