Skip to main content

proto_method

Function proto_method 

Source
pub fn proto_method(
    recv: &Value,
    ctor_method: &str,
    args: Vec<Value>,
) -> Result<Value, String>
Expand description

Dispatch a @proto:<Ctor>:<method> thunk (a method read off a builtin prototype, e.g. Object.prototype.toString) against recv (its invoke-time this). Object.prototype.toString yields the [object Tag] brand string libraries type-check on; every other method routes through normal method dispatch on recv.