add missing externs to repo

This commit is contained in:
2024-10-13 17:40:46 -05:00
parent b211bc0c4b
commit 2b6830784c
554 changed files with 13165 additions and 1 deletions

View File

@@ -0,0 +1,17 @@
package webextension_polyfill.namespaces.browsersettings_colormanagement.browsersettingscolormanagement;
typedef Static = {
/**
This setting controls the mode used for color management and must be a string from $(ref:browserSettings.
ColorManagementMode)
**/
var mode : webextension_polyfill.types.Setting;
/**
This boolean setting controls whether or not native sRGB color management is used.
**/
var useNativeSRGB : webextension_polyfill.types.Setting;
/**
This boolean setting controls whether or not the WebRender compositor is used.
**/
var useWebRenderCompositor : webextension_polyfill.types.Setting;
};

View File

@@ -0,0 +1,33 @@
package webextension_polyfill.namespaces.devtools_inspectedwindow.devtoolsinspectedwindow;
/**
An object providing details if an exception occurred while evaluating the expression.
**/
typedef EvalCallbackExceptionInfoType = {
/**
Set if the error occurred on the DevTools side before the expression is evaluated.
**/
var isError : Bool;
/**
Set if the error occurred on the DevTools side before the expression is evaluated.
**/
var code : String;
/**
Set if the error occurred on the DevTools side before the expression is evaluated.
**/
var description : String;
/**
Set if the error occurred on the DevTools side before the expression is evaluated,
contains the array of the values that may be substituted into the description string to provide more information about
the cause of the error.
**/
var details : Array<Dynamic>;
/**
Set if the evaluated code produces an unhandled exception.
**/
var isException : Bool;
/**
Set if the evaluated code produces an unhandled exception.
**/
var value : String;
};

View File

@@ -0,0 +1,6 @@
package webextension_polyfill.namespaces.devtools_inspectedwindow.devtoolsinspectedwindow;
/**
The options parameter can contain one or more options.
**/
typedef EvalOptionsType = { };

View File

@@ -0,0 +1,28 @@
package webextension_polyfill.namespaces.devtools_inspectedwindow.devtoolsinspectedwindow;
typedef ReloadReloadOptionsType = {
/**
When true, the loader will bypass the cache for all inspected page resources loaded before the <code>load</code>
event is fired. The effect is similar to pressing Ctrl+Shift+R in the inspected window or within the Developer Tools
window.
Optional.
**/
@:optional
var ignoreCache : Bool;
/**
If specified, the string will override the value of the <code>User-Agent</code> HTTP header that's sent while loading
the resources of the inspected page. The string will also override the value of the <code>navigator.userAgent</code>
property that's returned to any scripts that are running within the inspected page.
Optional.
**/
@:optional
var userAgent : String;
/**
If specified, the script will be injected into every frame of the inspected page immediately upon load,
before any of the frame's scripts. The script will not be injected after subsequent reloads&mdash;for example,
if the user presses Ctrl+R.
Optional.
**/
@:optional
var injectedScript : String;
};

View File

@@ -0,0 +1,11 @@
package webextension_polyfill.namespaces.devtools_inspectedwindow.devtoolsinspectedwindow;
/**
A resource within the inspected page, such as a document, a script, or an image.
**/
typedef Resource = {
/**
The URL of the resource.
**/
var url : String;
};

View File

@@ -0,0 +1,22 @@
package webextension_polyfill.namespaces.devtools_inspectedwindow.devtoolsinspectedwindow;
typedef Static = {
/**
Evaluates a JavaScript expression in the context of the main frame of the inspected page.
The expression must evaluate to a JSON-compliant object, otherwise an exception is thrown.
The eval function can report either a DevTools-side error or a JavaScript exception that occurs during evaluation.
In either case, the <code>result</code> parameter of the callback is <code>undefined</code>.
In the case of a DevTools-side error, the <code>isException</code> parameter is non-null and has <code>isError</code>
set to true and <code>code</code> set to an error code. In the case of a JavaScript error, <code>isException</code>
is set to true and <code>value</code> is set to the string value of thrown object.
**/
function eval(expression:String, ?options:EvalOptionsType):js.lib.Promise<ts.Tuple2<Dynamic, EvalCallbackExceptionInfoType>>;
/**
Reloads the inspected page.
**/
function reload(?reloadOptions:ReloadReloadOptionsType):Void;
/**
The ID of the tab being inspected. This ID may be used with chrome.tabs.* API.
**/
var tabId : Float;
};

View File

@@ -0,0 +1,6 @@
package webextension_polyfill.namespaces.devtools_network.devtoolsnetwork;
/**
A HAR log. See HAR specification for details.
**/
typedef GetHARCallbackHarLogType = { };

View File

@@ -0,0 +1,11 @@
package webextension_polyfill.namespaces.devtools_network.devtoolsnetwork;
/**
Represents a network request for a document resource (script, image and so on). See HAR Specification for reference.
**/
typedef Request = {
/**
Returns content of the response body.
**/
function getContent():js.lib.Promise<ts.Tuple2<String, String>>;
};

View File

