matthieua / WOW

Reveal CSS animation as you scroll down a page
https://www.delac.io/WOW/
9.92k stars 4.11k forks source link

Problem with this/window using require() #264

Open RobertGres opened 8 years ago

RobertGres commented 8 years ago

Hi, @matthieua !

When requireing wowjs with browserify using node package or simple js file, this inside an iife becomes module.exports instead of originally intended window object.

So I propose instead of using something like this: MutationObserver = this.MutationObserver || this.WebkitMutationObserver || this.MozMutationObserver ... Write explicit code like this: MutationObserver = window.MutationObserver || window.WebkitMutationObserver || window.MozMutationObserver ...

I hope that this script isn't forgotten and will be updated with ES6 features and stuff!

reliq commented 8 years ago

I have the same issue. @matthieua would you have a look at this issue?

ghost commented 7 years ago

+1

arthens commented 7 years ago

Just ran into this problem too

phifa commented 6 years ago

anybody having a bugfix?