Object in ECMAScript 262

A generic object.

Instance Properties

name type description
prototype Object The prototype for a class.
constructor Object A reference to the constructor class for the current object instance.

Instance Methods

name returns description
toLocaleString() String For most objects, the same as toString() unless explicitly overridden.
valueOf() String Returns the internal this value of the object.
hasOwnProperty() Boolean Determines if the object/instance itself has the named property or method.
isPrototypeOf() Boolean Determines if the calling object prototype is in the inheritance chain for the supplied argument.
propertyIsEnumerable() Boolean Determines if the object/instance itself has a property or method of the supplied name which will appear in a for (prop in obj) enumeration.
toString() String Returns a string representation of the object.

Description

All other objects in ECMAScript inherit from this object class, and a generic object can be made which supports these features. Custom object instances may be created using either the var foo = new Object() constructor or the Object literal var foo = {}. The latter is not only less characters, but it is faster as well. Using the object literal notation, you may also specify properties (and methods) of the instance on the fly. Property and method names which are reserved keywords or which are not valid identifiers must be quoted:
var foo = {
     name : 'Bob',
     age : 12,
     cars : [ 'Mustang','Accord' ],
     "class" : "Middle Class",
     sellCar : function(){ this.cars.length-- },
     toString : function(){ return "Hi, my name is Bob!" }
};

Properties that are a Object

name object description
prototype Object The prototype for a class.
constructor Object A reference to the constructor class for the current object instance.
parent [pshop] ArtLayers (read only)
colorSettings [pshop] Application Name of selected color settings' set
parent [pshop] Application (read only)
parent [pshop] ArtLayer (read only)
parent [pshop] Channel (read only)
parent [pshop] Channels (read only)
parent [pshop] Document (read only)
exif [pshop] DocumentInfo (read only)
parent [pshop] DocumentInfo (read only)
parent [pshop] Documents (read only)
parent [pshop] HistoryState (read only)
parent [pshop] HistoryStates (read only)
parent [pshop] LayerSet (read only)
parent [pshop] LayerSets (read only)
parent [pshop] Layers (read only)
parent [pshop] Preferences (read only)
parent [pshop] Selection (read only)
parent [pshop] TextItem (read only)
parent [anark] Asset (read only) Parent object of this asset.

Methods that return a Object

name of object description
shift() Array Removes the first element of the array and returns it.
call() Function Call the function/method, optionally setting a new scope for this and passing in parameters.
pop() Array Remove the last element from the array and return it.
apply() Function Call the function/method, optionally setting a new scope for this and passing in parameters via an array.

Arguments that are a Object

name in method of object description
instanceToTest isPrototypeOf() Object The object instance to check.<
item1 concat() Array The first item to add.
item2 concat() Array The second item to add.
... concat() Array etc.
item1 push() Array The first item to add.
item2 push() Array The second item to add.
... push() Array etc.
newItem1 splice() Array The first item to insert.
newItem2 splice() Array The second item to insert.
... splice() Array etc.
newItem1 unshift() Array The first item to insert.
newItem2 unshift() Array The second item to insert.
... unshift() Array etc.
searchExpr replace() String Either a literal String or Reg
replaceExpr replace() String Either a String value to repla
separator split() String Either a String or Regular Exp
thisScope call() Function The object to use as thi
arg1 call() Function The first argument to pass.
arg2 call() Function The second argument to pass.
... call() Function etc.
thisScope apply() Function The object to use as thi
as open() [pshop] Application
outputChannels mixChannels() [pshop] ArtLayer
options changeMode() [pshop] Document
options exportDocument() [pshop] Document
options saveAs() [pshop] Document (see below)
destination moveAfter() [pshop] ArtLayer
destination moveBefore() [pshop] ArtLayer
destination moveToBeginning() [pshop] ArtLayer
destination moveToEnd() [pshop] ArtLayer
fillType fill() [pshop] Selection
strokeColor stroke() [pshop] Selection