Closed Bug 95154 Opened 23 years ago Closed 22 years ago

HTMLObjectElement.form returns null

Categories

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

x86
All
defect

Tracking

()

RESOLVED FIXED
mozilla1.1alpha

People

(Reporter: stummala, Assigned: jst)

Details

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.3+)
Gecko/20010813 Netscape6/6.1b1
BuildID:    2001-08-09-13-trunk

when i use HTMLObjectElement.form always null is returned which su a default
value. Testcase included ....

Reproducible: Always

Steps to Reproduce:

<HTML>
<BODY>
<form name="foo" action="bar.cgi" method ="post">
<object>
<img src="foo.gif">
</object>
</form>

<SCRIPT TYPE="text/javascript">
var obj = document.getElementsByTagName("OBJECT").item(0).form;
document.write(obj);
</SCRIPT>
</BODY>
</HTML>


Actual Results:  null

Expected Results:  [object HTMLFormElement]
Annoying... The W3C defines HTMLObjectElement as having a "form" attribute, but
our HTMLObjectElement doesn't inherit from nsGenericHTMLContainerFormElement.
The evil hack would be to find a parent node that would be a form. Is there a
less evil hack (like making nsHTMLObjectElement inherit from
nsGenericHTMLContainerFormElement?
Target Milestone: --- → mozilla0.9.8
Not a mozilla1.0 stopper.
Target Milestone: mozilla0.9.8 → mozilla1.1
Priority: -- → P5
It seems the DOM Level 2 HTML spec doesn't have the HTMLObjectElement.form
property. Wontfix? ;-)
fixed by bug 127847
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Component: DOM: HTML → DOM: Core & HTML
QA Contact: stummala → general
You need to log in before you can comment on or make changes to this bug.