@@ -0,0 +1,16 @@
package webextension_polyfill.namespaces.devtools_network.devtoolsnetwork;
typedef Static = {
/**
Returns HAR log that contains all known network requests.
**/
function getHAR():js.lib.Promise<GetHARCallbackHarLogType>;
/**
Fired when a network request is finished and all request data are available.
**/
var onRequestFinished : webextension_polyfill.events.Event<(request:Request) -> Void>;
/**
Fired when the inspected window navigates to a new page.
**/
var onNavigated : webextension_polyfill.events.Event<(url:String) -> Void>;
};

View File

@@ -0,0 +1,6 @@
package webextension_polyfill.namespaces.devtools_panels.devtoolspanels;
/**
A button created by the extension.
**/
typedef Button = { };

View File

@@ -0,0 +1,15 @@
package webextension_polyfill.namespaces.devtools_panels.devtoolspanels;
/**
Represents the Elements panel.
**/
typedef ElementsPanel = {
/**
Creates a pane within panel's sidebar.
**/
function createSidebarPane(title:String):js.lib.Promise<ExtensionSidebarPane>;
/**
Fired when an object is selected in the panel.
**/
var onSelectionChanged : webextension_polyfill.events.Event<() -> Void>;
};

View File

@@ -0,0 +1,15 @@
package webextension_polyfill.namespaces.devtools_panels.devtoolspanels;
/**
Represents a panel created by extension.
**/
typedef ExtensionPanel = {
/**
Fired when the user switches to the panel.
**/
var onShown : webextension_polyfill.events.Event<(window:js.html.Window) -> Void>;
/**
Fired when the user switches away from the panel.
**/
var onHidden : webextension_polyfill.events.Event<() -> Void>;
};

View File

@@ -0,0 +1,28 @@
package webextension_polyfill.namespaces.devtools_panels.devtoolspanels;
/**
A sidebar created by the extension.
**/
typedef ExtensionSidebarPane = {
/**
Sets an expression that is evaluated within the inspected page. The result is displayed in the sidebar pane.
**/
function setExpression(expression:String, ?rootTitle:String):js.lib.Promise<ts.Undefined>;
/**
Sets a JSON-compliant object to be displayed in the sidebar pane.
**/
function setObject(jsonObject:ts.AnyOf3<String, Array<Any>, haxe.DynamicAccess<Any>>, ?rootTitle:String):js.lib.Promise<ts.Undefined>;
/**
Sets an HTML page to be displayed in the sidebar pane.
**/
function setPage(path:String):Void;
/**
Fired when the sidebar pane becomes visible as a result of user switching to the panel that hosts it.
**/
var onShown : webextension_polyfill.events.Event<(window:js.html.Window) -> Void>;
/**
Fired when the sidebar pane becomes hidden as a result of the user switching away from the panel that hosts the sidebar
pane.
**/
var onHidden : webextension_polyfill.events.Event<() -> Void>;
};

View File

@@ -0,0 +1,6 @@
package webextension_polyfill.namespaces.devtools_panels.devtoolspanels;
/**
Represents the Sources panel.
**/
typedef SourcesPanel = { };

View File

@@ -0,0 +1,24 @@
package webextension_polyfill.namespaces.devtools_panels.devtoolspanels;
typedef Static = {
/**
Creates an extension panel.
**/
function create(title:String, iconPath:String, pagePath:String):js.lib.Promise<ExtensionPanel>;
/**
Fired when the devtools theme changes.
**/
var onThemeChanged : webextension_polyfill.events.Event<(themeName:String) -> Void>;
/**
Elements panel.
**/
var elements : ElementsPanel;
/**
Sources panel.
**/
var sources : SourcesPanel;
/**
The name of the current devtools theme.
**/
var themeName : String;
};

View File

@@ -0,0 +1,6 @@
package webextension_polyfill.namespaces.privacy_network.privacynetwork;
/**
The mode for https-only mode.
**/
typedef HTTPSOnlyModeOption = String;

View File

@@ -0,0 +1,6 @@
package webextension_polyfill.namespaces.privacy_network.privacynetwork;
/**
The IP handling policy of WebRTC.
**/
typedef IPHandlingPolicy = String;

View File

@@ -0,0 +1,35 @@
package webextension_polyfill.namespaces.privacy_network.privacynetwork;
typedef Static = {
/**
If enabled, the browser attempts to speed up your web browsing experience by pre-resolving DNS entries,
prerendering sites (<code>&lt;link rel='prefetch' ...&gt;</code>), and preemptively opening TCP and SSL connections to
servers. This preference's value is a boolean, defaulting to <code>true</code>.
**/
var networkPredictionEnabled : webextension_polyfill.types.Setting;
/**
Allow users to enable and disable RTCPeerConnections (aka WebRTC).
**/
var peerConnectionEnabled : webextension_polyfill.types.Setting;
/**
Allow users to specify the media performance/privacy tradeoffs which impacts how WebRTC traffic will be routed and how
much local address information is exposed. This preference's value is of type IPHandlingPolicy, defaulting to <code>
default</code>.
**/
var webRTCIPHandlingPolicy : webextension_polyfill.types.Setting;
/**
This property controls the minimum and maximum TLS versions. This setting's value is an object of
$(ref:tlsVersionRestrictionConfig).
**/
var tlsVersionRestriction : webextension_polyfill.types.Setting;
/**
Allow users to query the mode for 'HTTPS-Only Mode'. This setting's value is of type HTTPSOnlyModeOption,
defaulting to <code>never</code>.
**/
var httpsOnlyMode : webextension_polyfill.types.Setting;
/**
Allow users to query the status of 'Global Privacy Control'. This setting's value is of type boolean,
defaulting to <code>false</code>.
**/
var globalPrivacyControl : webextension_polyfill.types.Setting;
};

