Not at Mozilla but:
- for
image
:
Thanks to Rickard for identifying
http://www.w3.org/html/wg/drafts/html/CR/embedded-content-0.html#dom-image
that provides the DOM interface constructor details. - for
option
:
http://www.w3.org/html/wg/drafts/html/CR/forms.html#dom-option
also gives the DOM interface constructor details.
(Found using:
http://www.google.com/search?client=ubuntu&channel=fs&q=constructor+site%3Adev.w3.org%2Fhtml5&ie=utf-8&oe=utf-8)
Given these references, it is moot whether mozilla.org
, as asked below, documents the same.
Specifically, where at mozilla.org
are constructors like new Image()
and new Option()
documented in a contemporary context?
Archaic documentation,
Image()
defined at http://devedge-temp.mozilla.org/library/manuals/2000/javascript/1.3/reference/image.htmlOption()
defined at http://devedge-temp.mozilla.org/library/manuals/2000/javascript/1.3/reference/option.html
describes the existence of these constructors implicating them as intrinsic JavaScript language components, which is incorrect.
javascript: alert([new Image(), '\n\n', new Option()])
clearly indicates their manifest existence by displaying
[object HTMLImageElement],
,[object HTMLOptionElement]
Rhetorically, what about:
javascript:alert([new Anchor(), new Preserve(), new Form(),,, ])
What other primitive elemental DOM constructors are there? Or, are there no more?
Is it anathema to, and inconsistent with the DOM paradigm used by Mozilla, to incorporate the programming definitions of new Image()
and new Option()
etc., explaining their absence? Yet, these constructors are clearly not intrinsic to the language specification of JavaScript and certainly not HTML. So, where exactly is there a correct current paradigm (originating from mozilla.org
) that describes them fully, including argument types and orders?
references:
- HTMLImageElement Mozilla documentation
- Contemporary precedent for
Image()
constructor use at Mozilla - Stack Overflow related question
An aside: (please do not be distracted by this - locating the relevant documents as specified in the article's title is the only consideration)
This answer prompted the following examination. It is only an observation.
javascript:
alert([ Option, Image,
JSON, Math, Error,
Array, Boolean, Date, Function,
Number, Object, RegExp, String ].join("\n\n"));
alert( Image.toSource() );
produces in FireFox:
[object Option]
[object Image]
[object JSON]
[object Math]
function Error() { [native code] }
function Array() { [native code] }
function Boolean() { [native code] }
function Date() { [native code] }
function Function() { [native code] }
function Number() { [native code] }
function Object() { [native code] }
function RegExp() { [native code] }
function String() { [native code] }
and
({})
but
Error: ({}) is not a constructor
Source File: javascript:alert(new ({}));
Line: 1
Is Image a constructor or not? The answer to this would (presumably) be found in the documents that answer the question asked in this posting's title. This should emphasize the inconsistencies, anomalies and irregularities of cataloging Image
and Option
etc. in an appropriate document.
Image()
etc. so conveniently glossed over for the very reasons outlined. Once formally documented (circa late 1990's) in the 1.3 version references, but now conspicuously absent, the unqualified constructors are prevalent even at Mozilla's own site: developer.mozilla.org/en/Canvas_tutorial/… - so where ARE they formally described and documented? – Ashil