| |||||||||||||||
SummaryDeprecated. Create an alias for a native property. | |||||||||||||||
SyntaxJSBool JS_AliasProperty(JSContext *cx, JSObject *obj, const char *name, const char *alias);
| |||||||||||||||
DescriptionJS_AliasProperty assigns an alternate name for a property associated with a native object. obj is the object to which the property belongs. name is the property's current name in the object, and alias is the alternate name to assign to the property.
| |||||||||||||||
NotesThis feature is deprecated, meaning that it is currently supported only for backward compatibility with existing applications. Future versions of the engine may no longer support this function.
An alias does not replace a property's name; it supplements it, providing a second way to reference a property. If the alias is successfully created and associated with the property,
If the property name you specify does not exist, Once you create an alias, you can reassign it to other properties as needed. Aliases can also be deleted. Deleting an alias does not delete the property to which it refers.
| |||||||||||||||
See Also
|