1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 interface ContentSecurityPolicy;
9 interface ReferrerInfo;
12 * This dictionary holds load arguments for docshell loads.
15 dictionary LoadURIOptions {
17 * The principal that initiated the load.
19 Principal? triggeringPrincipal = null;
22 * The CSP to be used for the load. That is *not* the CSP that will
23 * be applied to subresource loads within that document but the CSP
24 * for the document load itself. E.g. if that CSP includes
25 * upgrade-insecure-requests, then the new top-level load will
26 * be upgraded to HTTPS.
28 ContentSecurityPolicy? csp = null;
31 * Flags modifying load behaviour. This parameter is a bitwise
32 * combination of the load flags defined in nsIWebNavigation.idl.
37 * The referring info of the load. If this argument is null, then the
38 * referrer URI and referrer policy will be inferred internally.
40 ReferrerInfo? referrerInfo = null;
43 * If the URI to be loaded corresponds to a HTTP request, then this stream is
44 * appended directly to the HTTP request headers. It may be prefixed
45 * with additional HTTP headers. This stream must contain a "\r\n"
46 * sequence separating any HTTP headers from the HTTP request body.
48 InputStream? postData = null;
51 * If the URI corresponds to a HTTP request, then any HTTP headers
52 * contained in this stream are set on the HTTP request. The HTTP
53 * header stream is formatted as:
56 InputStream? headers = null;
59 * Set to indicate a base URI to be associated with the load. Note
60 * that at present this argument is only used with view-source aURIs
61 * and cannot be used to resolve aURI.
66 * Set to indicate that the URI to be loaded was triggered by a user
67 * action. (Mostly used in the context of Sec-Fetch-User).
69 boolean hasValidUserGestureActivation = false;
73 * The SandboxFlags of the entity thats
74 * responsible for causing the load.
76 unsigned long triggeringSandboxFlags = 0;
79 * The window id and storage access status of the window of the
80 * context that triggered the load. This is used to allow self-initiated
81 * same-origin navigations to propagate their "has storage access" bit
82 * to the next Document.
84 unsigned long long triggeringWindowId = 0;
85 boolean triggeringStorageAccess = false;
88 * The RemoteType of the entity that's responsible for the load. Defaults to
89 * the current process.
91 * When starting a load in a content process, `triggeringRemoteType` must be
92 * either unset, or match the current remote type.
94 UTF8String? triggeringRemoteType;
97 * If non-0, a value to pass to nsIDocShell::setCancelContentJSEpoch
98 * when initiating the load.
100 long cancelContentJSEpoch = 0;
103 * If this is passed, it will control which remote type is used to finish this
104 * load. Ignored for non-`about:` loads.
106 * NOTE: This is _NOT_ defaulted to `null`, as `null` is the value for
107 * `NOT_REMOTE_TYPE`, and we need to determine the difference between no
108 * `remoteTypeOverride` and a `remoteTypeOverride` of `NOT_REMOTE_TYPE`.
110 UTF8String? remoteTypeOverride;
113 * Whether the search/URL term was without an explicit scheme.
115 boolean wasSchemelessInput = false;