View File

@@ -0,0 +1,19 @@
package webextension_polyfill.namespaces.privacy_network.privacynetwork;
/**
An object which describes TLS minimum and maximum versions.
**/
typedef TlsVersionRestrictionConfig = {
/**
The minimum TLS version supported.
Optional.
**/
@:optional
var minimum : webextension_polyfill.webrequest.SecurityInfoProtocolVersionEnum;
/**
The maximum TLS version supported.
Optional.
**/
@:optional
var maximum : webextension_polyfill.webrequest.SecurityInfoProtocolVersionEnum;
};

View File

@@ -0,0 +1,6 @@
package webextension_polyfill.namespaces.privacy_network.privacynetwork;
/**
The maximum TLS version supported.
**/
typedef TlsVersionRestrictionConfigMaximumEnum = webextension_polyfill.webrequest.SecurityInfoProtocolVersionEnum;

View File

@@ -0,0 +1,6 @@
package webextension_polyfill.namespaces.privacy_network.privacynetwork;
/**
The minimum TLS version supported.
**/
typedef TlsVersionRestrictionConfigMinimumEnum = webextension_polyfill.webrequest.SecurityInfoProtocolVersionEnum;

View File

@@ -0,0 +1,9 @@
package webextension_polyfill.namespaces.privacy_services.privacyservices;
typedef Static = {
/**
If enabled, the password manager will ask if you want to save passwords. This preference's value is a boolean,
defaulting to <code>true</code>.
**/
var passwordSavingEnabled : webextension_polyfill.types.Setting;
};

View File

@@ -0,0 +1,13 @@
package webextension_polyfill.namespaces.privacy_websites.privacywebsites;
/**
The settings for cookies.
**/
typedef CookieConfig = {
/**
The type of cookies to allow.
Optional.
**/
@:optional
var behavior : CookieConfigBehaviorEnum;
};

View File

@@ -0,0 +1,6 @@
package webextension_polyfill.namespaces.privacy_websites.privacywebsites;
/**
The type of cookies to allow.
**/
typedef CookieConfigBehaviorEnum = String;

View File

@@ -0,0 +1,41 @@
package webextension_polyfill.namespaces.privacy_websites.privacywebsites;
typedef Static = {
/**
If enabled, the browser sends auditing pings when requested by a website (<code>&lt;a ping&gt;</code>).
The value of this preference is of type boolean, and the default value is <code>true</code>.
**/
var hyperlinkAuditingEnabled : webextension_polyfill.types.Setting;
/**
If enabled, the browser sends <code>referer</code> headers with your requests. Yes,
the name of this preference doesn't match the misspelled header. No, we're not going to change it.
The value of this preference is of type boolean, and the default value is <code>true</code>.
**/
var referrersEnabled : webextension_polyfill.types.Setting;
/**
If enabled, the browser attempts to appear similar to other users by reporting generic information to websites.
This can prevent websites from uniquely identifying users. Examples of data that is spoofed include number of CPU cores,
precision of JavaScript timers, the local timezone, and disabling features such as GamePad support,
and the WebSpeech and Navigator APIs. The value of this preference is of type boolean, and the default value is <code>
false</code>.
**/
var resistFingerprinting : webextension_polyfill.types.Setting;
/**
If enabled, the browser will associate all data (including cookies, HSTS data, cached images, and more)
for any third party domains with the domain in the address bar. This prevents third party trackers from using directly
stored information to identify you across different websites, but may break websites where you login with a third party
account (such as a Facebook or Google login.) The value of this preference is of type boolean,
and the default value is <code>false</code>.
**/
var firstPartyIsolate : webextension_polyfill.types.Setting;
/**
Allow users to specify the mode for tracking protection. This setting's value is of type TrackingProtectionModeOption,
defaulting to <code>private_browsing_only</code>.
**/
var trackingProtectionMode : webextension_polyfill.types.Setting;
/**
Allow users to specify the default settings for allowing cookies, as well as whether all cookies should be created as
non-persistent cookies. This setting's value is of type CookieConfig.
**/
var cookieConfig : webextension_polyfill.types.Setting;
};

View File

@@ -0,0 +1,6 @@
package webextension_polyfill.namespaces.privacy_websites.privacywebsites;
/**
The mode for tracking protection.
**/
typedef TrackingProtectionModeOption = webextension_polyfill.namespaces.privacy_network.privacynetwork.HTTPSOnlyModeOption;