Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7535649
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T06:21:28+00:00 2026-05-30T06:21:28+00:00

I am creating a webpage which needs to pull in a Javascript library which

  • 0

I am creating a webpage which needs to pull in a Javascript library which is indispensable but also breaks other code by modifying the prototypes of built-in classes. I have sandboxed it in an iframe and set up cooperative data sharing between the two.

When the iframe’s body.onload fires, my code will modify the parent document. In theory this code will be correct regardless of whether the parent or child’s body.onload fires first. In practice, I can’t test one code path because the iframe always seems to load before the parent, even if I inject artificial delays in the web server.

Is the parent body guaranteed to always fire onload only after child documents have loaded, or is this just a quirk of Firefox?

If not, how can I, for the sake of testing, force the child to load later when sleep(5) in child.php doesn’t give me this test case?

Finally, when the child Javascript modifies its Javascript environment, is this guaranteed to be separate from the parent frame, or is this just a quirk of Firefox that makes it work?

Portability matters. Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T06:21:30+00:00Added an answer on May 30, 2026 at 6:21 am

    If portabilty matters for you, then convinience should matter too. Your whole concept sounds clunky and unreasonable by reading your post (dealing with iframes, sleep, etc.).

    However, to answer you questions I’m not 100% sure about document.body.onload, but you can be sure that any handler bound to window.onload will fire after all iframes were loaded, that is very very cross-browser compatible. Also the fact that an iframe is a “sandboxed” environment with its own DOM is very cross-browser. So you don’t need to mind about the parent document or other iframes and conflicts.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a print stylesheet for a webpage which, next to text content, also
I am creating a webpage which is using asp .net as its backend. I
I am creating a webpage..as usual. But I have a problem. Lets say that
I'm creating a webpage which uses jquery.transit plugin. I download the .js file and
I currently have some code which needs to perform multiple updates per user for
I am creating a horizontal webpage and I am trying to make the body
I'm creating a web page, and I can't (with html code) add a draw
I'm creating a backend for one of webpage. The backend is a Windows Form
i already gone through other web game cheating question on this forum but i
I'm creating a FORM with PHP for an intranet webpage. Another PHP script is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.