you are right, we can just emit `visibilitychange` event