JRexHTMLFrameElementImpl.getContentDocument() returning wrong Document?
Matt Berry <mberry-KsF04eqboiHR9Otl0VnTzAC/[email protected]> Tue, 5 Dec 2006 02:06:30 +0000 (UTC)
| Newsgroups | gmane.comp.mozilla.jrex |
|---|---|
| Message-ID | <[email protected]> |
I'm observing some unexpected behavior when processing HTML frames.
Let's say I have a web page frameset.html, and it contains one frameset. Let's
say the frameset consists of two frames, one defined by frameA.html and the
other defined by frameB.html. Now let's say I open frameset.html in JRex to
obtain the Document object for frameset.html, which in turn I use to get a
reference to the HTMLFrameElement object for the frame tag representing
frameA.html:
NodeList frameNodes = doc.getElementsByTagName("frame");
HTMLFrameElement frameA = (HTMLFrameElement)frameNodes.item(0);
According to
http://jrex.mozdev.org/docs/api/org/w3c/dom/html2/HTMLFrameElement.html, the
getContentDocument() method of the HTMLFrameElement should return the Document
contained by the frame. I interpret that to mean that when I call
frameA.getContentDocument(), I should get a Document object representing
frameA.html. Instead, I get what appears to be another Document object
representing frameset.html.
Am I misunderstanding the intent of getContentDocument()? Or am I wrong in
concluding that getContentDocument() is returning another Document that
represents frameset.html? Or is this a bug?
Thanks,
Matt