LoadURIOptions.webidl (4617B)
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/. */ 4 5 interface PolicyContainer; 6 interface Principal; 7 interface URI; 8 interface InputStream; 9 interface ReferrerInfo; 10 11 enum ForceMediaDocument { 12 "none", 13 "image", 14 "video", 15 }; 16 17 /** 18 * This dictionary holds load arguments for docshell loads. 19 */ 20 [GenerateInit] 21 dictionary LoadURIOptions { 22 /** 23 * The principal that initiated the load. 24 */ 25 Principal? triggeringPrincipal = null; 26 27 /** 28 * The policyContainer to be used for the load. That is *not* the policyContainer 29 * that will be applied to subresource loads within that document but the 30 * policyContainer for the document load itself. E.g. if that policyContainer's 31 * CSP includes upgrade-insecure-requests, then the new top-level load will 32 * be upgraded to HTTPS. 33 */ 34 PolicyContainer? policyContainer = null; 35 36 /** 37 * Flags modifying load behaviour. This parameter is a bitwise 38 * combination of the load flags defined in nsIWebNavigation.idl. 39 */ 40 long loadFlags = 0; 41 42 /** 43 * The referring info of the load. If this argument is null, then the 44 * referrer URI and referrer policy will be inferred internally. 45 */ 46 ReferrerInfo? referrerInfo = null; 47 48 /** 49 * If the URI to be loaded corresponds to a HTTP request, then this stream is 50 * appended directly to the HTTP request headers. It may be prefixed 51 * with additional HTTP headers. This stream must contain a "\r\n" 52 * sequence separating any HTTP headers from the HTTP request body. 53 */ 54 InputStream? postData = null; 55 56 /** 57 * If the URI corresponds to a HTTP request, then any HTTP headers 58 * contained in this stream are set on the HTTP request. The HTTP 59 * header stream is formatted as: 60 * ( HEADER "\r\n" )* 61 */ 62 InputStream? headers = null; 63 64 /** 65 * Set to indicate a base URI to be associated with the load. Note 66 * that at present this argument is only used with view-source aURIs 67 * and cannot be used to resolve aURI. 68 */ 69 URI? baseURI = null; 70 71 /** 72 * Set to indicate that the URI to be loaded was triggered by a user 73 * action. (Mostly used in the context of Sec-Fetch-User). 74 */ 75 boolean hasValidUserGestureActivation = false; 76 77 /** 78 * Indicates if there is a user activation for text directives, 79 * which would allow to scroll to the first text directive. 80 */ 81 boolean textDirectiveUserActivation = false; 82 /** 83 * The SandboxFlags of the entity thats 84 * responsible for causing the load. 85 */ 86 unsigned long triggeringSandboxFlags = 0; 87 88 /** 89 * The window id and storage access status of the window of the 90 * context that triggered the load. This is used to allow self-initiated 91 * same-origin navigations to propagate their "has storage access" bit 92 * to the next Document. 93 */ 94 unsigned long long triggeringWindowId = 0; 95 boolean triggeringStorageAccess = false; 96 97 /** 98 * The RemoteType of the entity that's responsible for the load. Defaults to 99 * the current process. 100 * 101 * When starting a load in a content process, `triggeringRemoteType` must be 102 * either unset, or match the current remote type. 103 */ 104 UTF8String? triggeringRemoteType; 105 106 /** 107 * If non-0, a value to pass to nsIDocShell::setCancelContentJSEpoch 108 * when initiating the load. 109 */ 110 long cancelContentJSEpoch = 0; 111 112 /** 113 * If this is passed, it will control which remote type is used to finish this 114 * load. Ignored for non-`about:` loads. 115 * 116 * NOTE: This is _NOT_ defaulted to `null`, as `null` is the value for 117 * `NOT_REMOTE_TYPE`, and we need to determine the difference between no 118 * `remoteTypeOverride` and a `remoteTypeOverride` of `NOT_REMOTE_TYPE`. 119 */ 120 UTF8String? remoteTypeOverride; 121 122 /** 123 * Whether the search/URL term was without an explicit scheme. 124 * This holds enum values for SchemelessInputType from nsILoadInfo.idl. 125 */ 126 octet schemelessInput = 0; 127 128 /** 129 * If this is not none, the result document will be forced to to load as either 130 * an ImageDocument or VideoDocument. 131 */ 132 ForceMediaDocument forceMediaDocument = "none"; 133 134 /** 135 * The app-link intent launch type of the page load. Defaults to 0 (UNKNOWN). 136 * The launch type can be COLD, WARM, HOT or UNKNOWN. 137 * COLD = 1, WARM = 2, HOT = 3, UNKNOWN = 0. 138 */ 139 unsigned long appLinkLaunchType = 0; 140 141 /** 142 * Whether this is a captive portal tab. Used to grant local network access 143 * permissions without prompting the user. 144 */ 145 boolean isCaptivePortalTab = false; 146 };