Review: Needs Fixing

> IE8 doesn't support the syntax opt = new Option('','')

Actually, it does support that syntax, what it does not support is appending 
such an option directly to a select element.

Thus, I'd rather not have divergent codepaths when we can keep the same code 
path for all browsers:

1. Get the HTMLOptionsCollection[0] of the select by fetching the 'options' 
prop (e.g. `var options = $fmts.prop('options')`)
2. Set the new option at the end of the HTMLOptionsCollection: 
`options[options.length] = opt`[1]

This will work correctly in all browsers.

[0] http://www.w3.org/TR/DOM-Level-2-HTML/html.html#HTMLOptionsCollection

[1] As the link shows, HTMLOptionsCollection is an array-like object but not an 
actual Array so it does not have e.g. a `push` method.
-- 
https://code.launchpad.net/~openerp-dev/openerp-web/6.1-opw-573860-msh/+merge/102630
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openerp-web/6.1-opw-573860-msh.

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to