ECMASCript Object prototype object.
Inherited By : Array, Boolean, Date, DzAuthor, DzBox3, DzCircle3, DzEdge, DzFacet, DzFloatColor, DzInt2, DzLine3, DzMatrix3, DzMatrix4, DzOrientedBox3, DzQuat, DzRotationOrder, DzTimeRange, DzUri, DzVec2, DzVec3, DzVersion, Error, Function, JSON, Math, Number, RegExp and String
| ECMAScript | |
|---|---|
| Function | constructor |
| Object | prototype |
| QtScript | |
| Object | __proto__ |
| ECMAScript | |
|---|---|
| Object | create ( Object obj, Object properties=undefined ) |
| Object | defineProperties ( Object obj, Object properties ) |
| Object | defineProperty ( Object obj, String property, Object descriptor ) |
| Object | getOwnPropertyDescriptor ( Object obj, String property ) |
| Array | getOwnPropertyNames ( Object obj ) |
| Object | getPrototypeOf ( Object obj ) |
| Array | keys ( Object obj ) |
| ECMAScript |
|---|
| Object () |
| ECMAScript | |
|---|---|
| Boolean | hasOwnProperty ( String property ) |
| Boolean | isPrototypeOf ( Object obj ) |
| Boolean | propertyIsEnumerable ( String property ) |
| String | toLocaleString () |
| String | toString () |
| Object | valueOf () |
| QtScript | |
| void | __defineGetter__ ( String propertyName, Function getter ) |
| void | __defineSetter__ ( String propertyName, Function setter ) |
Example:
var oObject = new Object(); oObject.nMyProperty = 100;
Initializes an object.
Example:
var oObject = new Object();
Object : prototype
The prototype of an object.
Example:
var oObject = new Object(); print( oObject.__proto__ === Object.prototype ); // this evaluates to true
Object : __proto__
The undeleteable prototype of an object.
Example:
var oObject = new Object(); print( oObject.__proto__ === Object.prototype ); //true
Object : create( Object obj, Object properties=undefined )
Creates a new Object with the specified prototype obj and properties defined on properties.
Object : defineProperties( Object obj, Object properties )
Adds the named properties described by the given descriptors to an object.
Parameter(s):
Object : defineProperty( Object obj, String property, Object descriptor )
Defines a property directly on an object and returns the object.
Parameter(s):
Object : getOwnPropertyDescriptor( Object obj, String property )
Parameter(s):
Return Value:
property if it exists on obj, otherwise undefinedArray : getOwnPropertyNames( Object obj )
Parameter(s):
Return Value:
obj.Object : getPrototypeOf( Object obj )
A standard read only implementation of proto.
Parameter(s):
Return Value:
Parameter(s):
Return Value:
Boolean : hasOwnProperty( String property )
Return Value:
true if the object defines property, otherwise false.Boolean : isPrototypeOf( Object obj )
Parameter(s):
Return Value:
true if the object is in the prototype chain of obj, otherwise false.Boolean : propertyIsEnumerable( String property )
Parameter(s):
Return Value:
true if property exists and is enumerable, otherwise false.String : toLocaleString()
Return Value:
Return Value:
Object : valueOf()
Return Value:
void : __defineGetter__( String propertyName, Function getter )
Installs a getter function for a named property of an object. When the function is invoked, the this object will be the object whose property is accessed.
Parameter(s):
Example:
var oObject = new Object(); oObject.__defineGetter__("x", function() { return this._x; }); print( oObject.x ); // 123
void : __defineSetter__( String propertyName, Function setter )
Installs a setter function for a named property of an object. When the function is invoked, the this object will be the object whose property is accessed.
Parameter(s):
Example:
var oObject = new Object(); oObject.__defineSetter__("x", function(v) { print("setting x to:", v); this._x = v; }); oObject.x = 123; // will print "setting x to: 123"