Implementing page loading detection after click in Firefox native mode