Function: mergeSessionInit()
function mergeSessionInit(init: unknown, options?: SessionRequestOptions): unknown;
Defined in: session-init.ts:43
Fold a request's features into the host's XRSessionInit.
The caller's entries are appended to the host's rather than replacing them,
so a per-request feature adds to the app's defaults instead of discarding
them, and a feature named in both appears once. A request that names no
features returns the host's init object unchanged, identity included, so a
host that expects undefined still gets undefined.
init is unknown because each binding types its own hook's return: an
init that is not an object is treated as absent and replaced by the merged
features, since a host that returned something unusable had nothing to keep.
Parameters
| Parameter | Type |
|---|---|
init | unknown |
options? | SessionRequestOptions |
Returns
unknown