Closed leonardfischer closed 7 years ago
since support is not universal (IE10+) and some older versions need vendor prefixes, we probably cannot standardise the event universally enough for it to be part of mootools-core. As such, I think your code is fine as is (just put it in a closure) - or use something like this:
https://github.com/ai/visibilityjs - which does several things, like fallback to blur / focus and hides the events name in case they need prefixing.
unrelated. are you the solidsnek from QL? :D
Hi, thats too bad, but I understand your point. I'll take a look at visibilityjs, thanks! I guess this ticket can be closed then?
And nope, just chose this nick many years ago because I'm a huge fan of "Metal Gear Solid"
Hi, right now it is not possible to observe "visibilitychange" events with MooTools.
I used this code to implement it (found here https://davidwalsh.name/page-visibility)
But because of the use of the "visibilityChange" variable, I can't use this as part of
addEvents