Domcontentloaded and interactive

Source: Internet
Author: User

In IE, when inline script is executed, the page is displayed for the first time. Doc. readystate is interactive. Refresh, and loading.

Even if interactive doesn't build the DOM tree, there's no body...

If you run a timer or something in the inline script and go to Doc. Body. doscroll ('left'), you may encounter DOM tree construction in interactive mode.

When other browsers execute the inline script, it is loading...

 

In addition, in the domcontentloaded event, most of the doc. readystate is interactive (opera sometimes encounters complete ).

Then, when domcontentloaded is registered, the domcontentloaded event will not be triggered (this is of course = #).

However, even if you do not register this event in domcontentloaded, you may encounter an interactive registration event, which will not be triggered.

 

A general library and shelf will register a domcontentloaded event by default, and then call it to register this event, all of which are executed from this portal, so it does not happen to have registered the event in interactive, however, it may also occur that the framework has just completed Non-synchronous Loading During interactive, and the user registers the domcontentloaded event with a bug...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.