Add a contentWindow attribute to HTMLObjectElement

RESOLVED DUPLICATE of bug 827158

Status

()

--
enhancement
RESOLVED DUPLICATE of bug 827158
14 years ago
4 years ago

People

(Reporter: jwatt, Unassigned)

Tracking

({html5})

Trunk
html5
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 obsolete attachment)

(Reporter)

Description

14 years ago
We have added a contentWindow member to the DOM for HTML frames. It would be
useful to do the same for the HTMLObjectElement interface.
(Reporter)

Comment 1

14 years ago
Created attachment 172769 [details] [diff] [review]
not sure where to go from here

jst, I know I said I would do this, but I didn't think it would take as long as
I've spent on it so far. I've gotten stuck on every approach I've taken. The
main reason for that is probably because I'm splashing about in code that I
don't know. Anyway, here's what I think I'm doing right. If you could give me
an idea of where to proceed from here I'd appreciate it.
For the time being, since the subdocument is loaded by the frame, you could get
the primary frame, and then maybe add a method to some interface implemented by
nsSubDocumentFrame to get the right contentWindow?
(Reporter)

Comment 3

14 years ago
jst: what do you think about adding contentDocument and contentWindow to
HTMLEmbedElement at the same time? If you think that's a good idea, can I add
the necessary members to the frozen nsIDOMHTMLEmbedElement interface, or should
I create an nsIDOMNSHTMLEmbedElement interface?
Status: NEW → ASSIGNED
Go for it, but add a new interface, don't change the frozen one.
(Reporter)

Updated

12 years ago
Assignee: jwatt → general
Status: ASSIGNED → NEW
Assignee: general → nobody
QA Contact: ian → general
Keywords: html5
Whiteboard: [good first bug][mentor=Ms2ger]
So, we don't do frozen interfaces anymore, so the attribute can just be added to the nsIDOMHTMLObjectElement interface.

For the implementation, I think we can just get the nsIDocument like in nsHTMLObjectElement::GetContentDocument, and then get the window by calling GetWindow(). (Smarter people CC'd on this bug, please correct me if I'm wrong.)
You should probably do something more like nsGenericHTMLFrameElement::GetContentWindow (possibly reusing the "get stuff from the frameloader" code by refactoring that into a static method or a method on the frameloader).

Comment 7

6 years ago
Comment on attachment 172769 [details] [diff] [review]
not sure where to go from here

Most of this patch is no longer relevant with the more recent suggestions for how to implement this change.
Attachment #172769 - Attachment is obsolete: true
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 827158

Updated

4 years ago
Whiteboard: [good first bug][mentor=Ms2ger] → [mentor=Ms2ger]
Whiteboard: [mentor=Ms2ger]
You need to log in before you can comment on or make changes to this bug.