miniquery fix checking for window.CustomEvent