IJsHostObjectHandler<TValue> Interface
The internal methods of a host exotic object created by IJsAdapter<TValue>.CreatePlatformObject (the legacy platform objects, https://webidl.spec.whatwg.org/#es-legacy-platform-objects). Each method returns true when it handled the operation; otherwise the adapter performs the ordinary internal method.
public interface IJsHostObjectHandler<TValue> where TValue : classType parameters
TValue
Properties
| Name | Description |
|---|---|
| HasOrdinaryNonIndexProperties | Gets whether the internal methods are only exotic for the keys that are array indices (the object supports no named properties): the adapter may then perform the ordinary internal methods for the other keys without calling the handler. |
HasOrdinaryNonIndexProperties
IJsAdapter.csGets whether the internal methods are only exotic for the keys that are array indices (the object supports no named properties): the adapter may then perform the ordinary internal methods for the other keys without calling the handler.
public bool HasOrdinaryNonIndexProperties { get; }Property value
Methods
| Name | Description |
|---|---|
| GetOwnKeys(TValue) | [[OwnPropertyKeys]]: the keys that precede the ordinary keys, or null. |
| HasIndexedProperty(TValue, uint) | Whether the object has an indexed property at index (without getting its value); false when it has not, and the adapter then calls IJsHostObjectHandler<TValue>.TryGetOwnProperty with the key. |
| TryDefineOwnProperty(TValue, TValue, JsPropertyDescriptor<TValue>, bool) | [[DefineOwnProperty]]. Sets result to the result of the operation. |
| TryDelete(TValue, TValue, bool) | [[Delete]]. Sets result to the result of the operation. |
| TryGetIndexedProperty(TValue, uint, JsPropertyDescriptor<TValue>) | [[GetOwnProperty]] of a key that is an array index, when the object has an indexed property at index; otherwise false, and the adapter calls IJsHostObjectHandler<TValue>.TryGetOwnProperty with the key (it avoids converting the index to a string). |
| TryGetOwnProperty(TValue, TValue, JsPropertyDescriptor<TValue>) | [[GetOwnProperty]]. |
| TrySet(TValue, TValue, TValue, bool) | [[Set]] when the receiver is the object. Sets result to the result of the operation. |
| TrySet(TValue, TValue, TValue, TValue, bool) | [[Set]] when the receiver is another object (an object whose prototype chain contains the object). Sets result to the result of the operation. |
GetOwnKeys(TValue)
[[OwnPropertyKeys]]: the keys that precede the ordinary keys, or null.
IReadOnlyList<TValue>? GetOwnKeys(TValue obj)HasIndexedProperty(TValue, uint)
IJsAdapter.csWhether the object has an indexed property at index (without getting its value); false when it has not, and the adapter then calls IJsHostObjectHandler<TValue>.TryGetOwnProperty with the key.
TryDefineOwnProperty(TValue, TValue, JsPropertyDescriptor<TValue>, bool)
[[DefineOwnProperty]]. Sets result to the result of the operation.
bool TryDefineOwnProperty(TValue obj, TValue key, in JsPropertyDescriptor<TValue> descriptor, out bool result)TryDelete(TValue, TValue, bool)
TryGetIndexedProperty(TValue, uint, JsPropertyDescriptor<TValue>)
IJsAdapter.cs[[GetOwnProperty]] of a key that is an array index, when the object has an indexed property at index; otherwise false, and the adapter calls IJsHostObjectHandler<TValue>.TryGetOwnProperty with the key (it avoids converting the index to a string).
public bool TryGetIndexedProperty(TValue obj, uint index, out JsPropertyDescriptor<TValue> descriptor)TryGetOwnProperty(TValue, TValue, JsPropertyDescriptor<TValue>)
[[GetOwnProperty]].
bool TryGetOwnProperty(TValue obj, TValue key, out JsPropertyDescriptor<TValue> descriptor)TrySet overloads
TrySet(TValue, TValue, TValue, bool)
TrySet(TValue, TValue, TValue, TValue, bool)
[[Set]] when the receiver is another object (an object whose prototype chain contains the object). Sets result to the result of the operation.