When we need to dynamically create options for a Select element we would use the "new Option(..)" constructor to create a new option object. However, where is this Option constructor defined? Is it in the "window" global object?
Secondly, it seems that both ECMAScript and W3C DOM standard doesn't define how this constructor should look like (e.g. what arguments it should take). Which standard does this Option() constructor come from?
I did search for the keyword "option" and there isn't anything looks like the one needed. I have the impression that this is DOM Level 0 stuff. But since this is the constructor function, I am not able to locate the relevant information from either msdn or mozilla's documentation. Could anyone point me to the right direction.
I don't think the Optionconstructor is part of w3c's DOM as the HTMLSelectElement.options of DOM Level2 is defined as HTMLOptionsCollection. That is, the W3C's way of adding new options is to add some new Nodes to the DOM tree rather than using simple new Option(..) syntax.