Skip to main content

prototype_of

Function prototype_of 

Source
pub fn prototype_of(v: &Value) -> Value
Expand description

[[GetPrototypeOf]] (10.1.1) — the answer Object.getPrototypeOf, Reflect.getPrototypeOf and a __proto__ READ all have to agree on.

__proto__ used to answer from JsHost::proto_of alone, which records only an EXPLICIT link, so an object on the default prototype reported null: ({}).__proto__ === Object.prototype was false while Object.getPrototypeOf({}) === Object.prototype was true. One function, so the three cannot drift apart again.