| 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 the options collection returns the first option when there are multiple options named 'test' |
| PASS select2.namedItem('test').toString() is "[object HTMLOptionElement]" |
| PASS select2.namedItem('test').value is "Value1" |
| PASS select2.options.test.toString() is "[object HTMLOptionElement]" |
| PASS select2.options.test.value is "Value1" |
| PASS successfullyParsed is true |
| |
| TEST COMPLETE |
| |