I cannot seem to find it. Thanks!
Example:
$(\"#MySelect\").append(new Option(\"MyOption\", \"MyOption\", true, true));
None of the current postings answers the question regarding getting "... Documentation for ALL of the Javascript HTML Element Constructors". The example is explicitly using the " ... new Option ..." constructor.
This "answer" provides references that do not define any constructors such as new Option()
.
The DOM reference provided, should have defined the Option()
constructor or at least alluded to it.
The programmed constructor Option()
is NOT HTML and so is NOT defined by the other two references which describe HTML. The tag element, is an HTML defined token so presumably, by implicit precedent only,
new Option()
is the corresponding equivalent constructor, absorbing property attributions analogously to other dynamic constructs, but where is this formally, explicitly and emphatically stated to define
new Option()
? In particular, the kind and order of new Option()
's parameters would be defined in such a document.
Though it's not a constructor proper, the createElement() document
method is well defined ( https://developer.mozilla.org/en/DOM/document.createElement ). Using document.createElement("option")
with the HTMLOptionElement
references in this "answer" completely defines such construction.
An archaic document that initiated a legacy of confused paradigms between the DOM, HTML and javascript does define new Option()
here but is inadequate in the contemporary context.