Closed Bug 611352 Opened 14 years ago Closed 14 years ago

Create a HTMLElement when createElement('isindex') is called and the html5 parser is enabled

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla2.0b8

People

(Reporter: mounir, Assigned: mounir)

References

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

Attached patch Patch v1Splinter Review
As requested by Jonas in bug 602117.
Attachment #489834 - Flags: review?(jonas)
Attachment #489834 - Flags: approval2.0?
Attachment #489834 - Flags: review?(jonas)
Attachment #489834 - Flags: review+
Attachment #489834 - Flags: approval2.0?
Attachment #489834 - Flags: approval2.0+
Blocks: 602117
Should we specify in dev doc that isindex elements can't be created anymore when using the new parser? (with parsing and createElement)
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Flags: in-testsuite+
Keywords: dev-doc-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b8
This looks like the only change is that if the HTML5 parser is enabled, the <isindex> element implements the HTMLElement interface instead of HTMLSharedElement. Is there more to this than an implementation detail?
(In reply to comment #2)
> This looks like the only change is that if the HTML5 parser is enabled, the
> <isindex> element implements the HTMLElement interface instead of
> HTMLSharedElement. Is there more to this than an implementation detail?

Yes. It's not creating a HTMLSharedElement but a nsHTMLSharedElement saw as a HTMLIsIndexElement by scripts. So, now, calling createElemnet("isindex") is creating a simple element with no specific properties, attributes or anything (only implementing HTMLElement interface). Previously, authors were able to call .form on HTMLIsIndexElement for example.
Is there a reason for this change? Did the spec require it or is it simply because the element has been deprecated forever and this makes it a no-op?
(In reply to comment #4)
> Is there a reason for this change? Did the spec require it or is it simply
> because the element has been deprecated forever and this makes it a no-op?

We are already creating multiple elements (form, input and maybe others?) when <isindex> is parsed with the new parser and it's something that should not be used so much. We can assume that no one is creating this element with createElement().
The underlying reason is that the element is using some code that has been designed for html5 form controls and isindex isn't really a form control but have some kind of form owner (with .form).
OK, I've documented this with just a note on the Firefox 4 for developers page, since we don't currently have isindex documented at all anyway, and when it does get documented, we'll describe it correctly at that time.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: