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!
Hi, @matthieua !
When requireing wowjs with browserify using node package or simple js file,
this
inside an iife becomesmodule.exports
instead of originally intendedwindow
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!