Closed Bug 94223 Opened 24 years ago Closed 24 years ago

Dynamically created frame does not load or run JS code

Categories

(Core :: DOM: Core & HTML, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 92912

People

(Reporter: bedney, Assigned: jst)

Details

Attachments

(3 files)

Mozilla .93 fails when trying to set the location of a frame that is part of a dynamically generated frameset to a URL that contains JS code. Reproduction: I've attached a testcase that contains 3 files: TestFrames.html -> contains the top level frameset. There are two frames, test1 and test2. We set only the 'src=' on test2. ShouldExec.html -> the file which contains the code that we'll try to run. WriteFrames.html -> the file which gets loaded from the top level frameset into test2. It contains code that will dynamically build a frameset, 10 buffers that will be named 'buffer_0' - 'buffer_9'. It will write document.write() this html into parent.test1 (the 'test1' frame as specified in the top level frameset). It will then try to access 'buffer_0's location to try to set it to 'ShouldExec.html'. To reproduce, simply load TestFrames.html. You will first see an alert which shows the html that will be dynamically written into the 'test1' by the script executing in WriteFrames.html. Next, it depends on the line you're executing to try to access 'buffer_0'. If you leave it the way it is in the attachment, the browser will fail silently, never executing the code in ShouldExecute.html. If you comment that line out and uncomment the line below it that says: target.buffer_0.location = 'ShouldExec.html'; Then you get the following message in the JavaScript console: 'setting a property that has only a getter' and the browser never executes the code in ShouldExecute.html. This description is also documented in the comments in the testcase. Actual Results: The code in ShouldExecute.html doesn't get executed. Expected Results: The code in ShouldExecute.html gets executed. This happens in .92 and earlier. This is occurring in the Mozilla .93 milestone release. Sorry I don't have the build date, but I would have to quit and restart that version (currently running .92 to file this). If you need specific build date, I can supply in a followup.
jst, is this a dup of bug 92912? /be
Status: UNCONFIRMED → NEW
Ever confirmed: true
Yup, looks like a dup. *** This bug has been marked as a duplicate of 92912 ***
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: