JS: Change an Object's Prototype
You can use the following ways to change a object's parent.
Object.setPrototypeOf ( obj, proto )[see JS: Object.setPrototypeOf]obj.__proto__ = proto[see JS: Object.prototype.__proto__]
Object and Inheritance Topic
- JS: Object Overview
- JS: Object Type
- JS: Determine Type of Object
- JS: Object Literal Expression
- JS: Prototype and Inheritance
- JS: Create Object
- JS: Create Object with Parent X
- JS: Get/Set Prototype
- JS: Prevent Adding Property
- JS: Clone, Deep Copy Object/Array
- JS: Test Equality of Objects
- JS: Object Object
- JS: Object.prototype
If you have a question, put $5 at patreon and message me.