| Summary: | HTMLSelectElement add() should support adding group of options element (HTMLOptGroupElement) | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Shivakumar J M <shiva.jm> | ||||
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | ap, commit-queue, darin, gyuyoung.kim, rniwa, sam | ||||
| Priority: | P2 | ||||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
Created attachment 243539 [details]
Patch
HTMLSelectElement add() should support adding group of options (optgroup) element.
These aligns to Spec as well: http://www.w3.org/html/wg/drafts/html/master/forms.html#the-select-element Comment on attachment 243539 [details]
Patch
I’m not sure that the other functions all handle optgroup elements properly.
Comment on attachment 243539 [details] Patch Clearing flags on attachment: 243539 Committed r177629: <http://trac.webkit.org/changeset/177629> All reviewed patches have been landed. Closing bug. (In reply to comment #3) > Comment on attachment 243539 [details] > Patch > > I’m not sure that the other functions all handle optgroup elements properly. Dear Darin, I will check for the other fucntions, if they are not handling, will add suppourt for the same. Thanks |
We can add an option to a SELECT via add(), i.e: select.add(new Option("0", "0", false, false), select.firstChild); But we cannot add an group of options to HTMLOptGroupElement, i.e: elect.add(new Option("0", "0", false, false), optgroup); so HTMLSelectElement add() should support adding group of options element (HTMLOptGroupElement);