IJsWindowProxyHandler<TValue> Interface

The operations of a WindowProxy exotic object (https://html.spec.whatwg.org/multipage/nav-history-apis.html#the-windowproxy-exotic-object), created by IJsAdapter<TValue>.CreateWindowProxy. Its internal methods are the ones of the specification: the indexed properties are the WindowProxy objects of the child navigables, the other properties are the properties of the global object of IJsWindowProxyHandler<TValue>.Window (same origin) or the cross-origin properties.

public interface IJsWindowProxyHandler<TValue> : IJsCrossOriginObjectHandler<TValue> where TValue : class

Type parameters

TValue
The type of the JavaScript values of the engine.
Implements

Properties

NameDescription
ChildCountGets the number of document-tree child navigables of the document of the window.
WindowGets the global object of the window of the WindowProxy ([[Window]]): the active window of its browsing context.

ChildCount

Gets the number of document-tree child navigables of the document of the window.

int ChildCount { get; }

Property value

int

Window

Gets the global object of the window of the WindowProxy ([[Window]]): the active window of its browsing context.

TValue Window { get; }

Property value

TValue

Methods

NameDescription
GetChild(int)Returns the WindowProxy of the document-tree child navigable at index, or null.
IsNamedProperty(string)Whether name is a named property of the window (https://html.spec.whatwg.org/multipage/nav-history-apis.html#named-access-on-the-window-object): a named child navigable, or a named element when the window is same origin-domain with the current realm.
ReportAccess(string)Reports an access to the window by the code of the current realm (https://html.spec.whatwg.org/multipage/browsers.html#coop-check-access-report).
ShouldReportAccess()Whether the [[Get]] and [[Set]] internal methods of the WindowProxy must report the access for the code of the current realm (https://html.spec.whatwg.org/multipage/browsers.html#coop-check-access-report): the windows are in different virtual browsing context groups and an opener policy reports the accesses. The engine then calls IJsWindowProxyHandler<TValue>.ReportAccess with the name of the property.

GetChild(int)

Returns the WindowProxy of the document-tree child navigable at index, or null.

TValue? GetChild(int index)

Parameters

index int

Returns

TValue?

IsNamedProperty(string)

IJsCrossOriginObjectHandler.cs

Whether name is a named property of the window (https://html.spec.whatwg.org/multipage/nav-history-apis.html#named-access-on-the-window-object): a named child navigable, or a named element when the window is same origin-domain with the current realm.

public bool IsNamedProperty(string name)

Parameters

name string
The name of the property.

Returns

bool

ReportAccess(string)

IJsCrossOriginObjectHandler.cs

Reports an access to the window by the code of the current realm (https://html.spec.whatwg.org/multipage/browsers.html#coop-check-access-report).

public void ReportAccess(string propertyName)

Parameters

propertyName string
The name of a cross-origin accessible window property, indexed for a child navigable, or named for a named property.

ShouldReportAccess()

IJsCrossOriginObjectHandler.cs

Whether the [[Get]] and [[Set]] internal methods of the WindowProxy must report the access for the code of the current realm (https://html.spec.whatwg.org/multipage/browsers.html#coop-check-access-report): the windows are in different virtual browsing context groups and an opener policy reports the accesses. The engine then calls IJsWindowProxyHandler<TValue>.ReportAccess with the name of the property.

public bool ShouldReportAccess()

Returns

bool