Object in ECMAScript 262

A generic object.

Instance Properties

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

Instance Methods

name returns description
hasOwnProperty(propertyOrMethodName) Boolean Determines if the object/instance itself has the named property or method.
isPrototypeOf(instanceToTest) Boolean Determines if the calling object prototype is in the inheritance chain for the supplied argument.
propertyIsEnumerable(propertyOrMethodName) 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.
toLocaleString() String For most objects, the same as toString() unless explicitly overridden.
toString() String Returns a string representation of the object.
valueOf() String Returns the internal this value 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
colorSettings [pshop] Application Name of selected color settings' set
constructor Object A reference to the constructor class for the current object instance.
exif [pshop] DocumentInfo (read only)
parent [pshop] ArtLayer (read only)
parent [pshop] Channel (read only)
parent [pshop] Channels (read only)
parent [pshop] Document (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.
parent [pshop] ArtLayers (read only)
parent [pshop] Application (read only)
prototype Object The prototype for a class.

Methods that return a Object

name of object description
apply([thisScope],[args]) Function Call the function/method, optionally setting a new scope for this and passing in parameters via an array.
call([thisScope],[arg1],[arg2],…) Function Call the function/method, optionally setting a new scope for this and passing in parameters.
datum() Selection Return the data associated with the first element in the selection (if any).
pop() Array Remove the last element from the array and return it.
shift() Array Removes the first element of the array and returns it.

Arguments that are a Object

name in method of object description
... call([thisScope],[arg1],[arg2],…) Function etc.
... concat([item1],[item2],[...]) Array etc.
... push([item1],[item2],[...]) Array etc.
... splice(start,deleteCount,[newItem1],…) Array etc.
... unshift([newItem1],[newItem2],[...]) Array etc.
call(func,[arg1],[arg2],…) [d3] Transition etc.
call(func,[arg1],[arg2],…) [d3] Selection etc.
arg1 call([thisScope],[arg1],[arg2],…) Function The first argument to pass.
arg1 call(func,[arg1],[arg2],…) [d3] Selection First argument to pass to the function.
arg1 call(func,[arg1],[arg2],…) [d3] Transition First argument to pass to the function.
arg2 call(func,[arg1],[arg2],…) [d3] Transition Second argument to pass to the function.
arg2 call(func,[arg1],[arg2],…) [d3] Selection Second argument to pass to the function.
arg2 call([thisScope],[arg1],[arg2],…) Function The second argument to pass.
as open(doc,[as]) [pshop] Application
destination moveBefore(destination) [pshop] ArtLayer
destination moveToEnd(destination) [pshop] ArtLayer
destination moveToBeginning(destination) [pshop] ArtLayer
destination moveAfter([destination]) [pshop] ArtLayer
fillType fill(fillType,[mode],[opacity],…) [pshop] Selection
instanceToTest isPrototypeOf(instanceToTest) Object The object instance to check.<
item1 push([item1],[item2],[...]) Array The first item to add.
item1 concat([item1],[item2],[...]) Array The first item to add.
item2 concat([item1],[item2],[...]) Array The second item to add.
item2 push([item1],[item2],[...]) Array The second item to add.
newItem1 unshift([newItem1],[newItem2],[...]) Array The first item to insert.
newItem1 splice(start,deleteCount,[newItem1],…) Array The first item to insert.
newItem2 unshift([newItem1],[newItem2],[...]) Array The second item to insert.
newItem2 splice(start,deleteCount,[newItem1],…) Array The second item to insert.
options changeMode(destinationMode,[options]) [pshop] Document
options saveAs(saveIn,[options],[asCopy],…) [pshop] Document (see below)
options exportDocument(exportIn,[exportAs],[options]) [pshop] Document
outputChannels mixChannels([monochrome],outputChannels) [pshop] ArtLayer
replaceExpr replace(searchExpr,replaceExpr) String Either a String value to repla
searchExpr replace(searchExpr,replaceExpr) String Either a literal String or Reg
separator split([separator],[limit]) String Either a String or Regular Exp
strokeColor stroke(strokeColor,width,[location],…) [pshop] Selection
thisScope apply([thisScope],[args]) Function The object to use as thi
thisScope call([thisScope],[arg1],[arg2],…) Function The object to use as thi
value datum(value) [d3] Selection May be any JavaScript object (number, array, string, DOM element, etc.)