In a browser experience, programmed constructors are used to generate artifacts in that environment.
- Is there a comprehensive list of all the predefined primitive constructors?
- Are some constructors unique to a particular browser (Chrome, Opera, Safari, ...)?
- Are each constructor's argument types, order and meaning identical among the browsers?
Using FireFox for instance:
javascript:
alert([
"using browser environment: \n"+window.navigator.userAgent,
new Array(), new Boolean(), new Date(), new Function(),
new Number(), new Object(), new RegExp(), new String(),
new Error(), new Image(), new Option(),
] . join("\n\n"));
generates: (artifacts with vacuous content are invisible)
using browser environment:
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.3) Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3
false
Fri Aug 05 2011 11:25:15 GMT-0400 (EST)
function anonymous() { }
0
[object Object]
/(?:)/
Error
[object HTMLImageElement]
[object HTMLOptionElement]
What other elementary constructors does FireFox have, if any?
references:
Where is the Documentation for all of the Javascript HTML Element Constructors?
Where are constructors such as, `new Image()` and `new Option()`, documented?
The following missing references were an oversight. Thanks to TeslaNick's answer for prompting their inclusion.
Global Object constructors - MDN Docs
constructor - MDN Docs