Share via


JsSetPrototype Function

Sets the prototype of an object.

Syntax

STDAPI_(JsErrorCode) JsSetPrototype(  
   _In_ JsValueRef object,  
   _In_ JsValueRef prototypeObject  
);  

Parameters

object
The object whose prototype is to be changed.

prototypeObject
The object's new prototype.

Return Value

The code JsNoError if the operation succeeded, a failure code otherwise.

Remarks

Requires an active script context.

Requirements

Header: jsrt.h

See Also

Reference (JavaScript Runtime)