Created
June 21, 2017 06:22
-
-
Save caoer/40b879ccec1cc5f7f852c9a22c03ab55 to your computer and use it in GitHub Desktop.
what is outputs?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const DynamicObject = nativeClassesRegistry.getOrCreateNativeClass('NSObject', null); | |
const dynamicObject = new DynamicObject(); | |
dynamicObject.sayName = function () { | |
console.log(`d: ${dynamicObject.prototype}`); | |
console.log(`1: ${DynamicObject.prototype === Object.getPrototypeOf(dynamicObject)}`); | |
console.log(`2: ${DynamicObject.prototype === dynamicObject.prototype}`); | |
console.log(`3: ${Object.getPrototypeOf(dynamicObject) === dynamicObject.prototype}`); | |
console.log(`4x: ${dynamicObject.prototype}`); | |
console.log(`5z: ${Object.getPrototypeOf(Object.getPrototypeOf(dynamicObject)).constructor.nativeClassName}`); | |
console.log(`6y: ${dynamicObject.constructor.prototype.constructor.nativeClassName}`); | |
console.log(`7: ${Object.getPrototypeOf(dynamicObject.constructor).nativeClassName}`); | |
console.log(`8: ${dynamicObject.constructor.prototype.__proto__.constructor.nativeClassName}`); | |
}; | |
dynamicObject.sayName(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment