Closed Bug 1541728 Opened 5 years ago Closed 5 years ago

toString on remote WindowProxy should be "[object Window]" not "[object Object]"

Categories

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

defect

Tracking

()

RESOLVED INVALID
Fission Milestone M3

People

(Reporter: nika, Unassigned)

References

(Blocks 1 open bug)

Details

No description provided.

Why? CrossOriginPropertyFallback returns undefined for @@toStringTag (see https://html.spec.whatwg.org/multipage/browsers.html#crossoriginpropertyfallback-(-p-)).

Flags: needinfo?(nika)

It seems like our implementation doesn't follow that behaviour. For cross-origin windows in Gecko, we report "[object Window]".

e.g: data:text/html,<iframe id=i src=http://example.com></iframe><script>document.body.innerHTML += i.contentWindow;</script>

On both Firefox and Chromium this prints out [object Window] not [object Object] like it would according to the spec.

ni? :annevk for clarification on this oddity.

Flags: needinfo?(nika) → needinfo?(annevk)

That's not a proxy for a cross-origin object. You need to wait for onload. (You're looking at about:blank.)

Flags: needinfo?(annevk)

Testing shows that we are doing the right thing (and so do Chrome and Safari TP says annevk).

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.