Closed Bug 1568907 Opened 5 years ago Closed 5 years ago

Interframe-Communication-Syntax-Alternatives of other Major Browsers not supported

Categories

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

60 Branch
defect

Tracking

()

RESOLVED DUPLICATE of bug 834208
Tracking Status
firefox70 --- affected

People

(Reporter: stemind, Unassigned, NeedInfo)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Firefox/60.0

Steps to reproduce:

  1. Surf to https://yuba.ch/?c=outerpage
  2. Click the link "Call function on Iframed Page 2"

Actual results:

  • In Firefox nothing happens (a JavaScript-Error TypeError is logged).
  • Other major browsers do evoke the function on Iframed Page 2.

Reason:
Firefox does not understand the DOM-Trail to the function written as
parent.document.iframe2.functiononiframedpage2();

Firefox only understands
parent.iframe2.functiononiframedpage2();

Other major browsers do understand both syntaxes.

Expected results:

Firefox should evoke the function on the sibling iframe as other major browsers do.

Hi stemind,

I was able to reproduce the behavior reported in the latest Nightly version 70.0a1 (2019-07-29) (64-bit) on Windows 10. When I click on the link nothing happens.
I also tested the page on Chrome browser and when I click on the link, I see a pop up displaying.

I will add a product and a component so the corresponding team can take a look at it. If you think they are not correct please feel free to change them to a more appropriate one.

Thank you for your report.

Status: UNCONFIRMED → NEW
Component: Untriaged → JavaScript Engine
Ever confirmed: true
Product: Firefox → Core
Component: JavaScript Engine → DOM: Core & HTML
Priority: -- → P3

Hsin-Yi, I think this needs some closer look. So, need to find someone with a bit time :)

Flags: needinfo?(htsai)

So the basic testcase is:

<iframe name="foo"></iframe>
<script>
  alert(document.foo);
</script>

In Chrome this alerts the Window inside the iframe. In Firefox it alerts undefined. This is a dup of bug 834208.

Status: NEW → RESOLVED
Closed: 5 years ago
Flags: needinfo?(htsai)
Resolution: --- → DUPLICATE

This bug is still dormant. The earliest version where I picked it was in Firefox v68.0.2. Mozilla Firefox v67.0.4 does not have this bug.

I have 3 frames: calcframe, displayframe, and displayframe1.

If I am in calcframe and use a command such as: parent.calcframe.document.gerElementById ..., then its fine.
But if I am in calcframe and use: parent.displayframe.document.gerElementById ..., the bug is present, and I cannot complete any actions from there onwards.

And the same applies if I am in displayframe and want to do something in calcframe, etc.

Sorry, I meant ... .getElementById

Can you file a bug with a test-case that reproduces the issue please? In this specific case it seems different to the document.frameName issue that is bug 834208.

Flags: needinfo?(konegeriea)
You need to log in before you can comment on or make changes to this bug.