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 9198407
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T22:16:29+00:00 2026-06-17T22:16:29+00:00

I have a page containing an iframe in which I expect that within the

  • 0

I have a page containing an iframe in which I expect that within the iframe the user will navigate to many different pages – all of them in the same domain as the parent page.

In the top level window I have a persistent object, let’s call it appData. And in the iframe I often have lines like

parent.appData[someProperty] = {a : 1, b : 2};

I’m aware of the general problem of freed script errors and I understand that I shouldn’t try to call any arbitrary methods on such an object since the originating document may have unloaded, but surely hasOwnProperty shouldn’t be such a method, and I should be allowed to say, in some subsequent child page:

if (parent.appData[someProperty].hasOwnProperty('a'))

Shouldn’t I? And here’s what’s odd: it works as I expect in every browser I’ve tested except MSIE 10. I did see the recent answer to IE9 "Can't execute code from freed script" when calling hasOwnProperty() and indeed using in seems to work fine for my case, but I’m wondering whether I’ve been “cheating” all along or if this is a bug in MSIE 10.

jsFiddle doesn’t handle iframes so I’m not sure how best to demonstrate this with an example, sorry.

  • 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-06-17T22:16:30+00:00Added an answer on June 17, 2026 at 10:16 pm

    Personally, I’d handle all functions similarly if you are concerned about the freed script issue, including built-in ones such as hasOwnProperty. In that specific case, it still could technically be interpreted as a function on an object, and apparently some browsers treat it as such (IE10) and others treat it as a special case that is still accessible (the others you mention). Even if it worked in all browsers, I’d still feel wrong about it.

    Thus, not sure about your exact case, but could you instead do something like:

    var appData = parent.appData || {};
    var someProperty = appData[someProperty] || {};
    if(someProperty[a] !== undefined){
        ..
    }
    

    Otherwise, you could always surround it with a try..catch

    Update
    And of course you could use in as well, as mentioned in your linked question.

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

Sidebar

Related Questions

I have a page with an iframe that has an html document within it.
I have a aspx page containing an iframe which shows a pdf ( i
Friends I have a Parent Page(default.aspx) that includes an iframe page(iframe.aspx) containing textbox in
I have an IFrame on my page pointing to a page containing list of
I have a overview page containing a list with some links from which multiple
I have a page containing a large amount of controls that can trigger postbacks
I have a page containing a set of jQuery tabs. All the tabs point
I have an app in which the user clicks a button, triggering an iFrame
I have made a page that contains an iframe. The page that is in
I have a .jsp that contains an IFrame with a page that has some

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.