| My vote is to use a well tested and robust library. The one you linked seems to be an implementation of the way we do it currently and the recommended way from the docs. I have no preference in checks but I wonder how effective window.addEventListener is on mobile devices? Any idea? |