0

Is there any event that fires while the page is trying to load . I dont mean onload , which fires only after the page has been loaded. I want to use it for when the user is waiting for the new page to load

3
  • 3
    No, but just executing some JS code will probably work. Commented Aug 22, 2018 at 9:14
  • The pickle here would be the definition of 'trying'. Do you mean trying to load the DOM? or downloading the actual page that contains the JavaScript? Commented Aug 22, 2018 at 9:15
  • I meant like a gif or something while the page transition occurs.Yes while trying to load the DOM. Commented Aug 22, 2018 at 9:15

2 Answers 2

1

DOMContentLoaded fires before the onload event.

Sign up to request clarification or add additional context in comments.

Comments

0

There is no such event that you mention. For more information visit this page:

https://javascript.info/onload-ondomcontentloaded

I hope it helps ;)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.