IJsCrossOriginObjectHandler<TValue> Interface
The operations of a cross-origin object (https://html.spec.whatwg.org/multipage/nav-history-apis.html#cross-origin-objects): a Location object, or the Window of a WindowProxy (IJsWindowProxyHandler<TValue>). The engine implements the internal methods of the object with them (see IJsAdapter<TValue>.CreateCrossOriginPlatformObject): the ordinary internal methods when IJsCrossOriginObjectHandler<TValue>.IsSameOrigin is true, else the cross-origin ones.
public interface IJsCrossOriginObjectHandler<TValue> where TValue : classType parameters
TValue- The type of the JavaScript values of the engine.
Methods
| Name | Description |
|---|---|
| CreateSecurityError() | Returns the exception that throws the "SecurityError" DOMException of the current realm. |
| GetCrossOriginOwnProperty(TValue) | The [[GetOwnProperty]] of the object for a cross-origin caller, for a key that is not an array index: CrossOriginGetOwnPropertyHelper(O, P) (https://html.spec.whatwg.org/multipage/nav-history-apis.html#crossorigingetownpropertyhelper-(-o,-p-)), the named child navigables of a window, then CrossOriginPropertyFallback(P). The functions of the descriptor belong to the current realm. |
| GetCrossOriginOwnPropertyKeys() | CrossOriginOwnPropertyKeys(O) (https://html.spec.whatwg.org/multipage/nav-history-apis.html#crossoriginownpropertykeys-(-o-)): the names of the cross-origin properties, then then and the symbols of CrossOriginPropertyFallback. |
| IsSameOrigin() | IsPlatformObjectSameOrigin(O) (https://html.spec.whatwg.org/multipage/nav-history-apis.html#isplatformobjectsameorigin-(-o-)): whether the origin of the current realm is same origin-domain with the origin of the object. |
CreateSecurityError()
GetCrossOriginOwnProperty(TValue)
The [[GetOwnProperty]] of the object for a cross-origin caller, for a key that is not an array index: CrossOriginGetOwnPropertyHelper(O, P) (https://html.spec.whatwg.org/multipage/nav-history-apis.html#crossorigingetownpropertyhelper-(-o,-p-)), the named child navigables of a window, then CrossOriginPropertyFallback(P). The functions of the descriptor belong to the current realm.
JsPropertyDescriptor<TValue> GetCrossOriginOwnProperty(TValue key)Parameters
keyTValue- The key: a string or a symbol.
Returns
JsPropertyDescriptor<TValue> The property descriptor.
Exceptions
Exception- The "SecurityError" DOMException of the current realm: the property is not a cross-origin property.
GetCrossOriginOwnPropertyKeys()
CrossOriginOwnPropertyKeys(O) (https://html.spec.whatwg.org/multipage/nav-history-apis.html#crossoriginownpropertykeys-(-o-)): the names of the cross-origin properties, then then and the symbols of CrossOriginPropertyFallback.
IReadOnlyList<TValue> GetCrossOriginOwnPropertyKeys()