| This tests that option elements are accessible using namedItem from both HTMLSelectElement and HTMLOptionsCollection as well as using the getter from the HTMLOptionsCollection |
| |
| On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". |
| |
| |
| Confirm that the option named 'test' is accessible from the select element |
| PASS select1.namedItem('test').toString() is "[object HTMLOptionElement]" |
| PASS select1.namedItem('test').value is "Value" |
| Confirm that the option named 'test' is accessible from the options collection |
| PASS select1.options.namedItem('test').toString() is "[object HTMLOptionElement]" |
| PASS select1.options.namedItem('test').value is "Value" |
| Confirm that both options named 'test' are accessible from the options collection |
| PASS select2.options.namedItem('test').length is 2 |
| PASS select2.options.namedItem('test').toString() is "[object NodeList]" |
| PASS select2.options.namedItem('test')[0].value is "Value1" |
| PASS select2.options.namedItem('test')[1].value is "Value2" |
| PASS select2.options.test.length is 2 |
| PASS select2.options.test.toString() is "[object NodeList]" |
| PASS select2.options.test[0].value is "Value1" |
| PASS select2.options.test[1].value is "Value2" |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |