aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--articles/ui/ui.pdfbin0 -> 1595846 bytes
-rw-r--r--content_scripts/notify.ts155
-rw-r--r--gulpfile.js4
-rwxr-xr-xlib/decl/chrome/chrome.d.ts4436
-rw-r--r--lib/decl/lib.es6.d.ts16936
-rw-r--r--lib/decl/systemjs/systemjs.d.ts2
-rw-r--r--lib/decl/webrtc/MediaStream.d.ts199
-rw-r--r--lib/emscripten/emsc.d.ts7
-rw-r--r--lib/i18n.ts24
-rw-r--r--lib/shopApi.ts169
-rw-r--r--lib/vendor/mithril.js4390
-rw-r--r--lib/wallet/checkable.ts51
-rw-r--r--lib/wallet/cryptoApi.ts7
-rw-r--r--lib/wallet/cryptoLib.ts9
-rw-r--r--lib/wallet/db.ts15
-rw-r--r--lib/wallet/emscriptif.ts55
-rw-r--r--lib/wallet/helpers.ts8
-rw-r--r--lib/wallet/http.ts6
-rw-r--r--lib/wallet/query.ts140
-rw-r--r--lib/wallet/types.ts2
-rw-r--r--lib/wallet/wallet.ts69
-rw-r--r--lib/wallet/wxMessaging.ts92
-rw-r--r--manifest.json2
-rw-r--r--package.json2
-rw-r--r--pages/confirm-contract.html2
-rw-r--r--pages/confirm-contract.tsx12
-rw-r--r--pages/confirm-create-reserve.html2
-rw-r--r--pages/confirm-create-reserve.tsx220
-rw-r--r--pages/show-db.ts33
-rw-r--r--popup/popup.tsx31
-rw-r--r--test/tests/taler.ts4
-rw-r--r--tsconfig.json7
32 files changed, 14452 insertions, 12639 deletions
diff --git a/articles/ui/ui.pdf b/articles/ui/ui.pdf
new file mode 100644
index 000000000..98ae6e2d3
--- /dev/null
+++ b/articles/ui/ui.pdf
Binary files differ
diff --git a/content_scripts/notify.ts b/content_scripts/notify.ts
index 54d7b6acb..7e54f27d6 100644
--- a/content_scripts/notify.ts
+++ b/content_scripts/notify.ts
@@ -31,24 +31,149 @@
namespace TalerNotify {
const PROTOCOL_VERSION = 1;
- console.log("Taler injected", chrome.runtime.id);
+ /**
+ * Wallet-internal version of offerContractFrom, used for 402 payments.
+ */
+ function internalOfferContractFrom(url: string) {
+ function handle_contract(contract_wrapper: any) {
+ var cEvent = new CustomEvent("taler-confirm-contract", {
+ detail: {
+ contract_wrapper: contract_wrapper,
+ replace_navigation: true
+ }
+ });
+ document.dispatchEvent(cEvent);
+ }
+
+ var contract_request = new XMLHttpRequest();
+ console.log("downloading contract from '" + url + "'");
+ contract_request.open("GET", url, true);
+ contract_request.onload = function (e) {
+ if (contract_request.readyState == 4) {
+ if (contract_request.status == 200) {
+ console.log("response text:",
+ contract_request.responseText);
+ var contract_wrapper = JSON.parse(contract_request.responseText);
+ if (!contract_wrapper) {
+ console.error("response text was invalid json");
+ alert("Failure to download contract (invalid json)");
+ return;
+ }
+ handle_contract(contract_wrapper);
+ } else {
+ alert("Failure to download contract from merchant " +
+ "(" + contract_request.status + "):\n" +
+ contract_request.responseText);
+ }
+ }
+ };
+ contract_request.onerror = function (e) {
+ alert("Failure requesting the contract:\n"
+ + contract_request.statusText);
+ };
+ contract_request.send();
+ }
+
+ /**
+ * Wallet-internal version of executeContract, used for 402 payments.
+ *
+ * Even though we're inside a content script, we send events to the dom
+ * to avoid code duplication.
+ */
+ function internalExecuteContract(contractHash: string, payUrl: string,
+ offerUrl: string) {
+ /**
+ * Handle a failed payment.
+ *
+ * Try to notify the wallet first, before we show a potentially
+ * synchronous error message (such as an alert) or leave the page.
+ */
+ function handleFailedPayment(status: any) {
+ const msg = {
+ type: "payment-failed",
+ detail: {},
+ };
+ chrome.runtime.sendMessage(msg, (resp) => {
+ alert("payment failed");
+ });
+ }
+
- function subst(url: string, H_contract) {
+ function handleResponse(evt: CustomEvent) {
+ console.log("handling taler-notify-payment");
+ // Payment timeout in ms.
+ let timeout_ms = 1000;
+ // Current request.
+ let r: XMLHttpRequest | null = null;
+ let timeoutHandle: number|null = null;
+ function sendPay() {
+ r = new XMLHttpRequest();
+ r.open("post", payUrl);
+ r.setRequestHeader("Content-Type", "application/json;charset=UTF-8");
+ r.send(JSON.stringify(evt.detail.payment));
+ r.onload = function() {
+ if (!r) {
+ throw Error("invariant");
+ }
+ switch (r.status) {
+ case 200:
+ window.location.href = subst(evt.detail.contract.fulfillment_url,
+ evt.detail.H_contract);
+ window.location.reload(true);
+ break;
+ default:
+ handleFailedPayment(r.status);
+ break;
+ }
+ r = null;
+ if (timeoutHandle != null) {
+ clearTimeout(timeoutHandle);
+ timeoutHandle = null;
+ }
+ };
+ function retry() {
+ if (r) {
+ r.abort();
+ r = null;
+ }
+ timeout_ms = Math.min(timeout_ms * 2, 10 * 1000);
+ console.log("sendPay timed out, retrying in ", timeout_ms, "ms");
+ sendPay();
+ }
+ timeoutHandle = setTimeout(retry, timeout_ms);
+ }
+ sendPay();
+ }
+
+ let detail = {
+ H_contract: contractHash,
+ offering_url: offerUrl
+ };
+
+ document.addEventListener("taler-notify-payment", handleResponse, false);
+ let eve = new CustomEvent('taler-execute-contract', {detail: detail});
+ document.dispatchEvent(eve);
+ }
+
+ function subst(url: string, H_contract: string) {
url = url.replace("${H_contract}", H_contract);
url = url.replace("${$}", "$");
return url;
}
- const handlers = [];
+ interface Handler {
+ type: string;
+ listener: (e: CustomEvent) => void;
+ }
+ const handlers: Handler[] = [];
function init() {
- chrome.runtime.sendMessage({type: "ping"}, () => {
+ chrome.runtime.sendMessage({type: "ping"}, (resp) => {
if (chrome.runtime.lastError) {
console.log("extension not yet ready");
window.setTimeout(init, 200);
return;
}
- console.log("got pong");
registerHandlers();
// Hack to know when the extension is unloaded
let port = chrome.runtime.connect();
@@ -59,15 +184,27 @@ namespace TalerNotify {
document.removeEventListener(handler.type, handler.listener);
}
});
+
+
+
+ if (resp && resp.type === "fetch") {
+ console.log("it's fetch");
+ internalOfferContractFrom(resp.contractUrl);
+ document.documentElement.style.visibility = "hidden";
+
+ } else if (resp && resp.type === "execute") {
+ console.log("it's execute");
+ document.documentElement.style.visibility = "hidden";
+ internalExecuteContract(resp.contractHash, resp.payUrl, resp.offerUrl);
+ }
});
}
+ console.log("loading Taler content script");
init();
function registerHandlers() {
- const $ = (x) => document.getElementById(x);
-
- function addHandler(type, listener) {
+ function addHandler(type: string, listener: (e: CustomEvent) => void) {
document.addEventListener(type, listener);
handlers.push({type, listener});
}
@@ -193,7 +330,7 @@ namespace TalerNotify {
console.log("got resp");
console.dir(resp);
if (!resp.success) {
- console.log("got event detial:");
+ console.log("got event detail:");
console.dir(e.detail);
if (e.detail.offering_url) {
console.log("offering url", e.detail.offering_url);
diff --git a/gulpfile.js b/gulpfile.js
index c2f5319d2..f8379d638 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -117,7 +117,7 @@ const paths = {
const tsBaseArgs = {
- target: "es5",
+ target: "es6",
jsx: "react",
experimentalDecorators: true,
module: "system",
@@ -125,6 +125,8 @@ const tsBaseArgs = {
noLib: true,
noImplicitReturns: true,
noFallthroughCasesInSwitch: true,
+ strictNullChecks: true,
+ noImplicitAny: true,
};
diff --git a/lib/decl/chrome/chrome.d.ts b/lib/decl/chrome/chrome.d.ts
index 77d2898fd..5a67322f2 100755
--- a/lib/decl/chrome/chrome.d.ts
+++ b/lib/decl/chrome/chrome.d.ts
@@ -1,9 +1,8 @@
// Type definitions for Chrome extension development
// Project: http://developer.chrome.com/extensions/
-// Definitions by: Matthew Kimber <https://github.com/matthewkimber>, otiai10 <https://github.com/otiai10>, couven92 <https://github.com/couven92>
-// Definitions: https://github.com/borisyankov/DefinitelyTyped
+// Definitions by: Matthew Kimber <https://github.com/matthewkimber>, otiai10 <https://github.com/otiai10>, couven92 <https://github.com/couven92>, RReverser <https://github.com/rreverser>
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-/// <reference path='../webrtc/MediaStream.d.ts'/>
/// <reference path='../filesystem/filesystem.d.ts' />
////////////////////
@@ -18,11 +17,11 @@ interface Window {
////////////////////
/**
* Use the chrome.accessibilityFeatures API to manage Chrome's accessibility features. This API relies on the ChromeSetting prototype of the type API for getting and setting individual accessibility features. In order to get feature states the extension must request accessibilityFeatures.read permission. For modifying feature state, the extension needs accessibilityFeatures.modify permission. Note that accessibilityFeatures.modify does not imply accessibilityFeatures.read permission.
- * Availability: Since Chrome 37.
+ * Availability: Since Chrome 37.
* Permissions: "accessibilityFeatures.read"
* Important: This API works only on Chrome OS.
*/
-declare module chrome.accessibilityFeatures {
+declare namespace chrome.accessibilityFeatures {
interface AccessibilityFeaturesGetArg {
/** Optional. Whether to return the value that applies to the incognito session (default false). */
incognito?: boolean;
@@ -45,8 +44,8 @@ declare module chrome.accessibilityFeatures {
interface AccessibilityFeaturesSetArg {
/**
- * The value of the setting.
- * Note that every setting has a specific value type, which is described together with the setting. An extension should not set a value of a different type.
+ * The value of the setting.
+ * Note that every setting has a specific value type, which is described together with the setting. An extension should not set a value of a different type.
*/
value: any;
/**
@@ -112,11 +111,11 @@ declare module chrome.accessibilityFeatures {
// Alarms
////////////////////
/**
- * Use the chrome.alarms API to schedule code to run periodically or at a specified time in the future.
+ * Use the chrome.alarms API to schedule code to run periodically or at a specified time in the future.
* Availability: Since Chrome 22.
* Permissions: "alarms"
*/
-declare module chrome.alarms {
+declare namespace chrome.alarms {
interface AlarmCreateInfo {
/** Optional. Length of time in minutes after which the onAlarm event should fire. */
delayInMinutes?: number;
@@ -135,65 +134,59 @@ declare module chrome.alarms {
name: string;
}
- interface AlarmEvent extends chrome.events.Event {
- /**
- * The callback parameter should be a function that looks like this:
- * function( Alarm alarm) {...};
- */
- addListener(callback: (alarm: Alarm) => void): void;
- }
+ interface AlarmEvent extends chrome.events.Event<(alarm: Alarm) => void> {}
/**
* Creates an alarm. Near the time(s) specified by alarmInfo, the onAlarm event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm.
* In order to reduce the load on the user's machine, Chrome limits alarms to at most once every 1 minute but may delay them an arbitrary amount more. That is, setting delayInMinutes or periodInMinutes to less than 1 will not be honored and will cause a warning. when can be set to less than 1 minute after "now" without warning but won't actually cause the alarm to fire for at least 1 minute.
* To help you debug your app or extension, when you've loaded it unpacked, there's no limit to how often the alarm can fire.
- * @param alarmInfo Describes when the alarm should fire. The initial time must be specified by either when or delayInMinutes (but not both). If periodInMinutes is set, the alarm will repeat every periodInMinutes minutes after the initial event. If neither when or delayInMinutes is set for a repeating alarm, periodInMinutes is used as the default for delayInMinutes.
+ * @param alarmInfo Describes when the alarm should fire. The initial time must be specified by either when or delayInMinutes (but not both). If periodInMinutes is set, the alarm will repeat every periodInMinutes minutes after the initial event. If neither when or delayInMinutes is set for a repeating alarm, periodInMinutes is used as the default for delayInMinutes.
*/
export function create(alarmInfo: AlarmCreateInfo): void;
/**
* Creates an alarm. Near the time(s) specified by alarmInfo, the onAlarm event is fired. If there is another alarm with the same name (or no name if none is specified), it will be cancelled and replaced by this alarm.
* In order to reduce the load on the user's machine, Chrome limits alarms to at most once every 1 minute but may delay them an arbitrary amount more. That is, setting delayInMinutes or periodInMinutes to less than 1 will not be honored and will cause a warning. when can be set to less than 1 minute after "now" without warning but won't actually cause the alarm to fire for at least 1 minute.
* To help you debug your app or extension, when you've loaded it unpacked, there's no limit to how often the alarm can fire.
- * @param name Optional name to identify this alarm. Defaults to the empty string.
- * @param alarmInfo Describes when the alarm should fire. The initial time must be specified by either when or delayInMinutes (but not both). If periodInMinutes is set, the alarm will repeat every periodInMinutes minutes after the initial event. If neither when or delayInMinutes is set for a repeating alarm, periodInMinutes is used as the default for delayInMinutes.
+ * @param name Optional name to identify this alarm. Defaults to the empty string.
+ * @param alarmInfo Describes when the alarm should fire. The initial time must be specified by either when or delayInMinutes (but not both). If periodInMinutes is set, the alarm will repeat every periodInMinutes minutes after the initial event. If neither when or delayInMinutes is set for a repeating alarm, periodInMinutes is used as the default for delayInMinutes.
*/
export function create(name: string, alarmInfo: AlarmCreateInfo): void;
/**
- * Gets an array of all the alarms.
+ * Gets an array of all the alarms.
* @param callback The callback parameter should be a function that looks like this:
- * function(array of Alarm alarms) {...};
+ * function(array of Alarm alarms) {...};
*/
export function getAll(callback: (alarms: Alarm[]) => void): void;
/**
- * Clears all alarms.
+ * Clears all alarms.
* @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function(boolean wasCleared) {...};
+ * function(boolean wasCleared) {...};
*/
export function clearAll(callback?: (wasCleared: boolean) => void): void;
/**
- * Clears the alarm with the given name.
- * @param name The name of the alarm to clear. Defaults to the empty string.
+ * Clears the alarm with the given name.
+ * @param name The name of the alarm to clear. Defaults to the empty string.
* @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function(boolean wasCleared) {...};
+ * function(boolean wasCleared) {...};
*/
export function clear(name?: string, callback?: (wasCleared: boolean) => void): void;
/**
- * Clears the alarm without a name.
+ * Clears the alarm without a name.
* @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function(boolean wasCleared) {...};
+ * function(boolean wasCleared) {...};
*/
export function clear(callback: (wasCleared: boolean) => void): void;
/**
- * Retrieves details about the specified alarm.
+ * Retrieves details about the specified alarm.
* @param callback The callback parameter should be a function that looks like this:
- * function( Alarm alarm) {...};
+ * function( Alarm alarm) {...};
*/
export function get(callback: (alarm: Alarm) => void): void;
/**
- * Retrieves details about the specified alarm.
+ * Retrieves details about the specified alarm.
* @param name The name of the alarm to get. Defaults to the empty string.
* @param callback The callback parameter should be a function that looks like this:
- * function( Alarm alarm) {...};
+ * function( Alarm alarm) {...};
*/
export function get(name: string, callback: (alarm: Alarm) => void): void;
@@ -202,30 +195,30 @@ declare module chrome.alarms {
}
/**
- * Use the chrome.browser API to interact with the Chrome browser associated with
- * the current application and Chrome profile.
+ * Use the chrome.browser API to interact with the Chrome browser associated with
+ * the current application and Chrome profile.
*/
-declare module chrome.browser {
+declare namespace chrome.browser {
interface Options {
/** The URL to navigate to when the new tab is initially opened. */
url: string;
}
-
+
/**
- * Opens a new tab in a browser window associated with the current application
- * and Chrome profile. If no browser window for the Chrome profile is opened,
- * a new one is opened prior to creating the new tab.
- * @param options Configures how the tab should be opened.
- * @param callback Called when the tab was successfully
+ * Opens a new tab in a browser window associated with the current application
+ * and Chrome profile. If no browser window for the Chrome profile is opened,
+ * a new one is opened prior to creating the new tab.
+ * @param options Configures how the tab should be opened.
+ * @param callback Called when the tab was successfully
* created, or failed to be created. If failed, runtime.lastError will be set.
*/
export function openTab(options: Options, callback: () => void): void;
-
+
/**
- * Opens a new tab in a browser window associated with the current application
- * and Chrome profile. If no browser window for the Chrome profile is opened,
- * a new one is opened prior to creating the new tab. Since Chrome 42 only.
- * @param options Configures how the tab should be opened.
+ * Opens a new tab in a browser window associated with the current application
+ * and Chrome profile. If no browser window for the Chrome profile is opened,
+ * a new one is opened prior to creating the new tab. Since Chrome 42 only.
+ * @param options Configures how the tab should be opened.
*/
export function openTab(options: Options): void;
}
@@ -234,11 +227,11 @@ declare module chrome.browser {
// Bookmarks
////////////////////
/**
- * Use the chrome.bookmarks API to create, organize, and otherwise manipulate bookmarks. Also see Override Pages, which you can use to create a custom Bookmark Manager page.
- * Availability: Since Chrome 5.
- * Permissions: "bookmarks"
+ * Use the chrome.bookmarks API to create, organize, and otherwise manipulate bookmarks. Also see Override Pages, which you can use to create a custom Bookmark Manager page.
+ * Availability: Since Chrome 5.
+ * Permissions: "bookmarks"
*/
-declare module chrome.bookmarks {
+declare namespace chrome.bookmarks {
/** A node (either a bookmark or a folder) in the bookmark tree. Child nodes are ordered within their parent folder. */
interface BookmarkTreeNode {
/** Optional. The 0-based position of this node within its parent folder. */
@@ -259,8 +252,8 @@ declare module chrome.bookmarks {
children?: BookmarkTreeNode[];
/**
* Optional.
- * Since Chrome 37.
- * Indicates the reason why this node is unmodifiable. The managed value indicates that this node was configured by the system administrator or by the custodian of a supervised user. Omitted if the node can be modified by the user and the extension (default).
+ * Since Chrome 37.
+ * Indicates the reason why this node is unmodifiable. The managed value indicates that this node was configured by the system administrator or by the custodian of a supervised user. Omitted if the node can be modified by the user and the extension (default).
*/
unmodifiable?: any;
}
@@ -286,61 +279,19 @@ declare module chrome.bookmarks {
childIds: string[];
}
- interface BookmarkRemovedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(string id, object removeInfo) {...};
- */
- addListener(callback: (id: string, removeInfo: BookmarkRemoveInfo) => void): void;
- }
+ interface BookmarkRemovedEvent extends chrome.events.Event<(id: string, removeInfo: BookmarkRemoveInfo) => void> {}
- interface BookmarkImportEndedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function() {...};
- */
- addListener(callback: () => void): void;
- }
+ interface BookmarkImportEndedEvent extends chrome.events.Event<() => void> {}
- interface BookmarkMovedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(string id, object moveInfo) {...};
- */
- addListener(callback: (id: string, moveInfo: BookmarkMoveInfo) => void): void;
- }
+ interface BookmarkMovedEvent extends chrome.events.Event<(id: string, moveInfo: BookmarkMoveInfo) => void> {}
- interface BookmarkImportBeganEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function() {...};
- */
- addListener(callback: () => void): void;
- }
+ interface BookmarkImportBeganEvent extends chrome.events.Event<() => void> {}
- interface BookmarkChangedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(string id, object changeInfo) {...};
- */
- addListener(callback: (id: string, changeInfo: BookmarkChangeInfo) => void): void;
- }
+ interface BookmarkChangedEvent extends chrome.events.Event<(id: string, changeInfo: BookmarkChangeInfo) => void> {}
- interface BookmarkCreatedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(string id, BookmarkTreeNode bookmark) {...};
- */
- addListener(callback: (id: string, bookmark: BookmarkTreeNode) => void): void;
- }
+ interface BookmarkCreatedEvent extends chrome.events.Event<(id: string, bookmark: BookmarkTreeNode) => void> {}
- interface BookmarkChildrenReordered extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(string id, object reorderInfo) {...};
- */
- addListener(callback: (id: string, reorderInfo: BookmarkReorderInfo) => void): void;
- }
+ interface BookmarkChildrenReordered extends chrome.events.Event<(id: string, reorderInfo: BookmarkReorderInfo) => void> {}
interface BookmarkSearchQuery {
query?: string;
@@ -365,95 +316,95 @@ declare module chrome.bookmarks {
title?: string;
url?: string;
}
-
+
/** @deprecated since Chrome 38. Bookmark write operations are no longer limited by Chrome. */
var MAX_WRITE_OPERATIONS_PER_HOUR: number;
/** @deprecated since Chrome 38. Bookmark write operations are no longer limited by Chrome. */
var MAX_SUSTAINED_WRITE_OPERATIONS_PER_MINUTE: number;
/**
- * Searches for BookmarkTreeNodes matching the given query. Queries specified with an object produce BookmarkTreeNodes matching all specified properties.
+ * Searches for BookmarkTreeNodes matching the given query. Queries specified with an object produce BookmarkTreeNodes matching all specified properties.
* @param query A string of words and quoted phrases that are matched against bookmark URLs and titles.
- * @param callback The callback parameter should be a function that looks like this:
- * function(array of BookmarkTreeNode results) {...};
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(array of BookmarkTreeNode results) {...};
*/
export function search(query: string, callback: (results: BookmarkTreeNode[]) => void): void;
/**
- * Searches for BookmarkTreeNodes matching the given query. Queries specified with an object produce BookmarkTreeNodes matching all specified properties.
- * @param query An object with one or more of the properties query, url, and title specified. Bookmarks matching all specified properties will be produced.
- * @param callback The callback parameter should be a function that looks like this:
- * function(array of BookmarkTreeNode results) {...};
+ * Searches for BookmarkTreeNodes matching the given query. Queries specified with an object produce BookmarkTreeNodes matching all specified properties.
+ * @param query An object with one or more of the properties query, url, and title specified. Bookmarks matching all specified properties will be produced.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(array of BookmarkTreeNode results) {...};
*/
export function search(query: BookmarkSearchQuery, callback: (results: BookmarkTreeNode[]) => void): void;
/**
- * Retrieves the entire Bookmarks hierarchy.
+ * Retrieves the entire Bookmarks hierarchy.
* @param callback The callback parameter should be a function that looks like this:
- * function(array of BookmarkTreeNode results) {...};
+ * function(array of BookmarkTreeNode results) {...};
*/
export function getTree(callback: (results: BookmarkTreeNode[]) => void): void;
/**
- * Retrieves the recently added bookmarks.
- * @param numberOfItems The maximum number of items to return.
+ * Retrieves the recently added bookmarks.
+ * @param numberOfItems The maximum number of items to return.
* @param callback The callback parameter should be a function that looks like this:
- * function(array of BookmarkTreeNode results) {...};
+ * function(array of BookmarkTreeNode results) {...};
*/
export function getRecent(numberOfItems: number, callback: (results: BookmarkTreeNode[]) => void): void;
/**
* Retrieves the specified BookmarkTreeNode.
* @param id A single string-valued id
* @param callback The callback parameter should be a function that looks like this:
- * function(array of BookmarkTreeNode results) {...};
+ * function(array of BookmarkTreeNode results) {...};
*/
export function get(id: string, callback: (results: BookmarkTreeNode[]) => void): void;
/**
* Retrieves the specified BookmarkTreeNode.
* @param idList An array of string-valued ids
* @param callback The callback parameter should be a function that looks like this:
- * function(array of BookmarkTreeNode results) {...};
+ * function(array of BookmarkTreeNode results) {...};
*/
export function get(idList: string[], callback: (results: BookmarkTreeNode[]) => void): void;
/**
- * Creates a bookmark or folder under the specified parentId. If url is NULL or missing, it will be a folder.
+ * Creates a bookmark or folder under the specified parentId. If url is NULL or missing, it will be a folder.
* @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function( BookmarkTreeNode result) {...};
+ * function( BookmarkTreeNode result) {...};
*/
export function create(bookmark: BookmarkCreateArg, callback?: (result: BookmarkTreeNode) => void): void;
/**
- * Moves the specified BookmarkTreeNode to the provided location.
+ * Moves the specified BookmarkTreeNode to the provided location.
* @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function( BookmarkTreeNode result) {...};
+ * function( BookmarkTreeNode result) {...};
*/
export function move(id: string, destination: BookmarkDestinationArg, callback?: (result: BookmarkTreeNode) => void): void;
/**
- * Updates the properties of a bookmark or folder. Specify only the properties that you want to change; unspecified properties will be left unchanged. Note: Currently, only 'title' and 'url' are supported.
+ * Updates the properties of a bookmark or folder. Specify only the properties that you want to change; unspecified properties will be left unchanged. Note: Currently, only 'title' and 'url' are supported.
* @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function( BookmarkTreeNode result) {...};
+ * function( BookmarkTreeNode result) {...};
*/
export function update(id: string, changes: BookmarkChangesArg, callback?: (result: BookmarkTreeNode) => void): void;
/**
- * Removes a bookmark or an empty bookmark folder.
+ * Removes a bookmark or an empty bookmark folder.
* @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * function() {...};
*/
export function remove(id: string, callback?: Function): void;
/**
- * Retrieves the children of the specified BookmarkTreeNode id.
+ * Retrieves the children of the specified BookmarkTreeNode id.
* @param callback The callback parameter should be a function that looks like this:
- * function(array of BookmarkTreeNode results) {...};
+ * function(array of BookmarkTreeNode results) {...};
*/
export function getChildren(id: string, callback: (results: BookmarkTreeNode[]) => void): void;
/**
- * Since Chrome 14.
- * Retrieves part of the Bookmarks hierarchy, starting at the specified node.
- * @param id The ID of the root of the subtree to retrieve.
+ * Since Chrome 14.
+ * Retrieves part of the Bookmarks hierarchy, starting at the specified node.
+ * @param id The ID of the root of the subtree to retrieve.
* @param callback The callback parameter should be a function that looks like this:
- * function(array of BookmarkTreeNode results) {...};
+ * function(array of BookmarkTreeNode results) {...};
*/
export function getSubTree(id: string, callback: (results: BookmarkTreeNode[]) => void): void;
/**
- * Recursively removes a bookmark folder.
+ * Recursively removes a bookmark folder.
* @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * function() {...};
*/
export function removeTree(id: string, callback?: Function): void;
@@ -478,10 +429,10 @@ declare module chrome.bookmarks {
////////////////////
/**
* Use browser actions to put icons in the main Google Chrome toolbar, to the right of the address bar. In addition to its icon, a browser action can also have a tooltip, a badge, and a popup.
- * Availability: Since Chrome 5.
- * Manifest: "browser_action": {...}
+ * Availability: Since Chrome 5.
+ * Manifest: "browser_action": {...}
*/
-declare module chrome.browserAction {
+declare namespace chrome.browserAction {
interface BadgeBackgroundColorDetails {
/** An array of four integers in the range [0,255] that make up the RGBA color of the badge. For example, opaque red is [255, 0, 0, 255]. Can also be a string with a CSS value, with opaque red being #FF0000 or #F00. */
color: any;
@@ -524,18 +475,12 @@ declare module chrome.browserAction {
popup: string;
}
- interface BrowserClickedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function( tabs.Tab tab) {...};
- */
- addListener(callback: (tab: chrome.tabs.Tab) => void): void;
- }
+ interface BrowserClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> {}
/**
- * Since Chrome 22.
- * Enables the browser action for a tab. By default, browser actions are enabled.
- * @param tabId The id of the tab for which you want to modify the browser action.
+ * Since Chrome 22.
+ * Enables the browser action for a tab. By default, browser actions are enabled.
+ * @param tabId The id of the tab for which you want to modify the browser action.
*/
export function enable(tabId?: number): void;
/** Sets the background color for the badge. */
@@ -545,45 +490,45 @@ declare module chrome.browserAction {
/** Sets the title of the browser action. This shows up in the tooltip. */
export function setTitle(details: TitleDetails): void;
/**
- * Since Chrome 19.
- * Gets the badge text of the browser action. If no tab is specified, the non-tab-specific badge text is returned.
- * @param callback The callback parameter should be a function that looks like this:
- * function(string result) {...};
+ * Since Chrome 19.
+ * Gets the badge text of the browser action. If no tab is specified, the non-tab-specific badge text is returned.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(string result) {...};
*/
export function getBadgeText(details: TabDetails, callback: (result: string) => void): void;
/** Sets the html document to be opened as a popup when the user clicks on the browser action's icon. */
export function setPopup(details: PopupDetails): void;
/**
- * Since Chrome 22.
- * Disables the browser action for a tab.
- * @param tabId The id of the tab for which you want to modify the browser action.
+ * Since Chrome 22.
+ * Disables the browser action for a tab.
+ * @param tabId The id of the tab for which you want to modify the browser action.
*/
export function disable(tabId?: number): void;
/**
- * Since Chrome 19.
- * Gets the title of the browser action.
- * @param callback The callback parameter should be a function that looks like this:
- * function(string result) {...};
+ * Since Chrome 19.
+ * Gets the title of the browser action.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(string result) {...};
*/
export function getTitle(details: TabDetails, callback: (result: string) => void): void;
/**
- * Since Chrome 19.
- * Gets the background color of the browser action.
- * @param callback The callback parameter should be a function that looks like this:
- * function( ColorArray result) {...};
+ * Since Chrome 19.
+ * Gets the background color of the browser action.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function( ColorArray result) {...};
*/
export function getBadgeBackgroundColor(details: TabDetails, callback: (result: number[]) => void): void;
/**
- * Since Chrome 19.
- * Gets the html document set as the popup for this browser action.
- * @param callback The callback parameter should be a function that looks like this:
- * function(string result) {...};
+ * Since Chrome 19.
+ * Gets the html document set as the popup for this browser action.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(string result) {...};
*/
export function getPopup(details: TabDetails, callback: (result: string) => void): void;
/**
- * Sets the icon for the browser action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the path or the imageData property must be specified.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Sets the icon for the browser action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the path or the imageData property must be specified.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function setIcon(details: TabIconDetails, callback?: Function): void;
@@ -595,11 +540,11 @@ declare module chrome.browserAction {
// Browsing Data
////////////////////
/**
- * Use the chrome.browsingData API to remove browsing data from a user's local profile.
- * Availability: Since Chrome 19.
- * Permissions: "browsingData"
+ * Use the chrome.browsingData API to remove browsing data from a user's local profile.
+ * Availability: Since Chrome 19.
+ * Permissions: "browsingData"
*/
-declare module chrome.browsingData {
+declare namespace chrome.browsingData {
interface OriginTypes {
/** Optional. Websites that have been installed as hosted applications (be careful!). */
protectedWeb?: boolean;
@@ -613,8 +558,8 @@ declare module chrome.browsingData {
interface RemovalOptions {
/**
* Optional.
- * Since Chrome 21.
- * An object whose properties specify which origin types ought to be cleared. If this object isn't specified, it defaults to clearing only "unprotected" origins. Please ensure that you really want to remove application data before adding 'protectedWeb' or 'extensions'.
+ * Since Chrome 21.
+ * An object whose properties specify which origin types ought to be cleared. If this object isn't specified, it defaults to clearing only "unprotected" origins. Please ensure that you really want to remove application data before adding 'protectedWeb' or 'extensions'.
*/
originTypes?: OriginTypes;
/** Optional. Remove data accumulated on or after this date, represented in milliseconds since the epoch (accessible via the getTime method of the JavaScript Date object). If absent, defaults to 0 (which would remove all browsing data). */
@@ -622,7 +567,7 @@ declare module chrome.browsingData {
}
/**
- * Since Chrome 27.
+ * Since Chrome 27.
* A set of data types. Missing data types are interpreted as false.
*/
interface DataTypeSet {
@@ -654,8 +599,8 @@ declare module chrome.browsingData {
history?: boolean;
/**
* Optional.
- * Since Chrome 39.
- * Service Workers.
+ * Since Chrome 39.
+ * Service Workers.
*/
serviceWorkers?: boolean;
}
@@ -669,102 +614,102 @@ declare module chrome.browsingData {
}
/**
- * Since Chrome 26.
- * Reports which types of data are currently selected in the 'Clear browsing data' settings UI. Note: some of the data types included in this API are not available in the settings UI, and some UI settings control more than one data type listed here.
- * @param callback The callback parameter should be a function that looks like this:
- * function(object result) {...};
+ * Since Chrome 26.
+ * Reports which types of data are currently selected in the 'Clear browsing data' settings UI. Note: some of the data types included in this API are not available in the settings UI, and some UI settings control more than one data type listed here.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(object result) {...};
*/
export function settings(callback: (result: SettingsCallback) => void): void;
/**
- * Clears plugins' data.
- * @param callback Called when plugins' data has been cleared.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Clears plugins' data.
+ * @param callback Called when plugins' data has been cleared.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function removePluginData(options: RemovalOptions, callback?: () => void): void;
/**
- * Clears the browser's stored form data (autofill).
- * @param callback Called when the browser's form data has been cleared.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Clears the browser's stored form data (autofill).
+ * @param callback Called when the browser's form data has been cleared.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function removeFormData(options: RemovalOptions, callback?: () => void): void;
/**
- * Clears websites' file system data.
- * @param callback Called when websites' file systems have been cleared.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Clears websites' file system data.
+ * @param callback Called when websites' file systems have been cleared.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function removeFileSystems(options: RemovalOptions, callback?: () => void): void;
/**
- * Clears various types of browsing data stored in a user's profile.
- * @param dataToRemove The set of data types to remove.
- * @param callback Called when deletion has completed.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Clears various types of browsing data stored in a user's profile.
+ * @param dataToRemove The set of data types to remove.
+ * @param callback Called when deletion has completed.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function remove(options: RemovalOptions, dataToRemove: DataTypeSet, callback?: () => void): void;
/**
- * Clears the browser's stored passwords.
- * @param callback Called when the browser's passwords have been cleared.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Clears the browser's stored passwords.
+ * @param callback Called when the browser's passwords have been cleared.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function removePasswords(options: RemovalOptions, callback?: () => void): void;
/**
- * Clears the browser's cookies and server-bound certificates modified within a particular timeframe.
- * @param callback Called when the browser's cookies and server-bound certificates have been cleared.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Clears the browser's cookies and server-bound certificates modified within a particular timeframe.
+ * @param callback Called when the browser's cookies and server-bound certificates have been cleared.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function removeCookies(options: RemovalOptions, callback?: () => void): void;
/**
- * Clears websites' WebSQL data.
- * @param callback Called when websites' WebSQL databases have been cleared.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Clears websites' WebSQL data.
+ * @param callback Called when websites' WebSQL databases have been cleared.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function removeWebSQL(options: RemovalOptions, callback?: () => void): void;
/**
- * Clears websites' appcache data.
- * @param callback Called when websites' appcache data has been cleared.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Clears websites' appcache data.
+ * @param callback Called when websites' appcache data has been cleared.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function removeAppcache(options: RemovalOptions, callback?: () => void): void;
/**
- * Clears the browser's list of downloaded files (not the downloaded files themselves).
- * @param callback Called when the browser's list of downloaded files has been cleared.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Clears the browser's list of downloaded files (not the downloaded files themselves).
+ * @param callback Called when the browser's list of downloaded files has been cleared.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function removeDownloads(options: RemovalOptions, callback?: () => void): void;
/**
- * Clears websites' local storage data.
- * @param callback Called when websites' local storage has been cleared.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Clears websites' local storage data.
+ * @param callback Called when websites' local storage has been cleared.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function removeLocalStorage(options: RemovalOptions, callback?: () => void): void;
/**
- * Clears the browser's cache.
- * @param callback Called when the browser's cache has been cleared.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Clears the browser's cache.
+ * @param callback Called when the browser's cache has been cleared.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function removeCache(options: RemovalOptions, callback?: () => void): void;
/**
- * Clears the browser's history.
- * @param callback Called when the browser's history has cleared.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Clears the browser's history.
+ * @param callback Called when the browser's history has cleared.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function removeHistory(options: RemovalOptions, callback?: () => void): void;
/**
- * Clears websites' IndexedDB data.
- * @param callback Called when websites' IndexedDB data has been cleared.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Clears websites' IndexedDB data.
+ * @param callback Called when websites' IndexedDB data has been cleared.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function removeIndexedDB(options: RemovalOptions, callback?: () => void): void;
}
@@ -773,11 +718,11 @@ declare module chrome.browsingData {
// Commands
////////////////////
/**
- * Use the commands API to add keyboard shortcuts that trigger actions in your extension, for example, an action to open the browser action or send a command to the extension.
- * Availability: Since Chrome 25.
- * Manifest: "commands": {...}
+ * Use the commands API to add keyboard shortcuts that trigger actions in your extension, for example, an action to open the browser action or send a command to the extension.
+ * Availability: Since Chrome 25.
+ * Manifest: "commands": {...}
*/
-declare module chrome.commands {
+declare namespace chrome.commands {
interface Command {
/** Optional. The name of the Extension Command */
name?: string;
@@ -787,19 +732,13 @@ declare module chrome.commands {
shortcut?: string;
}
- interface CommandEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(string command) {...};
- */
- addListener(callback: (command: string) => void): void;
- }
+ interface CommandEvent extends chrome.events.Event<(command: string) => void> {}
/**
- * Returns all the registered extension commands for this extension and their shortcut (if active).
- * @param callback Called to return the registered commands.
+ * Returns all the registered extension commands for this extension and their shortcut (if active).
+ * @param callback Called to return the registered commands.
* If you specify the callback parameter, it should be a function that looks like this:
- * function(array of Command commands) {...};
+ * function(array of Command commands) {...};
*/
export function getAll(callback: (commands: Command[]) => void): void;
@@ -811,15 +750,15 @@ declare module chrome.commands {
// Content Settings
////////////////////
/**
- * Use the chrome.contentSettings API to change settings that control whether websites can use features such as cookies, JavaScript, and plugins. More generally speaking, content settings allow you to customize Chrome's behavior on a per-site basis instead of globally.
- * Availability: Since Chrome 16.
- * Permissions: "contentSettings"
+ * Use the chrome.contentSettings API to change settings that control whether websites can use features such as cookies, JavaScript, and plugins. More generally speaking, content settings allow you to customize Chrome's behavior on a per-site basis instead of globally.
+ * Availability: Since Chrome 16.
+ * Permissions: "contentSettings"
*/
-declare module chrome.contentSettings {
+declare namespace chrome.contentSettings {
interface ClearDetails {
/**
* Optional.
- * Where to clear the setting (default: regular).
+ * Where to clear the setting (default: regular).
* The scope of the ContentSetting. One of
* * regular: setting for regular profile (which is inherited by the incognito profile if not overridden elsewhere),
* * incognito_session_only: setting for incognito profile that can only be set during an incognito session and is deleted when the incognito session ends (overrides regular settings).
@@ -858,27 +797,27 @@ declare module chrome.contentSettings {
interface ContentSetting {
/**
- * Clear all content setting rules set by this extension.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Clear all content setting rules set by this extension.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
clear(details: ClearDetails, callback?: () => void): void;
/**
- * Applies a new content setting rule.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Applies a new content setting rule.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
set(details: SetDetails, callback?: () => void): void;
/**
- * @param callback The callback parameter should be a function that looks like this:
- * function(array of ResourceIdentifier resourceIdentifiers) {...};
- * Parameter resourceIdentifiers: A list of resource identifiers for this content type, or undefined if this content type does not use resource identifiers.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(array of ResourceIdentifier resourceIdentifiers) {...};
+ * Parameter resourceIdentifiers: A list of resource identifiers for this content type, or undefined if this content type does not use resource identifiers.
*/
getResourceIdentifiers(callback: (resourceIdentifiers?: ResourceIdentifier[]) => void): void;
/**
- * Gets the current content setting for a given pair of URLs.
- * @param callback The callback parameter should be a function that looks like this:
- * function(object details) {...};
+ * Gets the current content setting for a given pair of URLs.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(object details) {...};
*/
get(details: GetDetails, callback: (details: ReturnedDetails) => void): void;
}
@@ -895,9 +834,9 @@ declare module chrome.contentSettings {
* Whether to allow cookies and other local data to be set by websites. One of
* allow: Accept cookies,
* block: Block cookies,
- * session_only: Accept cookies only for the current session.
+ * session_only: Accept cookies only for the current session.
* Default is allow.
- * The primary URL is the URL representing the cookie origin. The secondary URL is the URL of the top-level frame.
+ * The primary URL is the URL representing the cookie origin. The secondary URL is the URL of the top-level frame.
*/
var cookies: ContentSetting;
/**
@@ -911,9 +850,9 @@ declare module chrome.contentSettings {
/**
* Whether to run JavaScript. One of
* allow: Run JavaScript,
- * block: Don't run JavaScript.
+ * block: Don't run JavaScript.
* Default is allow.
- * The primary URL is the URL of the top-level frame. The secondary URL is not used.
+ * The primary URL is the URL of the top-level frame. The secondary URL is not used.
*/
var javascript: ContentSetting;
/**
@@ -922,7 +861,7 @@ declare module chrome.contentSettings {
* block: Don't allow sites to show desktop notifications,
* ask: Ask when a site wants to show desktop notifications.
* Default is ask.
- * The primary URL is the URL of the document which wants to show the notification. The secondary URL is not used.
+ * The primary URL is the URL of the document which wants to show the notification. The secondary URL is not used.
*/
var notifications: ContentSetting;
/**
@@ -937,23 +876,23 @@ declare module chrome.contentSettings {
/**
* Whether to show images. One of
* allow: Show images,
- * block: Don't show images.
+ * block: Don't show images.
* Default is allow.
- * The primary URL is the URL of the top-level frame. The secondary URL is the URL of the image.
+ * The primary URL is the URL of the top-level frame. The secondary URL is the URL of the image.
*/
var images: ContentSetting;
/**
- * Since Chrome 42.
- * Whether to allow Geolocation. One of
+ * Since Chrome 42.
+ * Whether to allow Geolocation. One of
* allow: Allow sites to track your physical location,
* block: Don't allow sites to track your physical location,
* ask: Ask before allowing sites to track your physical location.
* Default is ask.
- * The primary URL is the URL of the document which requested location data. The secondary URL is the URL of the top-level frame (which may or may not differ from the requesting URL).
+ * The primary URL is the URL of the document which requested location data. The secondary URL is the URL of the top-level frame (which may or may not differ from the requesting URL).
*/
var location: ContentSetting;
/**
- * Since Chrome 42.
+ * Since Chrome 42.
* Whether to allow sites to toggle the fullscreen mode. One of
* allow: Allow sites to toggle the fullscreen mode,
* ask: Ask when a site wants to toggle the fullscreen mode.
@@ -972,7 +911,7 @@ declare module chrome.contentSettings {
*/
var mouselock: ContentSetting;
/**
- * Since Chrome 42.
+ * Since Chrome 42.
* Whether to allow sites to run plugins unsandboxed. One of
* allow: Allow sites to run plugins unsandboxed,
* block: Don't allow sites to run plugins unsandboxed,
@@ -982,7 +921,7 @@ declare module chrome.contentSettings {
*/
var unsandboxedPlugins: ContentSetting;
/**
- * Since Chrome 42.
+ * Since Chrome 42.
* Whether to allow sites to download multiple files automatically. One of
* allow: Allow sites to download multiple files automatically,
* block: Don't allow sites to download multiple files automatically,
@@ -998,15 +937,15 @@ declare module chrome.contentSettings {
////////////////////
/**
* Use the chrome.contextMenus API to add items to Google Chrome's context menu. You can choose what types of objects your context menu additions apply to, such as images, hyperlinks, and pages.
- * Availability: Since Chrome 6.
- * Permissions: "contextMenus"
+ * Availability: Since Chrome 6.
+ * Permissions: "contextMenus"
*/
-declare module chrome.contextMenus {
+declare namespace chrome.contextMenus {
interface OnClickData {
/**
* Optional.
* Since Chrome 35.
- * The text for the context selection, if any.
+ * The text for the context selection, if any.
*/
selectionText?: string;
/**
@@ -1033,7 +972,7 @@ declare module chrome.contextMenus {
editable: boolean;
/**
* Optional.
- * Since Chrome 35.
+ * Since Chrome 35.
* One of 'image', 'video', or 'audio' if the context menu was activated on one of these types of elements.
*/
mediaType?: string;
@@ -1044,14 +983,14 @@ declare module chrome.contextMenus {
*/
wasChecked?: boolean;
/**
- * Since Chrome 35.
- * The URL of the page where the menu item was clicked. This property is not set if the click occured in a context where there is no current page, such as in a launcher context menu.
+ * Since Chrome 35.
+ * The URL of the page where the menu item was clicked. This property is not set if the click occured in a context where there is no current page, such as in a launcher context menu.
*/
pageUrl: string;
/**
* Optional.
* Since Chrome 35.
- * If the element is a link, the URL it points to.
+ * If the element is a link, the URL it points to.
*/
linkUrl?: string;
/**
@@ -1062,7 +1001,7 @@ declare module chrome.contextMenus {
parentMenuItemId?: any;
/**
* Optional.
- * Since Chrome 35.
+ * Since Chrome 35.
* Will be present for elements with a 'src' URL.
*/
srcUrl?: string;
@@ -1079,17 +1018,17 @@ declare module chrome.contextMenus {
contexts?: string[];
/**
* Optional.
- * Since Chrome 20.
- * Whether this context menu item is enabled or disabled. Defaults to true.
+ * Since Chrome 20.
+ * Whether this context menu item is enabled or disabled. Defaults to true.
*/
enabled?: boolean;
/** Optional. Similar to documentUrlPatterns, but lets you filter based on the src attribute of img/audio/video tags and the href of anchor tags. */
targetUrlPatterns?: string[];
/**
* Optional.
- * A function that will be called back when the menu item is clicked. Event pages cannot use this; instead, they should register a listener for chrome.contextMenus.onClicked.
- * @param info Information sent when a context menu item is clicked.
- * @param tab The details of the tab where the click took place. Note: this parameter only present for extensions.
+ * A function that will be called back when the menu item is clicked. Event pages cannot use this; instead, they should register a listener for chrome.contextMenus.onClicked.
+ * @param info Information sent when a context menu item is clicked.
+ * @param tab The details of the tab where the click took place. Note: this parameter only present for extensions.
*/
onclick?: (info: OnClickData, tab: chrome.tabs.Tab) => void;
/** Optional. The ID of a parent menu item; this makes the item a child of a previously added item. */
@@ -1098,7 +1037,7 @@ declare module chrome.contextMenus {
type?: string;
/**
* Optional.
- * Since Chrome 21.
+ * Since Chrome 21.
* The unique ID to assign to this item. Mandatory for event pages. Cannot be the same as another ID for this extension.
*/
id?: string;
@@ -1118,74 +1057,66 @@ declare module chrome.contextMenus {
type?: string;
}
- interface MenuClickedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(object info, tabs.Tab tab) {...};
- * Parameter info: Information sent when a context menu item is clicked.
- * Parameter tab: The details of the tab where the click took place. If the click did not take place in a tab, this parameter will be missing.
- */
- addListener(callback: (info: OnClickData, tab?: chrome.tabs.Tab) => void): void;
- }
+ interface MenuClickedEvent extends chrome.events.Event<(info: OnClickData, tab?: chrome.tabs.Tab) => void> {}
/**
- * Since Chrome 38.
- * The maximum number of top level extension items that can be added to an extension action context menu. Any items beyond this limit will be ignored.
+ * Since Chrome 38.
+ * The maximum number of top level extension items that can be added to an extension action context menu. Any items beyond this limit will be ignored.
*/
var ACTION_MENU_TOP_LEVEL_LIMIT: number;
/**
- * Removes all context menu items added by this extension.
- * @param callback Called when removal is complete.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Removes all context menu items added by this extension.
+ * @param callback Called when removal is complete.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function removeAll(callback?: () => void): void;
/**
* Creates a new context menu item. Note that if an error occurs during creation, you may not find out until the creation callback fires (the details will be in chrome.runtime.lastError).
- * @param callback Called when the item has been created in the browser. If there were any problems creating the item, details will be available in chrome.runtime.lastError.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * @param callback Called when the item has been created in the browser. If there were any problems creating the item, details will be available in chrome.runtime.lastError.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function create(createProperties: CreateProperties, callback?: () => void): void;
/**
- * Updates a previously created context menu item.
- * @param id The ID of the item to update.
- * @param updateProperties The properties to update. Accepts the same values as the create function.
- * @param callback Called when the context menu has been updated.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Updates a previously created context menu item.
+ * @param id The ID of the item to update.
+ * @param updateProperties The properties to update. Accepts the same values as the create function.
+ * @param callback Called when the context menu has been updated.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function update(id: string, updateProperties: UpdateProperties, callback?: () => void): void;
/**
- * Updates a previously created context menu item.
- * @param id The ID of the item to update.
- * @param updateProperties The properties to update. Accepts the same values as the create function.
- * @param callback Called when the context menu has been updated.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Updates a previously created context menu item.
+ * @param id The ID of the item to update.
+ * @param updateProperties The properties to update. Accepts the same values as the create function.
+ * @param callback Called when the context menu has been updated.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function update(id: number, updateProperties: UpdateProperties, callback?: () => void): void;
/**
- * Removes a context menu item.
- * @param menuItemId The ID of the context menu item to remove.
- * @param callback Called when the context menu has been removed.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Removes a context menu item.
+ * @param menuItemId The ID of the context menu item to remove.
+ * @param callback Called when the context menu has been removed.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function remove(menuItemId: string, callback?: () => void): void;
/**
- * Removes a context menu item.
- * @param menuItemId The ID of the context menu item to remove.
- * @param callback Called when the context menu has been removed.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Removes a context menu item.
+ * @param menuItemId The ID of the context menu item to remove.
+ * @param callback Called when the context menu has been removed.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function remove(menuItemId: number, callback?: () => void): void;
/**
- * Since Chrome 21.
- * Fired when a context menu item is clicked.
+ * Since Chrome 21.
+ * Fired when a context menu item is clicked.
*/
var onClicked: MenuClickedEvent;
}
@@ -1195,10 +1126,10 @@ declare module chrome.contextMenus {
////////////////////
/**
* Use the chrome.cookies API to query and modify cookies, and to be notified when they change.
- * Availability: Since Chrome 6.
- * Permissions: "cookies", host permissions
+ * Availability: Since Chrome 6.
+ * Permissions: "cookies", host permissions
*/
-declare module chrome.cookies {
+declare namespace chrome.cookies {
/** Represents information about an HTTP cookie. */
interface Cookie {
/** The domain of the cookie (e.g. "www.google.com", "example.com"). */
@@ -1280,57 +1211,51 @@ declare module chrome.cookies {
cookie: Cookie;
/** True if a cookie was removed. */
removed: boolean;
- /**
- * Since Chrome 12.
- * The underlying reason behind the cookie's change.
+ /**
+ * Since Chrome 12.
+ * The underlying reason behind the cookie's change.
*/
cause: string;
}
- interface CookieChangedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(object changeInfo) {...};
- */
- addListener(callback: (changeInfo: CookieChangeInfo) => void): void;
- }
+ interface CookieChangedEvent extends chrome.events.Event<(changeInfo: CookieChangeInfo) => void> {}
/**
- * Lists all existing cookie stores.
- * @param callback The callback parameter should be a function that looks like this:
- * function(array of CookieStore cookieStores) {...};
- * Parameter cookieStores: All the existing cookie stores.
+ * Lists all existing cookie stores.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(array of CookieStore cookieStores) {...};
+ * Parameter cookieStores: All the existing cookie stores.
*/
export function getAllCookieStores(callback: (cookieStores: CookieStore[]) => void): void;
/**
- * Retrieves all cookies from a single cookie store that match the given information. The cookies returned will be sorted, with those with the longest path first. If multiple cookies have the same path length, those with the earliest creation time will be first.
- * @param details Information to filter the cookies being retrieved.
- * @param callback The callback parameter should be a function that looks like this:
- * function(array of Cookie cookies) {...};
- * Parameter cookies: All the existing, unexpired cookies that match the given cookie info.
+ * Retrieves all cookies from a single cookie store that match the given information. The cookies returned will be sorted, with those with the longest path first. If multiple cookies have the same path length, those with the earliest creation time will be first.
+ * @param details Information to filter the cookies being retrieved.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(array of Cookie cookies) {...};
+ * Parameter cookies: All the existing, unexpired cookies that match the given cookie info.
*/
export function getAll(details: GetAllDetails, callback: (cookies: Cookie[]) => void): void;
/**
- * Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.
- * @param details Details about the cookie being set.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function( Cookie cookie) {...};
- * Optional parameter cookie: Contains details about the cookie that's been set. If setting failed for any reason, this will be "null", and "chrome.runtime.lastError" will be set.
+ * Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.
+ * @param details Details about the cookie being set.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function( Cookie cookie) {...};
+ * Optional parameter cookie: Contains details about the cookie that's been set. If setting failed for any reason, this will be "null", and "chrome.runtime.lastError" will be set.
*/
export function set(details: SetDetails, callback?: (cookie?: Cookie) => void): void;
/**
- * Deletes a cookie by name.
- * @param details Information to identify the cookie to remove.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function(object details) {...};
+ * Deletes a cookie by name.
+ * @param details Information to identify the cookie to remove.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function(object details) {...};
*/
export function remove(details: Details, callback?: (details: Details) => void): void;
/**
* Retrieves information about a single cookie. If more than one cookie of the same name exists for the given URL, the one with the longest path will be returned. For cookies with the same path length, the cookie with the earliest creation time will be returned.
- * @param details Details to identify the cookie being retrieved.
- * @param callback The callback parameter should be a function that looks like this:
- * function( Cookie cookie) {...};
- * Parameter cookie: Contains details about the cookie. This parameter is null if no such cookie was found.
+ * @param details Details to identify the cookie being retrieved.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function( Cookie cookie) {...};
+ * Parameter cookie: Contains details about the cookie. This parameter is null if no such cookie was found.
*/
export function get(details: Details, callback: (cookie?: Cookie) => void): void;
@@ -1342,9 +1267,9 @@ declare module chrome.cookies {
// Debugger
////////////////////
/**
- * The chrome.debugger API serves as an alternate transport for Chrome's remote debugging protocol. Use chrome.debugger to attach to one or more tabs to instrument network interaction, debug JavaScript, mutate the DOM and CSS, etc. Use the Debuggee tabId to target tabs with sendCommand and route events by tabId from onEvent callbacks.
- * Availability: Since Chrome 18.
- * Permissions: "debugger"
+ * The chrome.debugger API serves as an alternate transport for Chrome's remote debugging protocol. Use chrome.debugger to attach to one or more tabs to instrument network interaction, debug JavaScript, mutate the DOM and CSS, etc. Use the Debuggee tabId to target tabs with sendCommand and route events by tabId from onEvent callbacks.
+ * Availability: Since Chrome 18.
+ * Permissions: "debugger"
*/
declare module "chrome.debugger" {
/** Debuggee identifier. Either tabId or extensionId must be specified */
@@ -1353,8 +1278,8 @@ declare module "chrome.debugger" {
tabId?: number;
/**
* Optional.
- * Since Chrome 27.
- * The id of the extension which you intend to debug. Attaching to an extension background page is only possible when 'silent-debugger-extension-api' flag is enabled on the target browser.
+ * Since Chrome 27.
+ * The id of the extension which you intend to debug. Attaching to an extension background page is only possible when 'silent-debugger-extension-api' flag is enabled on the target browser.
*/
extensionId?: string;
/**
@@ -1364,9 +1289,9 @@ declare module "chrome.debugger" {
*/
targetId?: string;
}
-
+
/**
- * Since Chrome 28.
+ * Since Chrome 28.
* Debug target information
*/
interface TargetInfo {
@@ -1376,14 +1301,14 @@ declare module "chrome.debugger" {
id: string;
/**
* Optional.
- * Since Chrome 30.
- * The tab id, defined if type == 'page'.
+ * Since Chrome 30.
+ * The tab id, defined if type == 'page'.
*/
tabId?: number;
/**
* Optional.
- * Since Chrome 30.
- * The extension id, defined if type = 'background_page'.
+ * Since Chrome 30.
+ * The extension id, defined if type = 'background_page'.
*/
extensionId?: string;
/** True if debugger is already attached. */
@@ -1396,61 +1321,44 @@ declare module "chrome.debugger" {
faviconUrl?: string;
}
- interface DebuggerDetachedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function( Debuggee source, DetachReason reason) {...};
- * Parameter source: The debuggee that was detached.
- * Parameter reason: Since Chrome 24. Connection termination reason.
- */
- addListener(callback: (source: Debuggee, reason: string) => void): void;
- }
+ interface DebuggerDetachedEvent extends chrome.events.Event<(source: Debuggee, reason: string) => void> {}
- interface DebuggerEventEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function( Debuggee source, string method, object params) {...};
- * Parameter source: The debuggee that generated this event.
- * Parameter method: Method name. Should be one of the notifications defined by the remote debugging protocol.
- * Parameter params: JSON object with the parameters. Structure of the parameters varies depending on the method name and is defined by the 'parameters' attribute of the event description in the remote debugging protocol.
- */
- addListener(callback: (source: Debuggee, method: string, params?: Object) => void): void;
- }
+ interface DebuggerEventEvent extends chrome.events.Event<(source: Debuggee, method: string, params?: Object) => void> {}
/**
- * Attaches debugger to the given target.
- * @param target Debugging target to which you want to attach.
+ * Attaches debugger to the given target.
+ * @param target Debugging target to which you want to attach.
* @param requiredVersion Required debugging protocol version ("0.1"). One can only attach to the debuggee with matching major version and greater or equal minor version. List of the protocol versions can be obtained in the documentation pages.
- * @param callback Called once the attach operation succeeds or fails. Callback receives no arguments. If the attach fails, runtime.lastError will be set to the error message.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * @param callback Called once the attach operation succeeds or fails. Callback receives no arguments. If the attach fails, runtime.lastError will be set to the error message.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function attach(target: Debuggee, requiredVersion: string, callback?: () => void): void;
/**
- * Detaches debugger from the given target.
- * @param target Debugging target from which you want to detach.
- * @param callback Called once the detach operation succeeds or fails. Callback receives no arguments. If the detach fails, runtime.lastError will be set to the error message.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Detaches debugger from the given target.
+ * @param target Debugging target from which you want to detach.
+ * @param callback Called once the detach operation succeeds or fails. Callback receives no arguments. If the detach fails, runtime.lastError will be set to the error message.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function detach(target: Debuggee, callback?: () => void): void;
/**
- * Sends given command to the debugging target.
- * @param target Debugging target to which you want to send the command.
- * @param method Method name. Should be one of the methods defined by the remote debugging protocol.
- * @param commandParams Since Chrome 22.
- * JSON object with request parameters. This object must conform to the remote debugging params scheme for given method.
- * @param callback Response body. If an error occurs while posting the message, the callback will be called with no arguments and runtime.lastError will be set to the error message.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function(object result) {...};
+ * Sends given command to the debugging target.
+ * @param target Debugging target to which you want to send the command.
+ * @param method Method name. Should be one of the methods defined by the remote debugging protocol.
+ * @param commandParams Since Chrome 22.
+ * JSON object with request parameters. This object must conform to the remote debugging params scheme for given method.
+ * @param callback Response body. If an error occurs while posting the message, the callback will be called with no arguments and runtime.lastError will be set to the error message.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function(object result) {...};
*/
export function sendCommand(target: Debuggee, method: string, commandParams?: Object, callback?: (result?: Object) => void): void;
/**
- * Since Chrome 28.
- * Returns the list of available debug targets.
- * @param callback The callback parameter should be a function that looks like this:
- * function(array of TargetInfo result) {...};
- * Parameter result: Array of TargetInfo objects corresponding to the available debug targets.
+ * Since Chrome 28.
+ * Returns the list of available debug targets.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(array of TargetInfo result) {...};
+ * Parameter result: Array of TargetInfo objects corresponding to the available debug targets.
*/
export function getTargets(callback: (result: TargetInfo[]) => void): void;
@@ -1464,11 +1372,11 @@ declare module "chrome.debugger" {
// Declarative Content
////////////////////
/**
- * Use the chrome.declarativeContent API to take actions depending on the content of a page, without requiring permission to read the page's content.
- * Availability: Since Chrome 33.
- * Permissions: "declarativeContent"
+ * Use the chrome.declarativeContent API to take actions depending on the content of a page, without requiring permission to read the page's content.
+ * Availability: Since Chrome 33.
+ * Permissions: "declarativeContent"
*/
-declare module chrome.declarativeContent {
+declare namespace chrome.declarativeContent {
interface PageStateUrlDetails {
/** Optional. Matches if the host name of the URL contains a specified string. To test whether a host name component has a prefix 'foo', use hostContains: '.foo'. This matches 'www.foobar.com' and 'foo.com', because an implicit dot is added at the beginning of the host name. Similarly, hostContains can be used to match against component suffix ('foo.') and to exactly match against components ('.foo.'). Suffix- and exact-matching for the last components need to be done separately using hostSuffix, because no implicit dot is added at the end of the host name. */
hostContains?: string;
@@ -1509,9 +1417,9 @@ declare module chrome.declarativeContent {
/** Optional. Matches if the scheme of the URL is equal to any of the schemes specified in the array. */
schemes?: string[];
/** Optional. Matches if the port of the URL is contained in any of the specified port lists. For example [80, 443, [1000, 1200]] matches all requests on port 80, 443 and in the range 1000-1200. */
- port?: any[];
+ ports?: (number | number[])[];
}
-
+
/** Matches the state of a web page by various criteria. */
interface PageStateMatcher {
/** Optional. Filters URLs for various criteria. See event filtering. All criteria are case sensitive. */
@@ -1521,7 +1429,7 @@ declare module chrome.declarativeContent {
/**
* Optional.
* Since Chrome 45. Warning: this is the current Beta channel. More information available on the API documentation pages.
- * Matches if the bookmarked state of the page is equal to the specified value. Requres the bookmarks permission.
+ * Matches if the bookmarked state of the page is equal to the specified value. Requres the bookmarks permission.
*/
isBookmarked?: boolean;
}
@@ -1530,7 +1438,7 @@ declare module chrome.declarativeContent {
////////////////////
// Declarative Web Request
////////////////////
-declare module chrome.declarativeWebRequest {
+declare namespace chrome.declarativeWebRequest {
interface HeaderFilter {
nameEquals?: string;
valueContains?: any;
@@ -1631,9 +1539,7 @@ declare module chrome.declarativeWebRequest {
filter: RequestCookie;
}
- interface RequestedEvent extends chrome.events.Event {
- addListener(callback: Function): void;
- }
+ interface RequestedEvent extends chrome.events.Event<Function> {}
var onRequest: RequestedEvent;
}
@@ -1642,31 +1548,31 @@ declare module chrome.declarativeWebRequest {
// DesktopCapture
////////////////////
/**
- * Desktop Capture API that can be used to capture content of screen, individual windows or tabs.
- * Availability: Since Chrome 34.
- * Permissions: "desktopCapture"
+ * Desktop Capture API that can be used to capture content of screen, individual windows or tabs.
+ * Availability: Since Chrome 34.
+ * Permissions: "desktopCapture"
*/
-declare module chrome.desktopCapture {
+declare namespace chrome.desktopCapture {
/**
- * Shows desktop media picker UI with the specified set of sources.
- * @param sources Set of sources that should be shown to the user.
- * @param callback The callback parameter should be a function that looks like this:
- * function(string streamId) {...};
- * Parameter streamId: An opaque string that can be passed to getUserMedia() API to generate media stream that corresponds to the source selected by the user. If user didn't select any source (i.e. canceled the prompt) then the callback is called with an empty streamId. The created streamId can be used only once and expires after a few seconds when it is not used.
+ * Shows desktop media picker UI with the specified set of sources.
+ * @param sources Set of sources that should be shown to the user.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(string streamId) {...};
+ * Parameter streamId: An opaque string that can be passed to getUserMedia() API to generate media stream that corresponds to the source selected by the user. If user didn't select any source (i.e. canceled the prompt) then the callback is called with an empty streamId. The created streamId can be used only once and expires after a few seconds when it is not used.
*/
export function chooseDesktopMedia(sources: string[], callback: (streamId: string) => void): number;
/**
- * Shows desktop media picker UI with the specified set of sources.
- * @param sources Set of sources that should be shown to the user.
- * @param targetTab Optional tab for which the stream is created. If not specified then the resulting stream can be used only by the calling extension. The stream can only be used by frames in the given tab whose security origin matches tab.url.
- * @param callback The callback parameter should be a function that looks like this:
- * function(string streamId) {...};
- * Parameter streamId: An opaque string that can be passed to getUserMedia() API to generate media stream that corresponds to the source selected by the user. If user didn't select any source (i.e. canceled the prompt) then the callback is called with an empty streamId. The created streamId can be used only once and expires after a few seconds when it is not used.
+ * Shows desktop media picker UI with the specified set of sources.
+ * @param sources Set of sources that should be shown to the user.
+ * @param targetTab Optional tab for which the stream is created. If not specified then the resulting stream can be used only by the calling extension. The stream can only be used by frames in the given tab whose security origin matches tab.url.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(string streamId) {...};
+ * Parameter streamId: An opaque string that can be passed to getUserMedia() API to generate media stream that corresponds to the source selected by the user. If user didn't select any source (i.e. canceled the prompt) then the callback is called with an empty streamId. The created streamId can be used only once and expires after a few seconds when it is not used.
*/
export function chooseDesktopMedia(sources: string[], targetTab: chrome.tabs.Tab, callback: (streamId: string) => void): number;
/**
- * Hides desktop media picker dialog shown by chooseDesktopMedia().
- * @param desktopMediaRequestId Id returned by chooseDesktopMedia()
+ * Hides desktop media picker dialog shown by chooseDesktopMedia().
+ * @param desktopMediaRequestId Id returned by chooseDesktopMedia()
*/
export function cancelChooseDesktopMedia(desktopMediaRequestId: number): void;
}
@@ -1675,30 +1581,30 @@ declare module chrome.desktopCapture {
// Dev Tools - Inspected Window
////////////////////
/**
- * Use the chrome.devtools.inspectedWindow API to interact with the inspected window: obtain the tab ID for the inspected page, evaluate the code in the context of the inspected window, reload the page, or obtain the list of resources within the page.
- * Availability: Since Chrome 18.
+ * Use the chrome.devtools.inspectedWindow API to interact with the inspected window: obtain the tab ID for the inspected page, evaluate the code in the context of the inspected window, reload the page, or obtain the list of resources within the page.
+ * Availability: Since Chrome 18.
*/
-declare module chrome.devtools.inspectedWindow {
+declare namespace chrome.devtools.inspectedWindow {
/** A resource within the inspected page, such as a document, a script, or an image. */
interface Resource {
/** The URL of the resource. */
url: string;
- /**
+ /**
* Gets the content of the resource.
* @param callback A function that receives resource content when the request completes.
- * The callback parameter should be a function that looks like this:
- * function(string content, string encoding) {...};
- * Parameter content: Content of the resource (potentially encoded).
- * Parameter encoding: Empty if content is not encoded, encoding name otherwise. Currently, only base64 is supported.
+ * The callback parameter should be a function that looks like this:
+ * function(string content, string encoding) {...};
+ * Parameter content: Content of the resource (potentially encoded).
+ * Parameter encoding: Empty if content is not encoded, encoding name otherwise. Currently, only base64 is supported.
*/
getContent(callback: (content: string, encoding: string) => void): void;
/**
- * Sets the content of the resource.
- * @param content New content of the resource. Only resources with the text type are currently supported.
- * @param commit True if the user has finished editing the resource, and the new content of the resource should be persisted; false if this is a minor change sent in progress of the user editing the resource.
- * @param callback A function called upon request completion.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function(object error) {...};
+ * Sets the content of the resource.
+ * @param content New content of the resource. Only resources with the text type are currently supported.
+ * @param commit True if the user has finished editing the resource, and the new content of the resource should be persisted; false if this is a minor change sent in progress of the user editing the resource.
+ * @param callback A function called upon request completion.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function(object error) {...};
* Optional parameter error: Set to undefined if the resource content was set successfully; describes error otherwise.
*/
setContent(content: string, commit: boolean, callback?: (error: Object) => void): void;
@@ -1713,8 +1619,8 @@ declare module chrome.devtools.inspectedWindow {
injectedScript?: boolean;
/**
* Optional.
- * If specified, this script evaluates into a function that accepts three string arguments: the source to preprocess, the URL of the source, and a function name if the source is an DOM event handler. The preprocessorerScript function should return a string to be compiled by Chrome in place of the input source. In the case that the source is a DOM event handler, the returned source must compile to a single JS function.
- * @deprecated Deprecated since Chrome 41. Please avoid using this parameter, it will be removed soon.
+ * If specified, this script evaluates into a function that accepts three string arguments: the source to preprocess, the URL of the source, and a function name if the source is an DOM event handler. The preprocessorerScript function should return a string to be compiled by Chrome in place of the input source. In the case that the source is a DOM event handler, the returned source must compile to a single JS function.
+ * @deprecated Deprecated since Chrome 41. Please avoid using this parameter, it will be removed soon.
*/
preprocessorScript?: string;
}
@@ -1734,22 +1640,9 @@ declare module chrome.devtools.inspectedWindow {
value: string;
}
- interface ResourceAddedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function( Resource resource) {...};
- */
- addListener(callback: (resource: Resource) => void): void;
- }
+ interface ResourceAddedEvent extends chrome.events.Event<(resource: Resource) => void> {}
- interface ResourceContentCommittedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function( Resource resource, string content) {...};
- * Parameter content: New content of the resource.
- */
- addListener(callback: (resource: Resource, content: string) => void): void;
- }
+ interface ResourceContentCommittedEvent extends chrome.events.Event<(resource: Resource, content: string) => void> {}
/** The ID of the tab being inspected. This ID may be used with chrome.tabs.* API. */
var tabId: number;
@@ -1757,20 +1650,20 @@ declare module chrome.devtools.inspectedWindow {
/** Reloads the inspected page. */
export function reload(reloadOptions: ReloadOptions): void;
/**
- * 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 result parameter of the callback is undefined. In the case of a DevTools-side error, the isException parameter is non-null and has isError set to true and code set to an error code. In the case of a JavaScript error, isException is set to true and value is set to the string value of thrown object.
- * @param expression An expression to evaluate.
- * @param callback A function called when evaluation completes.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function(object result, object exceptionInfo) {...};
- * Parameter result: The result of evaluation.
- * Parameter exceptionInfo: An object providing details if an exception occurred while evaluating the expression.
+ * 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 result parameter of the callback is undefined. In the case of a DevTools-side error, the isException parameter is non-null and has isError set to true and code set to an error code. In the case of a JavaScript error, isException is set to true and value is set to the string value of thrown object.
+ * @param expression An expression to evaluate.
+ * @param callback A function called when evaluation completes.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function(object result, object exceptionInfo) {...};
+ * Parameter result: The result of evaluation.
+ * Parameter exceptionInfo: An object providing details if an exception occurred while evaluating the expression.
*/
export function eval(expression: string, callback?: (result: Object, exceptionInfo: EvaluationExceptionInfo) => void): void;
/**
- * Retrieves the list of resources from the inspected page.
- * @param callback A function that receives the list of resources when the request completes.
- * The callback parameter should be a function that looks like this:
- * function(array of Resource resources) {...};
+ * Retrieves the list of resources from the inspected page.
+ * @param callback A function that receives the list of resources when the request completes.
+ * The callback parameter should be a function that looks like this:
+ * function(array of Resource resources) {...};
*/
export function getResources(callback: (resources: Resource[]) => void): void;
@@ -1784,47 +1677,33 @@ declare module chrome.devtools.inspectedWindow {
// Dev Tools - Network
////////////////////
/**
- * Use the chrome.devtools.network API to retrieve the information about network requests displayed by the Developer Tools in the Network panel.
- * Availability: Since Chrome 18.
+ * Use the chrome.devtools.network API to retrieve the information about network requests displayed by the Developer Tools in the Network panel.
+ * Availability: Since Chrome 18.
*/
-declare module chrome.devtools.network {
+declare namespace chrome.devtools.network {
/** Represents a network request for a document resource (script, image and so on). See HAR Specification for reference. */
interface Request {
- /**
+ /**
* Returns content of the response body.
* @param callback A function that receives the response body when the request completes.
- * The callback parameter should be a function that looks like this:
- * function(string content, string encoding) {...};
- * Parameter content: Content of the response body (potentially encoded).
- * Parameter encoding: Empty if content is not encoded, encoding name otherwise. Currently, only base64 is supported.
+ * The callback parameter should be a function that looks like this:
+ * function(string content, string encoding) {...};
+ * Parameter content: Content of the response body (potentially encoded).
+ * Parameter encoding: Empty if content is not encoded, encoding name otherwise. Currently, only base64 is supported.
*/
getContent(callback: (content: string, encoding: string) => void): void;
}
- interface RequestFinishedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function( Request request) {...};
- * Parameter request: Description of a network request in the form of a HAR entry. See HAR specification for details.
- */
- addListener(callback: (request: Request) => void): void;
- }
+ interface RequestFinishedEvent extends chrome.events.Event<(request: Request) => void> {}
- interface NavigatedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(string url) {...};
- * Parameter url: URL of the new page.
- */
- addListener(callback: (url: string) => void): void;
- }
+ interface NavigatedEvent extends chrome.events.Event<(url: string) => void> {}
/**
- * Returns HAR log that contains all known network requests.
- * @param callback A function that receives the HAR log when the request completes.
- * The callback parameter should be a function that looks like this:
- * function(object harLog) {...};
- * Parameter harLog: A HAR log. See HAR specification for details.
+ * Returns HAR log that contains all known network requests.
+ * @param callback A function that receives the HAR log when the request completes.
+ * The callback parameter should be a function that looks like this:
+ * function(object harLog) {...};
+ * Parameter harLog: A HAR log. See HAR specification for details.
*/
export function getHAR(callback: (harLog: Object) => void): void;
@@ -1838,44 +1717,23 @@ declare module chrome.devtools.network {
// Dev Tools - Panels
////////////////////
/**
- * Use the chrome.devtools.panels API to integrate your extension into Developer Tools window UI: create your own panels, access existing panels, and add sidebars.
- * Availability: Since Chrome 18.
+ * Use the chrome.devtools.panels API to integrate your extension into Developer Tools window UI: create your own panels, access existing panels, and add sidebars.
+ * Availability: Since Chrome 18.
*/
-declare module chrome.devtools.panels {
- interface PanelShownEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(global window) {...};
- * Parameter window: The JavaScript window object of panel's page.
- */
- addListener(callback: (window: chrome.windows.Window) => void): void;
- }
+declare namespace chrome.devtools.panels {
+ interface PanelShownEvent extends chrome.events.Event<(window: chrome.windows.Window) => void> {}
- interface PanelHiddenEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function() {...};
- */
- addListener(callback: () => void): void;
- }
+ interface PanelHiddenEvent extends chrome.events.Event<() => void> {}
- interface PanelSearchEvent extends chrome.events.Event {
- /**
- * The callback parameter should be a function that looks like this:
- * function(string action, string queryString) {...};
- * Parameter action: Type of search action being performed.
- * Optional parameter queryString: Query string (only for 'performSearch').
- */
- addListener(callback: (action: string, queryString?: string) => void): void;
- }
+ interface PanelSearchEvent extends chrome.events.Event<(action: string, queryString?: string) => void> {}
/** Represents a panel created by extension. */
interface ExtensionPanel {
/**
- * Appends a button to the status bar of the panel.
- * @param iconPath Path to the icon of the button. The file should contain a 64x24-pixel image composed of two 32x24 icons. The left icon is used when the button is inactive; the right icon is displayed when the button is pressed.
- * @param tooltipText Text shown as a tooltip when user hovers the mouse over the button.
- * @param disabled Whether the button is disabled.
+ * Appends a button to the status bar of the panel.
+ * @param iconPath Path to the icon of the button. The file should contain a 64x24-pixel image composed of two 32x24 icons. The left icon is used when the button is inactive; the right icon is displayed when the button is pressed.
+ * @param tooltipText Text shown as a tooltip when user hovers the mouse over the button.
+ * @param disabled Whether the button is disabled.
*/
createStatusBarButton(iconPath: string, tooltipText: string, disabled: boolean): Button;
/** Fired when the user switches to the panel. */
@@ -1886,44 +1744,32 @@ declare module chrome.devtools.panels {
onSearch: PanelSearchEvent;
}
- interface ButtonClickedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function() {...};
- */
- addListener(callback: () => void): void;
- }
+ interface ButtonClickedEvent extends chrome.events.Event<() => void> {}
/** A button created by the extension. */
interface Button {
/**
- * Updates the attributes of the button. If some of the arguments are omitted or null, the corresponding attributes are not updated.
- * @param iconPath Path to the new icon of the button.
- * @param tooltipText Text shown as a tooltip when user hovers the mouse over the button.
- * @param disabled Whether the button is disabled.
+ * Updates the attributes of the button. If some of the arguments are omitted or null, the corresponding attributes are not updated.
+ * @param iconPath Path to the new icon of the button.
+ * @param tooltipText Text shown as a tooltip when user hovers the mouse over the button.
+ * @param disabled Whether the button is disabled.
*/
update(iconPath?: string, tooltipText?: string, disabled?: boolean): void;
/** Fired when the button is clicked. */
onClicked: ButtonClickedEvent;
}
- interface SelectionChangedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function() {...};
- */
- addListener(callback: () => void): void;
- }
+ interface SelectionChangedEvent extends chrome.events.Event<() => void> {}
/** Represents the Elements panel. */
interface ElementsPanel {
/**
- * Creates a pane within panel's sidebar.
- * @param title Text that is displayed in sidebar caption.
- * @param callback A callback invoked when the sidebar is created.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function( ExtensionSidebarPane result) {...};
- * Parameter result: An ExtensionSidebarPane object for created sidebar pane.
+ * Creates a pane within panel's sidebar.
+ * @param title Text that is displayed in sidebar caption.
+ * @param callback A callback invoked when the sidebar is created.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function( ExtensionSidebarPane result) {...};
+ * Parameter result: An ExtensionSidebarPane object for created sidebar pane.
*/
createSidebarPane(title: string, callback?: (result: ExtensionSidebarPane) => void): void;
/** Fired when an object is selected in the panel. */
@@ -1931,84 +1777,71 @@ declare module chrome.devtools.panels {
}
/**
- * Since Chrome 41.
+ * Since Chrome 41.
* Represents the Sources panel.
*/
interface SourcesPanel {
/**
- * Creates a pane within panel's sidebar.
- * @param title Text that is displayed in sidebar caption.
- * @param callback A callback invoked when the sidebar is created.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function( ExtensionSidebarPane result) {...};
- * Parameter result: An ExtensionSidebarPane object for created sidebar pane.
+ * Creates a pane within panel's sidebar.
+ * @param title Text that is displayed in sidebar caption.
+ * @param callback A callback invoked when the sidebar is created.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function( ExtensionSidebarPane result) {...};
+ * Parameter result: An ExtensionSidebarPane object for created sidebar pane.
*/
createSidebarPane(title: string, callback?: (result: ExtensionSidebarPane) => void): void;
/** Fired when an object is selected in the panel. */
onSelectionChanged: SelectionChangedEvent;
}
- interface ExtensionSidebarPaneShownEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(global window) {...};
- * Parameter window: The JavaScript window object of the sidebar page, if one was set with the setPage() method.
- */
- addListener(callback: (window: chrome.windows.Window) => void): void;
- }
+ interface ExtensionSidebarPaneShownEvent extends chrome.events.Event<(window: chrome.windows.Window) => void> {}
- interface ExtensionSidebarPaneHiddenEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function() {...};
- */
- addListener(callback: () => void): void;
- }
+ interface ExtensionSidebarPaneHiddenEvent extends chrome.events.Event<() => void> {}
/** A sidebar created by the extension. */
interface ExtensionSidebarPane {
/**
- * Sets the height of the sidebar.
- * @param height A CSS-like size specification, such as '100px' or '12ex'.
+ * Sets the height of the sidebar.
+ * @param height A CSS-like size specification, such as '100px' or '12ex'.
*/
setHeight(height: string): void;
/**
- * Sets an expression that is evaluated within the inspected page. The result is displayed in the sidebar pane.
- * @param expression An expression to be evaluated in context of the inspected page. JavaScript objects and DOM nodes are displayed in an expandable tree similar to the console/watch.
+ * Sets an expression that is evaluated within the inspected page. The result is displayed in the sidebar pane.
+ * @param expression An expression to be evaluated in context of the inspected page. JavaScript objects and DOM nodes are displayed in an expandable tree similar to the console/watch.
* @param rootTitle An optional title for the root of the expression tree.
- * @param callback A callback invoked after the sidebar pane is updated with the expression evaluation results.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * @param callback A callback invoked after the sidebar pane is updated with the expression evaluation results.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
setExpression(expression: string, rootTitle?: string, callback?: () => void): void;
/**
- * Sets an expression that is evaluated within the inspected page. The result is displayed in the sidebar pane.
- * @param expression An expression to be evaluated in context of the inspected page. JavaScript objects and DOM nodes are displayed in an expandable tree similar to the console/watch.
- * @param callback A callback invoked after the sidebar pane is updated with the expression evaluation results.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Sets an expression that is evaluated within the inspected page. The result is displayed in the sidebar pane.
+ * @param expression An expression to be evaluated in context of the inspected page. JavaScript objects and DOM nodes are displayed in an expandable tree similar to the console/watch.
+ * @param callback A callback invoked after the sidebar pane is updated with the expression evaluation results.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
setExpression(expression: string, callback?: () => void): void;
/**
- * Sets a JSON-compliant object to be displayed in the sidebar pane.
- * @param jsonObject An object to be displayed in context of the inspected page. Evaluated in the context of the caller (API client).
- * @param rootTitle An optional title for the root of the expression tree.
- * @param callback A callback invoked after the sidebar is updated with the object.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Sets a JSON-compliant object to be displayed in the sidebar pane.
+ * @param jsonObject An object to be displayed in context of the inspected page. Evaluated in the context of the caller (API client).
+ * @param rootTitle An optional title for the root of the expression tree.
+ * @param callback A callback invoked after the sidebar is updated with the object.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
setObject(jsonObject: string, rootTitle?: string, callback?: () => void): void;
/**
- * Sets a JSON-compliant object to be displayed in the sidebar pane.
- * @param jsonObject An object to be displayed in context of the inspected page. Evaluated in the context of the caller (API client).
- * @param callback A callback invoked after the sidebar is updated with the object.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Sets a JSON-compliant object to be displayed in the sidebar pane.
+ * @param jsonObject An object to be displayed in context of the inspected page. Evaluated in the context of the caller (API client).
+ * @param callback A callback invoked after the sidebar is updated with the object.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
setObject(jsonObject: string, callback?: () => void): void;
/**
- * Sets an HTML page to be displayed in the sidebar pane.
- * @param path Relative path of an extension page to display within the sidebar.
+ * Sets an HTML page to be displayed in the sidebar pane.
+ * @param path Relative path of an extension page to display within the sidebar.
*/
setPage(path: string): void;
/** Fired when the sidebar pane becomes visible as a result of user switching to the panel that hosts it. */
@@ -2020,38 +1853,38 @@ declare module chrome.devtools.panels {
/** Elements panel. */
var elements: ElementsPanel;
/**
- * Since Chrome 38.
- * Sources panel.
+ * Since Chrome 38.
+ * Sources panel.
*/
var sources: SourcesPanel;
/**
- * Creates an extension panel.
- * @param title Title that is displayed next to the extension icon in the Developer Tools toolbar.
- * @param iconPath Path of the panel's icon relative to the extension directory.
- * @param pagePath Path of the panel's HTML page relative to the extension directory.
- * @param callback A function that is called when the panel is created.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function( ExtensionPanel panel) {...};
- * Parameter panel: An ExtensionPanel object representing the created panel.
+ * Creates an extension panel.
+ * @param title Title that is displayed next to the extension icon in the Developer Tools toolbar.
+ * @param iconPath Path of the panel's icon relative to the extension directory.
+ * @param pagePath Path of the panel's HTML page relative to the extension directory.
+ * @param callback A function that is called when the panel is created.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function( ExtensionPanel panel) {...};
+ * Parameter panel: An ExtensionPanel object representing the created panel.
*/
export function create(title: string, iconPath: string, pagePath: string, callback?: (panel: ExtensionPanel) => void): void;
/**
- * Specifies the function to be called when the user clicks a resource link in the Developer Tools window. To unset the handler, either call the method with no parameters or pass null as the parameter.
- * @param callback A function that is called when the user clicks on a valid resource link in Developer Tools window. Note that if the user clicks an invalid URL or an XHR, this function is not called.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function( devtools.inspectedWindow.Resource resource) {...};
- * Parameter resource: A devtools.inspectedWindow.Resource object for the resource that was clicked.
+ * Specifies the function to be called when the user clicks a resource link in the Developer Tools window. To unset the handler, either call the method with no parameters or pass null as the parameter.
+ * @param callback A function that is called when the user clicks on a valid resource link in Developer Tools window. Note that if the user clicks an invalid URL or an XHR, this function is not called.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function( devtools.inspectedWindow.Resource resource) {...};
+ * Parameter resource: A devtools.inspectedWindow.Resource object for the resource that was clicked.
*/
export function setOpenResourceHandler(callback?: (resource: chrome.devtools.inspectedWindow.Resource) => void): void;
/**
- * Since Chrome 38.
- * Requests DevTools to open a URL in a Developer Tools panel.
- * @param url The URL of the resource to open.
- * @param lineNumber Specifies the line number to scroll to when the resource is loaded.
- * @param callback A function that is called when the resource has been successfully loaded.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Since Chrome 38.
+ * Requests DevTools to open a URL in a Developer Tools panel.
+ * @param url The URL of the resource to open.
+ * @param lineNumber Specifies the line number to scroll to when the resource is loaded.
+ * @param callback A function that is called when the resource has been successfully loaded.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function openResource(url: string, lineNumber: number, callback: () => void): void;
}
@@ -2060,12 +1893,12 @@ declare module chrome.devtools.panels {
// Document Scan
////////////////////
/**
- * Use the chrome.documentScan API to discover and retrieve images from attached paper document scanners.
- * Availability: Since Chrome 44.
- * Permissions: "documentScan"
- * Important: This API works only on Chrome OS.
+ * Use the chrome.documentScan API to discover and retrieve images from attached paper document scanners.
+ * Availability: Since Chrome 44.
+ * Permissions: "documentScan"
+ * Important: This API works only on Chrome OS.
*/
-declare module chrome.documentScan {
+declare namespace chrome.documentScan {
interface DocumentScanOptions {
/** Optional. The MIME types that are accepted by the caller. */
mimeTypes?: string[];
@@ -2079,13 +1912,13 @@ declare module chrome.documentScan {
/** The MIME type of dataUrls. */
mimeType: string;
}
-
+
/**
- * Performs a document scan. On success, the PNG data will be sent to the callback.
- * @param options Object containing scan parameters.
- * @param callback Called with the result and data from the scan.
- * The callback parameter should be a function that looks like this:
- * function(object result) {...};
+ * Performs a document scan. On success, the PNG data will be sent to the callback.
+ * @param options Object containing scan parameters.
+ * @param callback Called with the result and data from the scan.
+ * The callback parameter should be a function that looks like this:
+ * function(object result) {...};
*/
export function scan(options: DocumentScanOptions, callback: (result: DocumentScanCallbackArg) => void): void;
}
@@ -2095,10 +1928,10 @@ declare module chrome.documentScan {
////////////////////
/**
* Use the chrome.downloads API to programmatically initiate, monitor, manipulate, and search for downloads.
- * Availability: Since Chrome 31.
- * Permissions: "downloads"
+ * Availability: Since Chrome 31.
+ * Permissions: "downloads"
*/
-declare module chrome.downloads {
+declare namespace chrome.downloads {
interface HeaderNameValuePair {
/** Name of the HTTP header. */
name: string;
@@ -2214,7 +2047,7 @@ declare module chrome.downloads {
}
interface GetFileIconOptions {
- /** Optional. * The size of the returned icon. The icon will be square with dimensions size * size pixels. The default and largest size for the icon is 32x32 pixels. The only supported sizes are 16 and 32. It is an error to specify any other size.
+ /** Optional. * The size of the returned icon. The icon will be square with dimensions size * size pixels. The default and largest size for the icon is 32x32 pixels. The only supported sizes are 16 and 32. It is an error to specify any other size.
*/
size?: number;
}
@@ -2279,102 +2112,76 @@ declare module chrome.downloads {
conflictAction?: string;
}
- interface DownloadChangedEvent extends chrome.events.Event {
- /**
- * When any of a DownloadItem's properties except bytesReceived and estimatedEndTime changes, this event fires with the downloadId and an object containing the properties that changed.
- * @param callback The callback parameter should be a function that looks like this:
- * function(object downloadDelta) {...};
- */
- addListener(callback: (downloadDelta: DownloadDelta) => void): void;
- }
+ interface DownloadChangedEvent extends chrome.events.Event<(downloadDelta: DownloadDelta) => void> {}
- interface DownloadCreatedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function( DownloadItem downloadItem) {...};
- */
- addListener(callback: (downloadItem: DownloadItem) => void): void;
- }
+ interface DownloadCreatedEvent extends chrome.events.Event<(downloadItem: DownloadItem) => void> {}
- interface DownloadErasedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(integer downloadId) {...};
- * Parameter downloadId: The id of the DownloadItem that was erased.
- */
- addListener(callback: (downloadId: number) => void): void;
- }
+ interface DownloadErasedEvent extends chrome.events.Event<(downloadId: number) => void> {}
- interface DownloadDeterminingFilenameEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function( DownloadItem downloadItem, function suggest) {...};
- */
- addListener(callback: (downloadItem: DownloadItem, suggest: (suggestion?: DownloadFilenameSuggestion) => void) => void): void;
- }
+ interface DownloadDeterminingFilenameEvent extends chrome.events.Event<(downloadItem: DownloadItem, suggest: (suggestion?: DownloadFilenameSuggestion) => void) => void> {}
/**
- * Find DownloadItem. Set query to the empty object to get all DownloadItem. To get a specific DownloadItem, set only the id field. To page through a large number of items, set orderBy: ['-startTime'], set limit to the number of items per page, and set startedAfter to the startTime of the last item from the last page.
- * @param callback The callback parameter should be a function that looks like this:
- * function(array of DownloadItem results) {...};
+ * Find DownloadItem. Set query to the empty object to get all DownloadItem. To get a specific DownloadItem, set only the id field. To page through a large number of items, set orderBy: ['-startTime'], set limit to the number of items per page, and set startedAfter to the startTime of the last item from the last page.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(array of DownloadItem results) {...};
*/
export function search(query: DownloadQuery, callback: (results: DownloadItem[]) => void): void;
/**
- * Pause the download. If the request was successful the download is in a paused state. Otherwise runtime.lastError contains an error message. The request will fail if the download is not active.
- * @param downloadId The id of the download to pause.
- * @param callback Called when the pause request is completed.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Pause the download. If the request was successful the download is in a paused state. Otherwise runtime.lastError contains an error message. The request will fail if the download is not active.
+ * @param downloadId The id of the download to pause.
+ * @param callback Called when the pause request is completed.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function pause(downloadId: number, callback?: () => void): void;
/**
- * Retrieve an icon for the specified download. For new downloads, file icons are available after the onCreated event has been received. The image returned by this function while a download is in progress may be different from the image returned after the download is complete. Icon retrieval is done by querying the underlying operating system or toolkit depending on the platform. The icon that is returned will therefore depend on a number of factors including state of the download, platform, registered file types and visual theme. If a file icon cannot be determined, runtime.lastError will contain an error message.
- * @param downloadId The identifier for the download.
- * @param callback A URL to an image that represents the download.
- * The callback parameter should be a function that looks like this:
- * function(string iconURL) {...};
+ * Retrieve an icon for the specified download. For new downloads, file icons are available after the onCreated event has been received. The image returned by this function while a download is in progress may be different from the image returned after the download is complete. Icon retrieval is done by querying the underlying operating system or toolkit depending on the platform. The icon that is returned will therefore depend on a number of factors including state of the download, platform, registered file types and visual theme. If a file icon cannot be determined, runtime.lastError will contain an error message.
+ * @param downloadId The identifier for the download.
+ * @param callback A URL to an image that represents the download.
+ * The callback parameter should be a function that looks like this:
+ * function(string iconURL) {...};
*/
export function getFileIcon(downloadId: number, callback: (iconURL: string) => void): void;
/**
- * Retrieve an icon for the specified download. For new downloads, file icons are available after the onCreated event has been received. The image returned by this function while a download is in progress may be different from the image returned after the download is complete. Icon retrieval is done by querying the underlying operating system or toolkit depending on the platform. The icon that is returned will therefore depend on a number of factors including state of the download, platform, registered file types and visual theme. If a file icon cannot be determined, runtime.lastError will contain an error message.
- * @param downloadId The identifier for the download.
- * @param callback A URL to an image that represents the download.
- * The callback parameter should be a function that looks like this:
- * function(string iconURL) {...};
+ * Retrieve an icon for the specified download. For new downloads, file icons are available after the onCreated event has been received. The image returned by this function while a download is in progress may be different from the image returned after the download is complete. Icon retrieval is done by querying the underlying operating system or toolkit depending on the platform. The icon that is returned will therefore depend on a number of factors including state of the download, platform, registered file types and visual theme. If a file icon cannot be determined, runtime.lastError will contain an error message.
+ * @param downloadId The identifier for the download.
+ * @param callback A URL to an image that represents the download.
+ * The callback parameter should be a function that looks like this:
+ * function(string iconURL) {...};
*/
export function getFileIcon(downloadId: number, options: GetFileIconOptions, callback: (iconURL: string) => void): void;
/**
- * Resume a paused download. If the request was successful the download is in progress and unpaused. Otherwise runtime.lastError contains an error message. The request will fail if the download is not active.
+ * Resume a paused download. If the request was successful the download is in progress and unpaused. Otherwise runtime.lastError contains an error message. The request will fail if the download is not active.
* @param downloadId The id of the download to resume.
- * @param callback Called when the resume request is completed.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * @param callback Called when the resume request is completed.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function resume(downloadId: number, callback?: () => void): void;
/**
- * Cancel a download. When callback is run, the download is cancelled, completed, interrupted or doesn't exist anymore.
- * @param downloadId The id of the download to cancel.
- * @param callback Called when the cancel request is completed.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Cancel a download. When callback is run, the download is cancelled, completed, interrupted or doesn't exist anymore.
+ * @param downloadId The id of the download to cancel.
+ * @param callback Called when the cancel request is completed.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function cancel(downloadId: number, callback?: () => void): void;
/**
- * Download a URL. If the URL uses the HTTP[S] protocol, then the request will include all cookies currently set for its hostname. If both filename and saveAs are specified, then the Save As dialog will be displayed, pre-populated with the specified filename. If the download started successfully, callback will be called with the new DownloadItem's downloadId. If there was an error starting the download, then callback will be called with downloadId=undefined and runtime.lastError will contain a descriptive string. The error strings are not guaranteed to remain backwards compatible between releases. Extensions must not parse it.
- * @param options What to download and how.
- * @param callback Called with the id of the new DownloadItem.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function(integer downloadId) {...};
+ * Download a URL. If the URL uses the HTTP[S] protocol, then the request will include all cookies currently set for its hostname. If both filename and saveAs are specified, then the Save As dialog will be displayed, pre-populated with the specified filename. If the download started successfully, callback will be called with the new DownloadItem's downloadId. If there was an error starting the download, then callback will be called with downloadId=undefined and runtime.lastError will contain a descriptive string. The error strings are not guaranteed to remain backwards compatible between releases. Extensions must not parse it.
+ * @param options What to download and how.
+ * @param callback Called with the id of the new DownloadItem.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function(integer downloadId) {...};
*/
export function download(options: DownloadOptions, callback?: (downloadId: number) => void): void;
/**
- * Open the downloaded file now if the DownloadItem is complete; otherwise returns an error through runtime.lastError. Requires the "downloads.open" permission in addition to the "downloads" permission. An onChanged event will fire when the item is opened for the first time.
- * @param downloadId The identifier for the downloaded file.
+ * Open the downloaded file now if the DownloadItem is complete; otherwise returns an error through runtime.lastError. Requires the "downloads.open" permission in addition to the "downloads" permission. An onChanged event will fire when the item is opened for the first time.
+ * @param downloadId The identifier for the downloaded file.
*/
export function open(downloadId: number): void;
/**
- * Show the downloaded file in its folder in a file manager.
- * @param downloadId The identifier for the downloaded file.
+ * Show the downloaded file in its folder in a file manager.
+ * @param downloadId The identifier for the downloaded file.
*/
export function show(downloadId: number): void;
/** Show the default Downloads folder in a file manager. */
@@ -2382,21 +2189,21 @@ declare module chrome.downloads {
/**
* Erase matching DownloadItem from history without deleting the downloaded file. An onErased event will fire for each DownloadItem that matches query, then callback will be called.
* @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function(array of integer erasedIds) {...};
+ * function(array of integer erasedIds) {...};
*/
export function erase(query: DownloadQuery, callback: (erasedIds: number[]) => void): void;
/**
- * Remove the downloaded file if it exists and the DownloadItem is complete; otherwise return an error through runtime.lastError.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Remove the downloaded file if it exists and the DownloadItem is complete; otherwise return an error through runtime.lastError.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function removeFile(downloadId: number, callback?: () => void): void;
/**
* Prompt the user to accept a dangerous download. Can only be called from a visible context (tab, window, or page/browser action popup). Does not automatically accept dangerous downloads. If the download is accepted, then an onChanged event will fire, otherwise nothing will happen. When all the data is fetched into a temporary file and either the download is not dangerous or the danger has been accepted, then the temporary file is renamed to the target filename, the |state| changes to 'complete', and onChanged fires.
* @param downloadId The identifier for the DownloadItem.
- * @param callback Called when the danger prompt dialog closes.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * @param callback Called when the danger prompt dialog closes.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function acceptDanger(downloadId: number, callback: () => void): void;
/** Initiate dragging the downloaded file to another application. Call in a javascript ondragstart handler. */
@@ -2418,60 +2225,60 @@ declare module chrome.downloads {
// Enterprise Platform Keys
////////////////////
/**
- * Use the chrome.enterprise.platformKeys API to generate hardware-backed keys and to install certificates for these keys. The certificates will be managed by the platform and can be used for TLS authentication, network access or by other extension through chrome.platformKeys.
- * Availability: Since Chrome 37.
- * Permissions: "enterprise.platformKeys"
- * Important: This API works only on Chrome OS.
- * Note: This API is only for extensions pre-installed by policy.
+ * Use the chrome.enterprise.platformKeys API to generate hardware-backed keys and to install certificates for these keys. The certificates will be managed by the platform and can be used for TLS authentication, network access or by other extension through chrome.platformKeys.
+ * Availability: Since Chrome 37.
+ * Permissions: "enterprise.platformKeys"
+ * Important: This API works only on Chrome OS.
+ * Note: This API is only for extensions pre-installed by policy.
*/
-declare module chrome.enterprise.platformKeys {
+declare namespace chrome.enterprise.platformKeys {
interface Token {
/**
- * Uniquely identifies this Token.
+ * Uniquely identifies this Token.
* Static IDs are "user" and "system", referring to the platform's user-specific and the system-wide hardware token, respectively. Any other tokens (with other identifiers) might be returned by enterprise.platformKeys.getTokens.
*/
id: string;
/**
- * Implements the WebCrypto's SubtleCrypto interface. The cryptographic operations, including key generation, are hardware-backed.
+ * Implements the WebCrypto's SubtleCrypto interface. The cryptographic operations, including key generation, are hardware-backed.
* Only non-extractable RSASSA-PKCS1-V1_5 keys with modulusLength up to 2048 can be generated. Each key can be used for signing data at most once.
* Keys generated on a specific Token cannot be used with any other Tokens, nor can they be used with window.crypto.subtle. Equally, Key objects created with window.crypto.subtle cannot be used with this interface.
*/
subtleCrypto: SubtleCrypto;
}
-
+
/**
- * Returns the available Tokens. In a regular user's session the list will always contain the user's token with id "user". If a system-wide TPM token is available, the returned list will also contain the system-wide token with id "system". The system-wide token will be the same for all sessions on this device (device in the sense of e.g. a Chromebook).
- * @param callback Invoked by getTokens with the list of available Tokens.
+ * Returns the available Tokens. In a regular user's session the list will always contain the user's token with id "user". If a system-wide TPM token is available, the returned list will also contain the system-wide token with id "system". The system-wide token will be the same for all sessions on this device (device in the sense of e.g. a Chromebook).
+ * @param callback Invoked by getTokens with the list of available Tokens.
* The callback parameter should be a function that looks like this:
* function(array of Token tokens) {...};
- * Parameter tokens: The list of available tokens.
+ * Parameter tokens: The list of available tokens.
*/
export function getToken(callback: (tokens: Token[]) => void): void;
/**
- * Returns the list of all client certificates available from the given token. Can be used to check for the existence and expiration of client certificates that are usable for a certain authentication.
- * @param tokenId The id of a Token returned by getTokens.
- * @param callback Called back with the list of the available certificates.
- * The callback parameter should be a function that looks like this:
- * function(array of ArrayBuffer certificates) {...};
- * Parameter certificates: The list of certificates, each in DER encoding of a X.509 certificate.
+ * Returns the list of all client certificates available from the given token. Can be used to check for the existence and expiration of client certificates that are usable for a certain authentication.
+ * @param tokenId The id of a Token returned by getTokens.
+ * @param callback Called back with the list of the available certificates.
+ * The callback parameter should be a function that looks like this:
+ * function(array of ArrayBuffer certificates) {...};
+ * Parameter certificates: The list of certificates, each in DER encoding of a X.509 certificate.
*/
export function getCertificates(tokenId: string, callback: (certificates: ArrayBuffer) => void): void;
/**
- * Imports certificate to the given token if the certified key is already stored in this token. After a successful certification request, this function should be used to store the obtained certificate and to make it available to the operating system and browser for authentication.
- * @param tokenId The id of a Token returned by getTokens.
- * @param certificate The DER encoding of a X.509 certificate.
- * @param callback Called back when this operation is finished.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Imports certificate to the given token if the certified key is already stored in this token. After a successful certification request, this function should be used to store the obtained certificate and to make it available to the operating system and browser for authentication.
+ * @param tokenId The id of a Token returned by getTokens.
+ * @param certificate The DER encoding of a X.509 certificate.
+ * @param callback Called back when this operation is finished.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function importCertificate(tokenId: string, certificate: ArrayBuffer, callback?: () => void): void;
/**
- * Removes certificate from the given token if present. Should be used to remove obsolete certificates so that they are not considered during authentication and do not clutter the certificate choice. Should be used to free storage in the certificate store.
- * @param tokenId The id of a Token returned by getTokens.
- * @param certificate The DER encoding of a X.509 certificate.
- * @param callback Called back when this operation is finished.
+ * Removes certificate from the given token if present. Should be used to remove obsolete certificates so that they are not considered during authentication and do not clutter the certificate choice. Should be used to free storage in the certificate store.
+ * @param tokenId The id of a Token returned by getTokens.
+ * @param certificate The DER encoding of a X.509 certificate.
+ * @param callback Called back when this operation is finished.
* If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * function() {...};
*/
export function removeCertificate(tokenId: string, certificate: ArrayBuffer, callback?: () => void): void;
}
@@ -2480,18 +2287,18 @@ declare module chrome.enterprise.platformKeys {
// Events
////////////////////
/**
- * The chrome.events namespace contains common types used by APIs dispatching events to notify you when something interesting happens.
- * Availability: Since Chrome 21.
+ * The chrome.events namespace contains common types used by APIs dispatching events to notify you when something interesting happens.
+ * Availability: Since Chrome 21.
*/
-declare module chrome.events {
+declare namespace chrome.events {
/** Filters URLs for various criteria. See event filtering. All criteria are case sensitive. */
interface UrlFilter {
/** Optional. Matches if the scheme of the URL is equal to any of the schemes specified in the array. */
schemes?: string[];
/**
* Optional.
- * Since Chrome 23.
- * Matches if the URL (without fragment identifier) matches a specified regular expression. Port numbers are stripped from the URL if they match the default port number. The regular expressions use the RE2 syntax.
+ * Since Chrome 23.
+ * Matches if the URL (without fragment identifier) matches a specified regular expression. Port numbers are stripped from the URL if they match the default port number. The regular expressions use the RE2 syntax.
*/
urlMatches?: string;
/** Optional. Matches if the path segment of the URL contains a specified string. */
@@ -2530,73 +2337,73 @@ declare module chrome.events {
ports?: any[];
/**
* Optional.
- * Since Chrome 28.
- * Matches if the URL without query segment and fragment identifier matches a specified regular expression. Port numbers are stripped from the URL if they match the default port number. The regular expressions use the RE2 syntax.
+ * Since Chrome 28.
+ * Matches if the URL without query segment and fragment identifier matches a specified regular expression. Port numbers are stripped from the URL if they match the default port number. The regular expressions use the RE2 syntax.
*/
originAndPathMatches?: string;
}
/** An object which allows the addition and removal of listeners for a Chrome event. */
- interface Event {
+ interface Event<T extends Function> {
/**
- * Registers an event listener callback to an event.
- * @param callback Called when an event occurs. The parameters of this function depend on the type of event.
+ * Registers an event listener callback to an event.
+ * @param callback Called when an event occurs. The parameters of this function depend on the type of event.
* The callback parameter should be a function that looks like this:
- * function() {...};
+ * function() {...};
*/
- addListener(callback: Function): void;
+ addListener(callback: T): void;
/**
- * Returns currently registered rules.
- * @param callback Called with registered rules.
+ * Returns currently registered rules.
+ * @param callback Called with registered rules.
* The callback parameter should be a function that looks like this:
* function(array of Rule rules) {...};
- * Parameter rules: Rules that were registered, the optional parameters are filled with values.
+ * Parameter rules: Rules that were registered, the optional parameters are filled with values.
*/
getRules(callback: (rules: Rule[]) => void): void;
/**
- * Returns currently registered rules.
- * @param ruleIdentifiers If an array is passed, only rules with identifiers contained in this array are returned.
- * @param callback Called with registered rules.
+ * Returns currently registered rules.
+ * @param ruleIdentifiers If an array is passed, only rules with identifiers contained in this array are returned.
+ * @param callback Called with registered rules.
* The callback parameter should be a function that looks like this:
* function(array of Rule rules) {...};
- * Parameter rules: Rules that were registered, the optional parameters are filled with values.
+ * Parameter rules: Rules that were registered, the optional parameters are filled with values.
*/
getRules(ruleIdentifiers: string[], callback: (rules: Rule[]) => void): void;
/**
- * @param callback Listener whose registration status shall be tested.
+ * @param callback Listener whose registration status shall be tested.
*/
- hasListener(callback: Function): boolean;
+ hasListener(callback: T): boolean;
/**
- * Unregisters currently registered rules.
- * @param ruleIdentifiers If an array is passed, only rules with identifiers contained in this array are unregistered.
- * @param callback Called when rules were unregistered.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Unregisters currently registered rules.
+ * @param ruleIdentifiers If an array is passed, only rules with identifiers contained in this array are unregistered.
+ * @param callback Called when rules were unregistered.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
removeRules(ruleIdentifiers?: string[], callback?: () => void): void;
/**
- * Unregisters currently registered rules.
- * @param callback Called when rules were unregistered.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Unregisters currently registered rules.
+ * @param callback Called when rules were unregistered.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
removeRules(callback?: () => void): void;
/**
- * Registers rules to handle events.
- * @param rules Rules to be registered. These do not replace previously registered rules.
- * @param callback Called with registered rules.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function(array of Rule rules) {...};
- * Parameter rules: Rules that were registered, the optional parameters are filled with values.
+ * Registers rules to handle events.
+ * @param rules Rules to be registered. These do not replace previously registered rules.
+ * @param callback Called with registered rules.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function(array of Rule rules) {...};
+ * Parameter rules: Rules that were registered, the optional parameters are filled with values.
*/
addRules(rules: Rule[], callback?: (rules: Rule[]) => void): void;
/**
- * Deregisters an event listener callback from an event.
- * @param callback Listener that shall be unregistered.
+ * Deregisters an event listener callback from an event.
+ * @param callback Listener that shall be unregistered.
* The callback parameter should be a function that looks like this:
- * function() {...};
+ * function() {...};
*/
- removeListener(callback: () => void): void;
+ removeListener(callback: T): void;
hasListeners(): boolean;
}
@@ -2612,8 +2419,8 @@ declare module chrome.events {
actions: any[];
/**
* Optional.
- * Since Chrome 28.
- * Tags can be used to annotate rules and perform operations on sets of rules.
+ * Since Chrome 28.
+ * Tags can be used to annotate rules and perform operations on sets of rules.
*/
tags?: string[];
}
@@ -2623,10 +2430,10 @@ declare module chrome.events {
// Extension
////////////////////
/**
- * The chrome.extension API has utilities that can be used by any extension page. It includes support for exchanging messages between an extension and its content scripts or between extensions, as described in detail in Message Passing.
- * Availability: Since Chrome 5.
+ * The chrome.extension API has utilities that can be used by any extension page. It includes support for exchanging messages between an extension and its content scripts or between extensions, as described in detail in Message Passing.
+ * Availability: Since Chrome 5.
*/
-declare module chrome.extension {
+declare namespace chrome.extension {
interface FetchProperties {
/** Optional. The window to restrict the search to. If omitted, returns all views. */
windowId?: number;
@@ -2639,25 +2446,11 @@ declare module chrome.extension {
message: string;
}
- interface OnRequestEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(any request, runtime.MessageSender sender, function sendResponse) {...};
- * Parameter request: The request sent by the calling script.
- * Parameter sendResponse: Function to call (at most once) when you have a response. The argument should be any JSON-ifiable object, or undefined if there is no response. If you have more than one onRequest listener in the same document, then only one may send a response.
- */
- addListener(callback: (request: any, sender: runtime.MessageSender, sendResponse: () => void) => void): void;
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(runtime.MessageSender sender, function sendResponse) {...};
- * Parameter sendResponse: Function to call (at most once) when you have a response. The argument should be any JSON-ifiable object, or undefined if there is no response. If you have more than one onRequest listener in the same document, then only one may send a response.
- */
- addListener(callback: (sender: runtime.MessageSender, sendResponse: () => void) => void): void;
- }
+ interface OnRequestEvent extends chrome.events.Event<((request: any, sender: runtime.MessageSender, sendResponse: (response: any) => void) => void) | ((sender: runtime.MessageSender, sendResponse: (response: any) => void) => void)> {}
/**
- * Since Chrome 7.
- * True for content scripts running inside incognito tabs, and for extension pages running inside an incognito process. The latter only applies to extensions with 'split' incognito_behavior.
+ * Since Chrome 7.
+ * True for content scripts running inside incognito tabs, and for extension pages running inside an incognito process. The latter only applies to extensions with 'split' incognito_behavior.
*/
var inIncognitoContext: boolean;
/** Set for the lifetime of a callback if an ansychronous extension api has resulted in an error. If no error has occured lastError will be undefined. */
@@ -2665,65 +2458,65 @@ declare module chrome.extension {
/** Returns the JavaScript 'window' object for the background page running inside the current extension. Returns null if the extension has no background page. */
export function getBackgroundPage(): Window;
- /**
+ /**
* Converts a relative path within an extension install directory to a fully-qualified URL.
- * @param path A path to a resource within an extension expressed relative to its install directory.
+ * @param path A path to a resource within an extension expressed relative to its install directory.
*/
export function getURL(path: string): string;
/**
- * Sets the value of the ap CGI parameter used in the extension's update URL. This value is ignored for extensions that are hosted in the Chrome Extension Gallery.
- * Since Chrome 9.
+ * Sets the value of the ap CGI parameter used in the extension's update URL. This value is ignored for extensions that are hosted in the Chrome Extension Gallery.
+ * Since Chrome 9.
*/
export function setUpdateUrlData(data: string): void;
/** Returns an array of the JavaScript 'window' objects for each of the pages running inside the current extension. */
export function getViews(fetchProperties?: FetchProperties): Window[];
/**
- * Retrieves the state of the extension's access to the 'file://' scheme (as determined by the user-controlled 'Allow access to File URLs' checkbox.
- * Since Chrome 12.
- * @param callback The callback parameter should be a function that looks like this:
+ * Retrieves the state of the extension's access to the 'file://' scheme (as determined by the user-controlled 'Allow access to File URLs' checkbox.
+ * Since Chrome 12.
+ * @param callback The callback parameter should be a function that looks like this:
* function(boolean isAllowedAccess) {...};
- * Parameter isAllowedAccess: True if the extension can access the 'file://' scheme, false otherwise.
+ * Parameter isAllowedAccess: True if the extension can access the 'file://' scheme, false otherwise.
*/
export function isAllowedFileSchemeAccess(callback: (isAllowedAccess: boolean) => void): void;
/**
- * Retrieves the state of the extension's access to Incognito-mode (as determined by the user-controlled 'Allowed in Incognito' checkbox.
- * Since Chrome 12.
- * @param callback The callback parameter should be a function that looks like this:
+ * Retrieves the state of the extension's access to Incognito-mode (as determined by the user-controlled 'Allowed in Incognito' checkbox.
+ * Since Chrome 12.
+ * @param callback The callback parameter should be a function that looks like this:
* function(boolean isAllowedAccess) {...};
- * Parameter isAllowedAccess: True if the extension has access to Incognito mode, false otherwise.
+ * Parameter isAllowedAccess: True if the extension has access to Incognito mode, false otherwise.
*/
export function isAllowedIncognitoAccess(callback: (isAllowedAccess: boolean) => void): void;
/**
- * Sends a single request to other listeners within the extension. Similar to runtime.connect, but only sends a single request with an optional response. The extension.onRequest event is fired in each page of the extension.
+ * Sends a single request to other listeners within the extension. Similar to runtime.connect, but only sends a single request with an optional response. The extension.onRequest event is fired in each page of the extension.
* @deprecated Deprecated since Chrome 33. Please use runtime.sendMessage.
- * @param extensionId The extension ID of the extension you want to connect to. If omitted, default is your own extension.
- * @param responseCallback If you specify the responseCallback parameter, it should be a function that looks like this:
+ * @param extensionId The extension ID of the extension you want to connect to. If omitted, default is your own extension.
+ * @param responseCallback If you specify the responseCallback parameter, it should be a function that looks like this:
* function(any response) {...};
- * Parameter response: The JSON response object sent by the handler of the request. If an error occurs while connecting to the extension, the callback will be called with no arguments and runtime.lastError will be set to the error message.
+ * Parameter response: The JSON response object sent by the handler of the request. If an error occurs while connecting to the extension, the callback will be called with no arguments and runtime.lastError will be set to the error message.
*/
export function sendRequest(extensionId: string, request: any, responseCallback?: (response: any) => void): void;
/**
- * Sends a single request to other listeners within the extension. Similar to runtime.connect, but only sends a single request with an optional response. The extension.onRequest event is fired in each page of the extension.
+ * Sends a single request to other listeners within the extension. Similar to runtime.connect, but only sends a single request with an optional response. The extension.onRequest event is fired in each page of the extension.
* @deprecated Deprecated since Chrome 33. Please use runtime.sendMessage.
- * @param responseCallback If you specify the responseCallback parameter, it should be a function that looks like this:
+ * @param responseCallback If you specify the responseCallback parameter, it should be a function that looks like this:
* function(any response) {...};
- * Parameter response: The JSON response object sent by the handler of the request. If an error occurs while connecting to the extension, the callback will be called with no arguments and runtime.lastError will be set to the error message.
+ * Parameter response: The JSON response object sent by the handler of the request. If an error occurs while connecting to the extension, the callback will be called with no arguments and runtime.lastError will be set to the error message.
*/
export function sendRequest(request: any, responseCallback?: (response: any) => void): void;
/**
- * Returns an array of the JavaScript 'window' objects for each of the tabs running inside the current extension. If windowId is specified, returns only the 'window' objects of tabs attached to the specified window.
- * @deprecated Deprecated since Chrome 33. Please use extension.getViews {type: "tab"}.
+ * Returns an array of the JavaScript 'window' objects for each of the tabs running inside the current extension. If windowId is specified, returns only the 'window' objects of tabs attached to the specified window.
+ * @deprecated Deprecated since Chrome 33. Please use extension.getViews {type: "tab"}.
*/
export function getExtensionTabs(windowId?: number): Window[];
-
+
/**
- * Fired when a request is sent from either an extension process or a content script.
- * @deprecated Deprecated since Chrome 33. Please use runtime.onMessage.
+ * Fired when a request is sent from either an extension process or a content script.
+ * @deprecated Deprecated since Chrome 33. Please use runtime.onMessage.
*/
var onRequest: OnRequestEvent;
/**
- * Fired when a request is sent from another extension.
- * @deprecated Deprecated since Chrome 33. Please use runtime.onMessageExternal.
+ * Fired when a request is sent from another extension.
+ * @deprecated Deprecated since Chrome 33. Please use runtime.onMessageExternal.
*/
var onRequestExternal: OnRequestEvent;
}
@@ -2732,17 +2525,17 @@ declare module chrome.extension {
// File Browser Handler
////////////////////
/**
- * Use the chrome.fileBrowserHandler API to extend the Chrome OS file browser. For example, you can use this API to enable users to upload files to your website.
- * Availability: Since Chrome 12.
- * Permissions: "fileBrowserHandler"
- * Important: This API works only on Chrome OS.
+ * Use the chrome.fileBrowserHandler API to extend the Chrome OS file browser. For example, you can use this API to enable users to upload files to your website.
+ * Availability: Since Chrome 12.
+ * Permissions: "fileBrowserHandler"
+ * Important: This API works only on Chrome OS.
*/
-declare module chrome.fileBrowserHandler {
+declare namespace chrome.fileBrowserHandler {
interface SelectionParams {
/**
* Optional.
- * List of file extensions that the selected file can have. The list is also used to specify what files to be shown in the select file dialog. Files with the listed extensions are only shown in the dialog. Extensions should not include the leading '.'. Example: ['jpg', 'png']
- * Since Chrome 23.
+ * List of file extensions that the selected file can have. The list is also used to specify what files to be shown in the select file dialog. Files with the listed extensions are only shown in the dialog. Extensions should not include the leading '.'. Example: ['jpg', 'png']
+ * Since Chrome 23.
*/
allowedFileExtensions?: string[];
/** Suggested name for the file. */
@@ -2764,27 +2557,19 @@ declare module chrome.fileBrowserHandler {
entries: any[];
}
- interface FileBrowserHandlerExecuteEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(string id, FileHandlerExecuteEventDetails details) {...};
- * Parameter id: File browser action id as specified in the listener component's manifest.
- * Parameter details: File handler execute event details.
- */
- addListener(callback: (id: string, details: FileHandlerExecuteEventDetails) => void): void;
- }
+ interface FileBrowserHandlerExecuteEvent extends chrome.events.Event<(id: string, details: FileHandlerExecuteEventDetails) => void> {}
/**
- * Prompts user to select file path under which file should be saved. When the file is selected, file access permission required to use the file (read, write and create) are granted to the caller. The file will not actually get created during the function call, so function caller must ensure its existence before using it. The function has to be invoked with a user gesture.
- * Since Chrome 21.
- * @param selectionParams Parameters that will be used while selecting the file.
- * @param callback Function called upon completion.
- * The callback parameter should be a function that looks like this:
- * function(object result) {...};
- * Parameter result: Result of the method.
+ * Prompts user to select file path under which file should be saved. When the file is selected, file access permission required to use the file (read, write and create) are granted to the caller. The file will not actually get created during the function call, so function caller must ensure its existence before using it. The function has to be invoked with a user gesture.
+ * Since Chrome 21.
+ * @param selectionParams Parameters that will be used while selecting the file.
+ * @param callback Function called upon completion.
+ * The callback parameter should be a function that looks like this:
+ * function(object result) {...};
+ * Parameter result: Result of the method.
*/
export function selectFile(selectionParams: SelectionParams, callback: (result: SelectionResult) => void): void;
-
+
/** Fired when file system action is executed from ChromeOS file browser. */
var onExecute: FileBrowserHandlerExecuteEvent;
}
@@ -2793,12 +2578,12 @@ declare module chrome.fileBrowserHandler {
// File System Provider
////////////////////
/**
- * Use the chrome.fileSystemProvider API to create file systems, that can be accessible from the file manager on Chrome OS.
- * Availability: Since Chrome 40.
- * Permissions: "fileSystemProvider"
- * Important: This API works only on Chrome OS.
+ * Use the chrome.fileSystemProvider API to create file systems, that can be accessible from the file manager on Chrome OS.
+ * Availability: Since Chrome 40.
+ * Permissions: "fileSystemProvider"
+ * Important: This API works only on Chrome OS.
*/
-declare module chrome.fileSystemProvider {
+declare namespace chrome.fileSystemProvider {
interface OpenedFileInfo {
/** A request ID to be be used by consecutive read/write and close requests. */
openRequestId: number;
@@ -2839,29 +2624,29 @@ declare module chrome.fileSystemProvider {
displayName: string;
/** Whether the file system supports operations which may change contents of the file system (such as creating, deleting or writing to files). */
writable: boolean;
- /**
- * The maximum number of files that can be opened at once. If 0, then not limited.
+ /**
+ * The maximum number of files that can be opened at once. If 0, then not limited.
* @since Since Chrome 42.
*/
openedFilesLimit: number;
/**
- * List of currently opened files.
+ * List of currently opened files.
* @since Since Chrome 42.
*/
openedFiles: OpenedFileInfo[];
/**
* Optional.
- * Whether the file system supports the tag field for observing directories.
- * @since Since Chrome 45. Warning: this is the current Beta channel.
+ * Whether the file system supports the tag field for observing directories.
+ * @since Since Chrome 45. Warning: this is the current Beta channel.
*/
supportsNotifyTag?: boolean;
/**
- * List of watchers.
- * @since Since Chrome 45. Warning: this is the current Beta channel.
+ * List of watchers.
+ * @since Since Chrome 45. Warning: this is the current Beta channel.
*/
watchers: FileWatchersInfo[];
}
-
+
/** @since Since Chrome 45. Warning: this is the current Beta channel. */
interface GetActionsRequestedOptions {
/** The identifier of the file system related to this operation. */
@@ -2871,7 +2656,7 @@ declare module chrome.fileSystemProvider {
/** The path of the entry to return the list of actions for. */
entryPath: string;
}
-
+
/** @since Since Chrome 45. Warning: this is the current Beta channel. */
interface Action {
/** The identifier of the action. Any string or CommonActionId for common actions. */
@@ -2879,7 +2664,7 @@ declare module chrome.fileSystemProvider {
/** Optional. The title of the action. It may be ignored for common actions. */
title?: string;
}
-
+
/** @since Since Chrome 45. Warning: this is the current Beta channel. */
interface ExecuteActionRequestedOptions {
/** The identifier of the file system related to this operation. */
@@ -2901,13 +2686,13 @@ declare module chrome.fileSystemProvider {
writable?: boolean;
/**
* Optional.
- * The maximum number of files that can be opened at once. If not specified, or 0, then not limited.
+ * The maximum number of files that can be opened at once. If not specified, or 0, then not limited.
* @since Since Chrome 41.
*/
openedFilesLimit?: number;
/**
* Optional.
- * Whether the file system supports the tag field for observed directories.
+ * Whether the file system supports the tag field for observed directories.
* @since Since Chrome 45. Warning: this is the current Beta channel.
*/
supportsNotifyTag?: boolean;
@@ -3018,148 +2803,64 @@ declare module chrome.fileSystemProvider {
operationRequestId: number;
}
- interface RequestedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(object options, function successCallback, function errorCallback) {...};
- */
- addListener(callback: (options: RequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void): void;
- }
+ interface RequestedEvent extends chrome.events.Event<(options: RequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> {}
- interface MetadataRequestedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(object options, function successCallback, function errorCallback) {...};
- */
- addListener(callback: (options: MetadataRequestedEventOptions, successCallback: (metadata: EntryMetadata) => void, errorCallback: (error: string) => void) => void): void;
- }
+ interface MetadataRequestedEvent extends chrome.events.Event<(options: MetadataRequestedEventOptions, successCallback: (metadata: EntryMetadata) => void, errorCallback: (error: string) => void) => void> {}
- interface DirectoryPathRequestedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(object options, function successCallback, function errorCallback) {...};
- */
- addListener(callback: (options: DirectoryPathRequestedEventOptions, successCallback: (entries: EntryMetadata[], hasMore: boolean) => void, errorCallback: (error: string) => void) => void): void;
- }
+ interface DirectoryPathRequestedEvent extends chrome.events.Event<(options: DirectoryPathRequestedEventOptions, successCallback: (entries: EntryMetadata[], hasMore: boolean) => void, errorCallback: (error: string) => void) => void> {}
- interface OpenFileRequestedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(object options, function successCallback, function errorCallback) {...};
- */
- addListener(callback: (options: OpenFileRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void): void;
- }
+ interface OpenFileRequestedEvent extends chrome.events.Event<(options: OpenFileRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> {}
- interface OpenedFileRequestedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(object options, function successCallback, function errorCallback) {...};
- */
- addListener(callback: (options: OpenedFileRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void): void;
- }
+ interface OpenedFileRequestedEvent extends chrome.events.Event<(options: OpenedFileRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> {}
- interface OpenedFileOffsetRequestedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(object options, function successCallback, function errorCallback) {...};
- */
- addListener(callback: (options: OpenedFileOffsetRequestedEventOptions, successCallback: (data: ArrayBuffer, hasMore: boolean) => void, errorCallback: (error: string) => void) => void): void;
- }
+ interface OpenedFileOffsetRequestedEvent extends chrome.events.Event<(options: OpenedFileOffsetRequestedEventOptions, successCallback: (data: ArrayBuffer, hasMore: boolean) => void, errorCallback: (error: string) => void) => void> {}
- interface DirectoryPathRecursiveRequestedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(object options, function successCallback, function errorCallback) {...};
- */
- addListener(callback: (options: DirectoryPathRecursiveRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void): void;
- }
+ interface DirectoryPathRecursiveRequestedEvent extends chrome.events.Event<(options: DirectoryPathRecursiveRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> {}
- interface EntryPathRecursiveRequestedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(object options, function successCallback, function errorCallback) {...};
- */
- addListener(callback: (options: EntryPathRecursiveRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void): void;
- }
+ interface EntryPathRecursiveRequestedEvent extends chrome.events.Event<(options: EntryPathRecursiveRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> {}
- interface FilePathRequestedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(object options, function successCallback, function errorCallback) {...};
- */
- addListener(callback: (options: FilePathRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void): void;
- }
+ interface FilePathRequestedEvent extends chrome.events.Event<(options: FilePathRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> {}
- interface SourceTargetPathRequestedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(object options, function successCallback, function errorCallback) {...};
- */
- addListener(callback: (options: SourceTargetPathRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void): void;
- }
+ interface SourceTargetPathRequestedEvent extends chrome.events.Event<(options: SourceTargetPathRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> {}
- interface FilePathLengthRequestedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(object options, function successCallback, function errorCallback) {...};
- */
- addListener(callback: (options: FilePathLengthRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void): void;
- }
+ interface FilePathLengthRequestedEvent extends chrome.events.Event<(options: FilePathLengthRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> {}
- interface OpenedFileIoRequestedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(object options, function successCallback, function errorCallback) {...};
- */
- addListener(callback: (options: OpenedFileIoRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void): void;
- }
+ interface OpenedFileIoRequestedEvent extends chrome.events.Event<(options: OpenedFileIoRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> {}
- interface OperationRequestedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(object options, function successCallback, function errorCallback) {...};
- */
- addListener(callback: (options: OperationRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void): void;
- }
+ interface OperationRequestedEvent extends chrome.events.Event<(options: OperationRequestedEventOptions, successCallback: Function, errorCallback: (error: string) => void) => void> {}
+
+ interface OptionlessRequestedEvent extends chrome.events.Event<(successCallback: Function, errorCallback: (error: string) => void) => void> {}
- interface OptionlessRequestedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(function successCallback, function errorCallback) {...};
- */
- addListener(callback: (successCallback: Function, errorCallback: (error: string) => void) => void): void;
- }
-
/**
* Mounts a file system with the given fileSystemId and displayName. displayName will be shown in the left panel of Files.app. displayName can contain any characters including '/', but cannot be an empty string. displayName must be descriptive but doesn't have to be unique. The fileSystemId must not be an empty string.
* Depending on the type of the file system being mounted, the source option must be set appropriately.
* In case of an error, runtime.lastError will be set with a corresponding error code.
- * @param callback A generic result callback to indicate success or failure.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * @param callback A generic result callback to indicate success or failure.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function mount(options: MountOptions, callback?: () => void): void;
/**
* Unmounts a file system with the given fileSystemId. It must be called after onUnmountRequested is invoked. Also, the providing extension can decide to perform unmounting if not requested (eg. in case of lost connection, or a file error).
* In case of an error, runtime.lastError will be set with a corresponding error code.
- * @param callback A generic result callback to indicate success or failure.
- * If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * @param callback A generic result callback to indicate success or failure.
+ * If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function unmount(options: UnmountOptions, callback?: () => void): void;
/**
- * Returns all file systems mounted by the extension.
- * @param callback Callback to receive the result of getAll function.
- * The callback parameter should be a function that looks like this:
- * function(array of FileSystemInfo fileSystems) {...};
+ * Returns all file systems mounted by the extension.
+ * @param callback Callback to receive the result of getAll function.
+ * The callback parameter should be a function that looks like this:
+ * function(array of FileSystemInfo fileSystems) {...};
*/
export function getAll(callback: (fileSystems: FileSystemInfo[]) => void): void;
/**
- * Returns information about a file system with the passed fileSystemId.
- * @since Since Chrome 42.
- * @param callback Callback to receive the result of get function.
- * The callback parameter should be a function that looks like this:
- * function(FileSystemInfo fileSystem) {...};
+ * Returns information about a file system with the passed fileSystemId.
+ * @since Since Chrome 42.
+ * @param callback Callback to receive the result of get function.
+ * The callback parameter should be a function that looks like this:
+ * function(FileSystemInfo fileSystem) {...};
*/
export function get(fileSystemId: string, callback: (fileSystem: FileSystemInfo) => void): void;
/**
@@ -3169,12 +2870,12 @@ declare module chrome.fileSystemProvider {
* Not all providers are able to provide a tag, but if the file system has a changelog, then the tag can be eg. a change number, or a revision number.
* Note that if a parent directory is removed, then all descendant entries are also removed, and if they are watched, then the API must be notified about the fact. Also, if a directory is renamed, then all descendant entries are in fact removed, as there is no entry under their original paths anymore.
* In case of an error, runtime.lastError will be set will a corresponding error code.
- * @param callback A generic result callback to indicate success or failure.
+ * @param callback A generic result callback to indicate success or failure.
* If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * function() {...};
*/
export function notify(options: NotificationOptions, callback: () => void): void;
-
+
/** Raised when unmounting for the file system with the fileSystemId identifier is requested. In the response, the unmount API method must be called together with successCallback. If unmounting is not possible (eg. due to a pending operation), then errorCallback must be called. */
var onUnmountRequested: RequestedEvent;
/** Raised when metadata of a file or a directory at entryPath is requested. The metadata must be returned with the successCallback call. In case of an error, errorCallback must be called. */
@@ -3204,23 +2905,23 @@ declare module chrome.fileSystemProvider {
/** Raised when aborting an operation with operationRequestId is requested. The operation executed with operationRequestId must be immediately stopped and successCallback of this abort request executed. If aborting fails, then errorCallback must be called. Note, that callbacks of the aborted operation must not be called, as they will be ignored. Despite calling errorCallback, the request may be forcibly aborted. */
var onAbortRequested: OperationRequestedEvent;
/**
- * Raised when showing a configuration dialog for fileSystemId is requested. If it's handled, the file_system_provider.configurable manfiest option must be set to true.
- * @since Since Chrome 44.
+ * Raised when showing a configuration dialog for fileSystemId is requested. If it's handled, the file_system_provider.configurable manfiest option must be set to true.
+ * @since Since Chrome 44.
*/
var onConfigureRequested: RequestedEvent;
/**
- * Raised when showing a dialog for mounting a new file system is requested. If the extension/app is a file handler, then this event shouldn't be handled. Instead app.runtime.onLaunched should be handled in order to mount new file systems when a file is opened. For multiple mounts, the file_system_provider.multiple_mounts manifest option must be set to true.
- * @since Since Chrome 44.
+ * Raised when showing a dialog for mounting a new file system is requested. If the extension/app is a file handler, then this event shouldn't be handled. Instead app.runtime.onLaunched should be handled in order to mount new file systems when a file is opened. For multiple mounts, the file_system_provider.multiple_mounts manifest option must be set to true.
+ * @since Since Chrome 44.
*/
var onMountRequested: OptionlessRequestedEvent;
/**
- * Raised when setting a new directory watcher is requested. If an error occurs, then errorCallback must be called.
+ * Raised when setting a new directory watcher is requested. If an error occurs, then errorCallback must be called.
* @since Since Chrome 45. Warning: this is the current Beta channel.
*/
var onAddWatcherRequested: EntryPathRecursiveRequestedEvent;
/**
- * Raised when the watcher should be removed. If an error occurs, then errorCallback must be called.
- * @since Since Chrome 45. Warning: this is the current Beta channel.
+ * Raised when the watcher should be removed. If an error occurs, then errorCallback must be called.
+ * @since Since Chrome 45. Warning: this is the current Beta channel.
*/
var onRemoveWatcherRequested: EntryPathRecursiveRequestedEvent;
}
@@ -3229,11 +2930,11 @@ declare module chrome.fileSystemProvider {
// Font Settings
////////////////////
/**
- * Use the chrome.fontSettings API to manage Chrome's font settings.
- * Availability: Since Chrome 22.
- * Permissions: "fontSettings"
+ * Use the chrome.fontSettings API to manage Chrome's font settings.
+ * Availability: Since Chrome 22.
+ * Permissions: "fontSettings"
*/
-declare module chrome.fontSettings {
+declare namespace chrome.fontSettings {
/** Represents a font name. */
interface FontName {
/** The display name of the font. */
@@ -3289,120 +2990,96 @@ declare module chrome.fontSettings {
fontId: string;
}
- interface DefaultFixedFontSizeChangedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(object details) {...};
- */
- addListener(callback: (details: FontSizeDetails) => void): void;
- }
+ interface DefaultFixedFontSizeChangedEvent extends chrome.events.Event<(details: FontSizeDetails) => void> {}
- interface DefaultFontSizeChangedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(object details) {...};
- */
- addListener(callback: (details: FontSizeDetails) => void): void;
- }
+ interface DefaultFontSizeChangedEvent extends chrome.events.Event<(details: FontSizeDetails) => void> {}
- interface MinimumFontSizeChangedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(object details) {...};
- */
- addListener(callback: (details: FontSizeDetails) => void): void;
- }
+ interface MinimumFontSizeChangedEvent extends chrome.events.Event<(details: FontSizeDetails) => void> {}
- interface FontChangedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(object details) {...};
- */
- addListener(callback: (details: FullFontDetails) => void): void;
- }
+ interface FontChangedEvent extends chrome.events.Event<(details: FullFontDetails) => void> {}
/**
- * Sets the default font size.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Sets the default font size.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function setDefaultFontSize(details: DefaultFontSizeDetails, callback?: Function): void;
/**
- * Gets the font for a given script and generic font family.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function(object details) {...};
+ * Gets the font for a given script and generic font family.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function(object details) {...};
*/
export function getFont(details: FontDetails, callback?: (details: FontDetailsResult) => void): void;
/**
- * Gets the default font size.
- * @param details This parameter is currently unused.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function(object details) {...};
+ * Gets the default font size.
+ * @param details This parameter is currently unused.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function(object details) {...};
*/
export function getDefaultFontSize(details?: Object, callback?: (options: FontSizeDetails) => void): void;
/**
- * Gets the minimum font size.
- * @param details This parameter is currently unused.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function(object details) {...};
+ * Gets the minimum font size.
+ * @param details This parameter is currently unused.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function(object details) {...};
*/
export function getMinimumFontSize(details?: FontSizeDetails, callback?: (options: FontSizeDetails) => void): void;
/**
- * Sets the minimum font size.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Sets the minimum font size.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function setMinimumFontSize(details: SetFontSizeDetails, callback?: Function): void;
/**
- * Gets the default size for fixed width fonts.
- * @param details This parameter is currently unused.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function(object details) {...};
+ * Gets the default size for fixed width fonts.
+ * @param details This parameter is currently unused.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function(object details) {...};
*/
export function getDefaultFixedFontSize(details?: Object, callback?: (details: FontSizeDetails) => void): void;
/**
- * Clears the default font size set by this extension, if any.
- * @param details This parameter is currently unused.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Clears the default font size set by this extension, if any.
+ * @param details This parameter is currently unused.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function clearDefaultFontSize(details?: Object, callback?: Function): void;
/**
- * Sets the default size for fixed width fonts.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Sets the default size for fixed width fonts.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function setDefaultFixedFontSize(details: SetFontSizeDetails, callback?: Function): void;
/**
- * Clears the font set by this extension, if any.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Clears the font set by this extension, if any.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function clearFont(details: FontDetails, callback?: Function): void;
/**
- * Sets the font for a given script and generic font family.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function(object details) {...};
+ * Sets the font for a given script and generic font family.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function(object details) {...};
*/
export function setFont(details: SetFontDetails, callback?: Function): void;
/**
- * Clears the minimum font size set by this extension, if any.
- * @param details This parameter is currently unused.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Clears the minimum font size set by this extension, if any.
+ * @param details This parameter is currently unused.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function clearMinimumFontSize(details?: Object, callback?: Function): void;
/**
- * Gets a list of fonts on the system.
- * @param callback The callback parameter should be a function that looks like this:
- * function(array of FontName results) {...};
+ * Gets a list of fonts on the system.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(array of FontName results) {...};
*/
export function getFontList(callback: (results: FontName[]) => void): void;
/**
- * Clears the default fixed font size set by this extension, if any.
- * @param details This parameter is currently unused.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Clears the default fixed font size set by this extension, if any.
+ * @param details This parameter is currently unused.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function clearDefaultFixedFontSize(details: Object, callback?: Function): void;
@@ -3420,11 +3097,11 @@ declare module chrome.fontSettings {
// Google Cloud Messaging
////////////////////
/**
- * Use chrome.gcm to enable apps and extensions to send and receive messages through the Google Cloud Messaging Service.
- * Availability: Since Chrome 35.
- * Permissions: "gcm"
+ * Use chrome.gcm to enable apps and extensions to send and receive messages through the Google Cloud Messaging Service.
+ * Availability: Since Chrome 35.
+ * Permissions: "gcm"
*/
-declare module chrome.gcm {
+declare namespace chrome.gcm {
interface OutgoingMessage {
/** The ID of the server to send the message to as assigned by Google API Console. */
destinationId: string;
@@ -3441,13 +3118,13 @@ declare module chrome.gcm {
data: Object;
/**
* Optional.
- * The sender who issued the message.
- * @since Since Chrome 41.
+ * The sender who issued the message.
+ * @since Since Chrome 41.
*/
from?: string;
/**
* Optional.
- * The collapse key of a message. See Collapsible Messages section of Cloud Messaging documentation for details.
+ * The collapse key of a message. See Collapsible Messages section of Cloud Messaging documentation for details.
*/
collapseKey?: string;
}
@@ -3461,61 +3138,41 @@ declare module chrome.gcm {
detail: Object;
}
- interface MessageReceptionEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(object message) {...};
- * Parameter message: A message received from another party via GCM.
- */
- addListener(callback: (message: IncomingMessage) => void): void;
- }
+ interface MessageReceptionEvent extends chrome.events.Event<(message: IncomingMessage) => void> {}
- interface MessageDeletionEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function() {...};
- */
- addListener(callback: () => void): void;
- }
+ interface MessageDeletionEvent extends chrome.events.Event<() => void> {}
+
+ interface GcmErrorEvent extends chrome.events.Event<(error: GcmError) => void> {}
- interface GcmErrorEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(object error) {...};
- * Parameter error: An error that occured while trying to send the message either in Chrome or on the GCM server. Application can retry sending the message with a reasonable backoff and possibly longer time-to-live.
- */
- addListener(callback: (error: GcmError) => void): void;
- }
-
/** The maximum size (in bytes) of all key/value pairs in a message. */
var MAX_MESSAGE_SIZE: number;
-
+
/**
- * Registers the application with GCM. The registration ID will be returned by the callback. If register is called again with the same list of senderIds, the same registration ID will be returned.
- * @param senderIds A list of server IDs that are allowed to send messages to the application. It should contain at least one and no more than 100 sender IDs.
- * @param callback Function called when registration completes. It should check runtime.lastError for error when registrationId is empty.
- * The callback parameter should be a function that looks like this:
+ * Registers the application with GCM. The registration ID will be returned by the callback. If register is called again with the same list of senderIds, the same registration ID will be returned.
+ * @param senderIds A list of server IDs that are allowed to send messages to the application. It should contain at least one and no more than 100 sender IDs.
+ * @param callback Function called when registration completes. It should check runtime.lastError for error when registrationId is empty.
+ * The callback parameter should be a function that looks like this:
* function(string registrationId) {...};
- * Parameter registrationId: A registration ID assigned to the application by the GCM.
+ * Parameter registrationId: A registration ID assigned to the application by the GCM.
*/
export function register(senderIds: string[], callback: (registrationId: string) => void): void;
/**
- * Unregisters the application from GCM.
- * @param callback A function called after the unregistration completes. Unregistration was successful if runtime.lastError is not set.
+ * Unregisters the application from GCM.
+ * @param callback A function called after the unregistration completes. Unregistration was successful if runtime.lastError is not set.
* The callback parameter should be a function that looks like this:
- * function() {...};
+ * function() {...};
*/
export function unregister(callback: () => void): void;
/**
- * Sends a message according to its contents.
- * @param message A message to send to the other party via GCM.
- * @param callback A function called after the message is successfully queued for sending. runtime.lastError should be checked, to ensure a message was sent without problems.
+ * Sends a message according to its contents.
+ * @param message A message to send to the other party via GCM.
+ * @param callback A function called after the message is successfully queued for sending. runtime.lastError should be checked, to ensure a message was sent without problems.
* The callback parameter should be a function that looks like this:
* function(string messageId) {...};
- * Parameter messageId: The ID of the message that the callback was issued for.
+ * Parameter messageId: The ID of the message that the callback was issued for.
*/
export function send(message: OutgoingMessage, callback: (messageId: string) => void): void;
-
+
/** Fired when a message is received through GCM. */
var onMessage: MessageReceptionEvent;
/** Fired when a GCM server had to delete messages sent by an app server to the application. See Messages deleted event section of Cloud Messaging documentation for details on handling this event. */
@@ -3528,11 +3185,11 @@ declare module chrome.gcm {
// History
////////////////////
/**
- * Use the chrome.history API to interact with the browser's record of visited pages. You can add, remove, and query for URLs in the browser's history. To override the history page with your own version, see Override Pages.
- * Availability: Since Chrome 5.
- * Permissions: "history"
+ * Use the chrome.history API to interact with the browser's record of visited pages. You can add, remove, and query for URLs in the browser's history. To override the history page with your own version, see Override Pages.
+ * Availability: Since Chrome 5.
+ * Permissions: "history"
*/
-declare module chrome.history {
+declare namespace chrome.history {
/** An object encapsulating one visit to a URL. */
interface VisitItem {
/** The transition type for this visit from its referrer. */
@@ -3593,56 +3250,44 @@ declare module chrome.history {
urls?: string[];
}
- interface HistoryVisitedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function( HistoryItem result) {...};
- */
- addListener(callback: (result: HistoryItem) => void): void;
- }
+ interface HistoryVisitedEvent extends chrome.events.Event<(result: HistoryItem) => void> {}
- interface HistoryVisitRemovedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(object removed) {...};
- */
- addListener(callback: (removed: RemovedResult) => void): void;
- }
+ interface HistoryVisitRemovedEvent extends chrome.events.Event<(removed: RemovedResult) => void> {}
/**
- * Searches the history for the last visit time of each page matching the query.
- * @param callback The callback parameter should be a function that looks like this:
- * function(array of HistoryItem results) {...};
+ * Searches the history for the last visit time of each page matching the query.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(array of HistoryItem results) {...};
*/
export function search(query: HistoryQuery, callback: (results: HistoryItem[]) => void): void;
/**
- * Adds a URL to the history at the current time with a transition type of "link".
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Adds a URL to the history at the current time with a transition type of "link".
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function addUrl(details: Url, callback?: () => void): void;
/**
- * Removes all items within the specified date range from the history. Pages will not be removed from the history unless all visits fall within the range.
- * @param callback The callback parameter should be a function that looks like this:
- * function() {...};
+ * Removes all items within the specified date range from the history. Pages will not be removed from the history unless all visits fall within the range.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function() {...};
*/
export function deleteRange(range: Range, callback: () => void): void;
/**
- * Deletes all items from the history.
- * @param callback The callback parameter should be a function that looks like this:
- * function() {...};
+ * Deletes all items from the history.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function() {...};
*/
export function deleteAll(callback: () => void): void;
/**
- * Retrieves information about visits to a URL.
- * @param callback The callback parameter should be a function that looks like this:
- * function(array of VisitItem results) {...};
+ * Retrieves information about visits to a URL.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(array of VisitItem results) {...};
*/
export function getVisits(details: Url, callback: (results: VisitItem[]) => void): void;
/**
- * Removes all occurrences of the given URL from the history.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Removes all occurrences of the given URL from the history.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function deleteUrl(details: Url, callback?: () => void): void;
@@ -3656,26 +3301,26 @@ declare module chrome.history {
// i18n
////////////////////
/**
- * Use the chrome.i18n infrastructure to implement internationalization across your whole app or extension.
- * @since Chrome 5.
+ * Use the chrome.i18n infrastructure to implement internationalization across your whole app or extension.
+ * @since Chrome 5.
*/
-declare module chrome.i18n {
+declare namespace chrome.i18n {
/**
- * Gets the accept-languages of the browser. This is different from the locale used by the browser; to get the locale, use i18n.getUILanguage.
- * @param callback The callback parameter should be a function that looks like this:
+ * Gets the accept-languages of the browser. This is different from the locale used by the browser; to get the locale, use i18n.getUILanguage.
+ * @param callback The callback parameter should be a function that looks like this:
* function(array of string languages) {...};
- * Parameter languages: Array of the accept languages of the browser, such as en-US,en,zh-CN
+ * Parameter languages: Array of the accept languages of the browser, such as en-US,en,zh-CN
*/
export function getAcceptLanguages(callback: (languages: string[]) => void): void;
/**
- * Gets the localized string for the specified message. If the message is missing, this method returns an empty string (''). If the format of the getMessage() call is wrong — for example, messageName is not a string or the substitutions array has more than 9 elements — this method returns undefined.
+ * Gets the localized string for the specified message. If the message is missing, this method returns an empty string (''). If the format of the getMessage() call is wrong — for example, messageName is not a string or the substitutions array has more than 9 elements — this method returns undefined.
* @param messageName The name of the message, as specified in the messages.json file.
- * @param substitutions Optional. Up to 9 substitution strings, if the message requires any.
+ * @param substitutions Optional. Up to 9 substitution strings, if the message requires any.
*/
export function getMessage(messageName: string, substitutions?: any): string;
/**
- * Gets the browser UI language of the browser. This is different from i18n.getAcceptLanguages which returns the preferred user languages.
- * @since Chrome 35.
+ * Gets the browser UI language of the browser. This is different from i18n.getAcceptLanguages which returns the preferred user languages.
+ * @since Chrome 35.
*/
export function getUILanguage(): string;
}
@@ -3684,11 +3329,11 @@ declare module chrome.i18n {
// Identity
////////////////////
/**
- * Use the chrome.identity API to get OAuth2 access tokens.
- * Permissions: "identity"
- * @since Chrome 29.
+ * Use the chrome.identity API to get OAuth2 access tokens.
+ * Permissions: "identity"
+ * @since Chrome 29.
*/
-declare module chrome.identity {
+declare namespace chrome.identity {
/** @since Chrome 32. */
interface AccountInfo {
/** A unique identifier for the account. This ID will not change for the lifetime of the account. */
@@ -3697,8 +3342,8 @@ declare module chrome.identity {
interface TokenDetails {
/**
- * Optional.
- * Fetching a token may require the user to sign-in to Chrome, or approve the application's requested scopes. If the interactive flag is true, getAuthToken will prompt the user as necessary. When the flag is false or omitted, getAuthToken will return failure any time a prompt would be required.
+ * Optional.
+ * Fetching a token may require the user to sign-in to Chrome, or approve the application's requested scopes. If the interactive flag is true, getAuthToken will prompt the user as necessary. When the flag is false or omitted, getAuthToken will return failure any time a prompt would be required.
*/
interactive?: boolean;
/**
@@ -3741,13 +3386,7 @@ declare module chrome.identity {
interactive?: boolean;
}
- interface SignInChangeEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function( AccountInfo account, boolean signedIn) {...};
- */
- addListener(callback: (account: AccountInfo, signedIn: boolean) => void): void;
- }
+ interface SignInChangeEvent extends chrome.events.Event<(account: AccountInfo, signedIn: boolean) => void> {}
/**
* Retrieves a list of AccountInfo objects describing the accounts present on the profile.
@@ -3759,10 +3398,10 @@ declare module chrome.identity {
* Gets an OAuth2 access token using the client ID and scopes specified in the oauth2 section of manifest.json.
* The Identity API caches access tokens in memory, so it's ok to call getAuthToken non-interactively any time a token is required. The token cache automatically handles expiration.
* For a good user experience it is important interactive token requests are initiated by UI in your app explaining what the authorization is for. Failing to do this will cause your users to get authorization requests, or Chrome sign in screens if they are not signed in, with with no context. In particular, do not use getAuthToken interactively when your app is first launched.
- * @param details Token options.
- * @param callback Called with an OAuth2 access token as specified by the manifest, or undefined if there was an error.
+ * @param details Token options.
+ * @param callback Called with an OAuth2 access token as specified by the manifest, or undefined if there was an error.
* If you specify the callback parameter, it should be a function that looks like this:
- * function(string token) {...};
+ * function(string token) {...};
*/
export function getAuthToken(details: TokenDetails, callback?: (token: string) => void): void;
/**
@@ -3774,32 +3413,32 @@ declare module chrome.identity {
/**
* Removes an OAuth2 access token from the Identity API's token cache.
* If an access token is discovered to be invalid, it should be passed to removeCachedAuthToken to remove it from the cache. The app may then retrieve a fresh token with getAuthToken.
- * @param details Token information.
- * @param callback Called when the token has been removed from the cache.
+ * @param details Token information.
+ * @param callback Called when the token has been removed from the cache.
* If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * function() {...};
*/
export function removeCachedAuthToken(details: TokenInformation, callback?: () => void): void;
/**
* Starts an auth flow at the specified URL.
* This method enables auth flows with non-Google identity providers by launching a web view and navigating it to the first URL in the provider's auth flow. When the provider redirects to a URL matching the pattern https://<app-id>.chromiumapp.org/*, the window will close, and the final redirect URL will be passed to the callback function.
* For a good user experience it is important interactive auth flows are initiated by UI in your app explaining what the authorization is for. Failing to do this will cause your users to get authorization requests with no context. In particular, do not launch an interactive auth flow when your app is first launched.
- * @param details WebAuth flow options.
- * @param callback Called with the URL redirected back to your application.
+ * @param details WebAuth flow options.
+ * @param callback Called with the URL redirected back to your application.
* The callback parameter should be a function that looks like this:
- * function(string responseUrl) {...};
+ * function(string responseUrl) {...};
*/
export function launchWebAuthFlow(details: WebAuthFlowOptions, callback: (responseUrl?: string) => void): void;
/**
* Generates a redirect URL to be used in launchWebAuthFlow.
* The generated URLs match the pattern https://<app-id>.chromiumapp.org/*.
* @since Chrome 33.
- * @param path Optional. The path appended to the end of the generated URL.
+ * @param path Optional. The path appended to the end of the generated URL.
*/
- export function getRedirectURL(path?: string): void;
+ export function getRedirectURL(path?: string): string;
/**
- * Fired when signin state changes for an account on the user's profile.
+ * Fired when signin state changes for an account on the user's profile.
* @since Chrome 33.
*/
var onSignInChanged: SignInChangeEvent;
@@ -3809,31 +3448,25 @@ declare module chrome.identity {
// Idle
////////////////////
/**
- * Use the chrome.idle API to detect when the machine's idle state changes.
- * Permissions: "idle"
+ * Use the chrome.idle API to detect when the machine's idle state changes.
+ * Permissions: "idle"
* @since Chrome 6.
*/
-declare module chrome.idle {
- interface IdleStateChangedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function( IdleState newState) {...};
- */
- addListener(callback: (newState: string) => void): void;
- }
+declare namespace chrome.idle {
+ interface IdleStateChangedEvent extends chrome.events.Event<(newState: string) => void> {}
/**
- * Returns "locked" if the system is locked, "idle" if the user has not generated any input for a specified number of seconds, or "active" otherwise.
- * @param detectionIntervalInSeconds The system is considered idle if detectionIntervalInSeconds seconds have elapsed since the last user input detected.
- * Since Chrome 25.
- * @param callback The callback parameter should be a function that looks like this:
- * function( IdleState newState) {...};
+ * Returns "locked" if the system is locked, "idle" if the user has not generated any input for a specified number of seconds, or "active" otherwise.
+ * @param detectionIntervalInSeconds The system is considered idle if detectionIntervalInSeconds seconds have elapsed since the last user input detected.
+ * Since Chrome 25.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function( IdleState newState) {...};
*/
export function queryState(detectionIntervalInSeconds: number, callback: (newState: string) => void): void;
/**
- * Sets the interval, in seconds, used to determine when the system is in an idle state for onStateChanged events. The default interval is 60 seconds.
+ * Sets the interval, in seconds, used to determine when the system is in an idle state for onStateChanged events. The default interval is 60 seconds.
* @since Chrome 25.
- * @param intervalInSeconds Threshold, in seconds, used to determine when the system is in an idle state.
+ * @param intervalInSeconds Threshold, in seconds, used to determine when the system is in an idle state.
*/
export function setDetectionInterval(intervalInSeconds: number): void;
@@ -3845,21 +3478,21 @@ declare module chrome.idle {
// Input - IME
////////////////////
/**
- * Use the chrome.input.ime API to implement a custom IME for Chrome OS. This allows your extension to handle keystrokes, set the composition, and manage the candidate window.
- * Permissions: "input"
+ * Use the chrome.input.ime API to implement a custom IME for Chrome OS. This allows your extension to handle keystrokes, set the composition, and manage the candidate window.
+ * Permissions: "input"
* @since Chrome 21.
*/
-declare module chrome.input.ime {
+declare namespace chrome.input.ime {
/** See http://www.w3.org/TR/DOM-Level-3-Events/#events-KeyboardEvent */
interface KeyboardEvent {
/**
* Optional.
- * Whether or not the SHIFT key is pressed.
+ * Whether or not the SHIFT key is pressed.
*/
shiftKey?: boolean;
/**
* Optional.
- * Whether or not the ALT key is pressed.
+ * Whether or not the ALT key is pressed.
*/
altKey?: boolean;
/** The ID of the request. */
@@ -3868,32 +3501,32 @@ declare module chrome.input.ime {
key: string;
/**
* Optional.
- * Whether or not the CTRL key is pressed.
+ * Whether or not the CTRL key is pressed.
*/
ctrlKey?: boolean;
/** One of keyup or keydown. */
type: string;
/**
* Optional.
- * The extension ID of the sender of this keyevent.
+ * The extension ID of the sender of this keyevent.
* @since Chrome 34.
*/
extensionId?: string;
/**
* Optional.
- * Value of the physical key being pressed. The value is not affected by current keyboard layout or modifier state.
+ * Value of the physical key being pressed. The value is not affected by current keyboard layout or modifier state.
* @since Chrome 26.
*/
code: string;
/**
* Optional.
- * The deprecated HTML keyCode, which is system- and implementation-dependent numerical code signifying the unmodified identifier associated with the key pressed.
+ * The deprecated HTML keyCode, which is system- and implementation-dependent numerical code signifying the unmodified identifier associated with the key pressed.
* @since Chrome 37.
*/
keyCode?: number;
/**
* Optional.
- * Whether or not the CAPS_LOCK is enabled.
+ * Whether or not the CAPS_LOCK is enabled.
* @since Chrome 29.
*/
capsLock?: boolean;
@@ -3906,22 +3539,22 @@ declare module chrome.input.ime {
/** Type of value this text field edits, (Text, Number, URL, etc) */
type: string;
/**
- * Whether the text field wants auto-correct.
+ * Whether the text field wants auto-correct.
* @since Chrome 40.
*/
autoCorrect: boolean;
/**
- * Whether the text field wants auto-complete.
+ * Whether the text field wants auto-complete.
* @since Chrome 40.
*/
autoComplete: boolean;
/**
- * Whether the text field wants spell-check.
+ * Whether the text field wants spell-check.
* @since Chrome 40.
*/
spellCheck: boolean;
}
-
+
/**
* A menu item used by an input method to interact with the user from the language menu.
* @since Chrome 30.
@@ -3967,24 +3600,24 @@ declare module chrome.input.ime {
candidate: string;
/** The candidate's id */
id: number;
- /**
+ /**
* Optional.
- * The id to add these candidates under
+ * The id to add these candidates under
*/
parentId?: number;
/**
* Optional.
- * Short string displayed to next to the candidate, often the shortcut key or index
+ * Short string displayed to next to the candidate, often the shortcut key or index
*/
label?: string;
/**
* Optional.
- * Additional text describing the candidate
+ * Additional text describing the candidate
*/
annotation?: string;
/**
* Optional.
- * The usage or detail description of word.
+ * The usage or detail description of word.
*/
usage?: CandidateUsage;
}
@@ -4028,37 +3661,37 @@ declare module chrome.input.ime {
interface CandidateWindowParameterProperties {
/**
* Optional.
- * True to show the cursor, false to hide it.
+ * True to show the cursor, false to hide it.
*/
cursorVisible?: boolean;
/**
* Optional.
- * True if the candidate window should be rendered vertical, false to make it horizontal.
+ * True if the candidate window should be rendered vertical, false to make it horizontal.
*/
vertical?: boolean;
/**
* Optional.
- * The number of candidates to display per page.
+ * The number of candidates to display per page.
*/
pageSize?: number;
/**
* Optional.
- * True to display the auxiliary text, false to hide it.
+ * True to display the auxiliary text, false to hide it.
*/
auxiliaryTextVisible?: boolean;
/**
* Optional.
- * Text that is shown at the bottom of the candidate window.
+ * Text that is shown at the bottom of the candidate window.
*/
auxiliaryText?: string;
/**
* Optional.
- * True to show the Candidate window, false to hide it.
+ * True to show the Candidate window, false to hide it.
*/
visible?: boolean;
- /**
+ /**
* Optional.
- * Where to display the candidate window.
+ * Where to display the candidate window.
* @since Chrome 28.
*/
windowPosition?: string;
@@ -4109,180 +3742,104 @@ declare module chrome.input.ime {
anchor: number;
}
- interface BlurEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(integer contextID) {...};
- * Parameter contextID: The ID of the text field that has lost focus. The ID is invalid after this call
- */
- addListener(callback: (contextID: number) => void): void;
- }
+ interface BlurEvent extends chrome.events.Event<(contextID: number) => void> {}
- interface CandidateClickedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(string engineID, integer candidateID, MouseButton button) {...};
- * Parameter engineID: ID of the engine receiving the event
- * Parameter candidateID: ID of the candidate that was clicked.
- * Parameter button: Which mouse buttons was clicked.
- */
- addListener(callback: (engineID: string, candidateID: number, button: string) => void): void;
- }
+ interface CandidateClickedEvent extends chrome.events.Event<(engineID: string, candidateID: number, button: string) => void> {}
- interface KeyEventEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(string engineID, KeyboardEvent keyData) {...};
- * Parameter engineID: ID of the engine receiving the event
- * Parameter keyData: Data on the key event
- */
- addListener(callback: (engineID: string, keyData: KeyboardEvent) => void): void;
- }
+ interface KeyEventEvent extends chrome.events.Event<(engineID: string, keyData: KeyboardEvent) => void> {}
- interface DeactivatedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(string engineID) {...};
- * Parameter engineID: ID of the engine receiving the event
- */
- addListener(callback: (engineID: string) => void): void;
- }
+ interface DeactivatedEvent extends chrome.events.Event<(engineID: string) => void> {}
- interface InputContextUpdateEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function( InputContext context) {...};
- * Parameter context: An InputContext object describing the text field that has changed.
- */
- addListener(callback: (context: InputContext) => void): void;
- }
+ interface InputContextUpdateEvent extends chrome.events.Event<(context: InputContext) => void> {}
- interface ActivateEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(string engineID, ScreenType screen) {...};
- * Parameter engineID: ID of the engine receiving the event
- * Parameter The screen type under which the IME is activated.
- */
- addListener(callback: (engineID: string, screen: string) => void): void;
- }
+ interface ActivateEvent extends chrome.events.Event<(engineID: string, screen: string) => void> {}
- interface FocusEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function( InputContext context) {...};
- * Parameter context: Describes the text field that has acquired focus.
- */
- addListener(callback: (context: InputContext) => void): void;
- }
+ interface FocusEvent extends chrome.events.Event<(context: InputContext) => void> {}
- interface MenuItemActivatedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(string engineID, string name) {...};
- * Parameter engineID: ID of the engine receiving the event
- * Parameter name: Name of the MenuItem which was activated
- */
- addListener(callback: (engineID: string, name: string) => void): void;
- }
+ interface MenuItemActivatedEvent extends chrome.events.Event<(engineID: string, name: string) => void> {}
- interface SurroundingTextChangedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(string engineID, object surroundingInfo) {...};
- * Parameter engineID: ID of the engine receiving the event
- * Parameter surroundingInfo: The surrounding information.
- */
- addListener(callback: (engineID: string, surroundingInfo: SurroundingTextInfo) => void): void;
- }
+ interface SurroundingTextChangedEvent extends chrome.events.Event<(engineID: string, surroundingInfo: SurroundingTextInfo) => void> {}
- interface InputResetEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(string engineID) {...};
- * Parameter engineID: ID of the engine receiving the event
- */
- addListener(callback: (engineID: string) => void): void;
- }
+ interface InputResetEvent extends chrome.events.Event<(engineID: string) => void> {}
/**
- * Adds the provided menu items to the language menu when this IME is active.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Adds the provided menu items to the language menu when this IME is active.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function setMenuItems(parameters: ImeParameters, callback?: () => void): void;
/**
- * Commits the provided text to the current input.
- * @param callback Called when the operation completes with a boolean indicating if the text was accepted or not. On failure, chrome.runtime.lastError is set.
+ * Commits the provided text to the current input.
+ * @param callback Called when the operation completes with a boolean indicating if the text was accepted or not. On failure, chrome.runtime.lastError is set.
* If you specify the callback parameter, it should be a function that looks like this:
- * function(boolean success) {...};
+ * function(boolean success) {...};
*/
export function commitText(parameters: CommitTextParameters, callback?: (success: boolean) => void): void;
/**
- * Sets the current candidate list. This fails if this extension doesn't own the active IME
- * @param callback Called when the operation completes.
+ * Sets the current candidate list. This fails if this extension doesn't own the active IME
+ * @param callback Called when the operation completes.
* If you specify the callback parameter, it should be a function that looks like this:
- * function(boolean success) {...};
+ * function(boolean success) {...};
*/
export function setCandidates(parameters: CandidatesParameters, callback?: (success: boolean) => void): void;
- /**
- * Set the current composition. If this extension does not own the active IME, this fails.
- * @param callback Called when the operation completes with a boolean indicating if the text was accepted or not. On failure, chrome.runtime.lastError is set.
+ /**
+ * Set the current composition. If this extension does not own the active IME, this fails.
+ * @param callback Called when the operation completes with a boolean indicating if the text was accepted or not. On failure, chrome.runtime.lastError is set.
* If you specify the callback parameter, it should be a function that looks like this:
- * function(boolean success) {...};
+ * function(boolean success) {...};
*/
export function setComposition(parameters: CompositionParameters, callback?: (success: boolean) => void): void;
/**
- * Updates the state of the MenuItems specified
- * @param callback Called when the operation completes
+ * Updates the state of the MenuItems specified
+ * @param callback Called when the operation completes
* If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * function() {...};
*/
export function updateMenuItems(parameters: MenuItemParameters, callback?: () => void): void;
/**
- * Sets the properties of the candidate window. This fails if the extension doesn't own the active IME
- * @param callback Called when the operation completes.
+ * Sets the properties of the candidate window. This fails if the extension doesn't own the active IME
+ * @param callback Called when the operation completes.
* If you specify the callback parameter, it should be a function that looks like this:
- * function(boolean success) {...};
+ * function(boolean success) {...};
*/
export function setCandidateWindowProperties(parameters: CandidateWindowParameter, callback?: (success: boolean) => void): void;
/**
- * Clear the current composition. If this extension does not own the active IME, this fails.
- * @param callback Called when the operation completes with a boolean indicating if the text was accepted or not. On failure, chrome.runtime.lastError is set.
+ * Clear the current composition. If this extension does not own the active IME, this fails.
+ * @param callback Called when the operation completes with a boolean indicating if the text was accepted or not. On failure, chrome.runtime.lastError is set.
* If you specify the callback parameter, it should be a function that looks like this:
- * function(boolean success) {...};
+ * function(boolean success) {...};
*/
export function clearComposition(parameters: ClearCompositionParameters, callback?: (success: boolean) => void): void;
/**
- * Set the position of the cursor in the candidate window. This is a no-op if this extension does not own the active IME.
- * @param callback Called when the operation completes
+ * Set the position of the cursor in the candidate window. This is a no-op if this extension does not own the active IME.
+ * @param callback Called when the operation completes
* If you specify the callback parameter, it should be a function that looks like this:
- * function(boolean success) {...};
+ * function(boolean success) {...};
*/
export function setCursorPosition(parameters: CursorPositionParameters, callback?: (success: boolean) => void): void;
/**
- * Sends the key events. This function is expected to be used by virtual keyboards. When key(s) on a virtual keyboard is pressed by a user, this function is used to propagate that event to the system.
+ * Sends the key events. This function is expected to be used by virtual keyboards. When key(s) on a virtual keyboard is pressed by a user, this function is used to propagate that event to the system.
* @since Chrome 33.
- * @param callback Called when the operation completes.
+ * @param callback Called when the operation completes.
* If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * function() {...};
*/
export function sendKeyEvents(parameters: SendKeyEventParameters, callback?: () => void): void;
/**
- * Hides the input view window, which is popped up automatically by system. If the input view window is already hidden, this function will do nothing.
+ * Hides the input view window, which is popped up automatically by system. If the input view window is already hidden, this function will do nothing.
* @since Chrome 34.
*/
export function hideInputView(): void;
/**
- * Deletes the text around the caret.
+ * Deletes the text around the caret.
* @since Chrome 27.
*/
export function deleteSurroundingText(parameters: DeleteSurroundingTextParameters, callback?: () => void): void;
/**
- * Indicates that the key event received by onKeyEvent is handled. This should only be called if the onKeyEvent listener is asynchronous.
+ * Indicates that the key event received by onKeyEvent is handled. This should only be called if the onKeyEvent listener is asynchronous.
* @since Chrome 25.
- * @param requestId Request id of the event that was handled. This should come from keyEvent.requestId
- * @param response True if the keystroke was handled, false if not
+ * @param requestId Request id of the event that was handled. This should come from keyEvent.requestId
+ * @param response True if the keystroke was handled, false if not
*/
export function keyEventHandled(requestId: string, response: boolean): void;
@@ -4303,12 +3860,12 @@ declare module chrome.input.ime {
/** Called when the user selects a menu item */
var onMenuItemActivated: MenuItemActivatedEvent;
/**
- * Called when the editable string around caret is changed or when the caret position is moved. The text length is limited to 100 characters for each back and forth direction.
+ * Called when the editable string around caret is changed or when the caret position is moved. The text length is limited to 100 characters for each back and forth direction.
* @since Chrome 27.
*/
var onSurroundingTextChanged: SurroundingTextChangedEvent;
/**
- * This event is sent when chrome terminates ongoing text input session.
+ * This event is sent when chrome terminates ongoing text input session.
* @since Chrome 29.
*/
var onReset: InputResetEvent;
@@ -4318,38 +3875,38 @@ declare module chrome.input.ime {
// Management
////////////////////
/**
- * The chrome.management API provides ways to manage the list of extensions/apps that are installed and running. It is particularly useful for extensions that override the built-in New Tab page.
- * Permissions: "management"
+ * The chrome.management API provides ways to manage the list of extensions/apps that are installed and running. It is particularly useful for extensions that override the built-in New Tab page.
+ * Permissions: "management"
* @since Chrome 8.
*/
-declare module chrome.management {
+declare namespace chrome.management {
/** Information about an installed extension, app, or theme. */
interface ExtensionInfo {
/**
* Optional.
- * A reason the item is disabled.
+ * A reason the item is disabled.
* @since Chrome 17.
*/
disabledReason?: string;
/** Optional. The launch url (only present for apps). */
appLaunchUrl?: string;
/**
- * The description of this extension, app, or theme.
+ * The description of this extension, app, or theme.
* @since Chrome 9.
*/
description: string;
/**
- * Returns a list of API based permissions.
+ * Returns a list of API based permissions.
* @since Chrome 9.
*/
permissions: string[];
/**
* Optional.
- * A list of icon information. Note that this just reflects what was declared in the manifest, and the actual image at that url may be larger or smaller than what was declared, so you might consider using explicit width and height attributes on img tags referencing these images. See the manifest documentation on icons for more details.
+ * A list of icon information. Note that this just reflects what was declared in the manifest, and the actual image at that url may be larger or smaller than what was declared, so you might consider using explicit width and height attributes on img tags referencing these images. See the manifest documentation on icons for more details.
*/
icons?: IconInfo[];
/**
- * Returns a list of host based permissions.
+ * Returns a list of host based permissions.
* @since Chrome 9.
*/
hostPermissions: string[];
@@ -4357,17 +3914,17 @@ declare module chrome.management {
enabled: boolean;
/**
* Optional.
- * The URL of the homepage of this extension, app, or theme.
+ * The URL of the homepage of this extension, app, or theme.
* @since Chrome 11.
*/
homepageUrl?: string;
/**
- * Whether this extension can be disabled or uninstalled by the user.
+ * Whether this extension can be disabled or uninstalled by the user.
* @since Chrome 12.
*/
mayDisable: boolean;
/**
- * How the extension was installed.
+ * How the extension was installed.
* @since Chrome 22.
*/
installType: string;
@@ -4376,18 +3933,18 @@ declare module chrome.management {
/** The extension's unique identifier. */
id: string;
/**
- * Whether the extension, app, or theme declares that it supports offline.
+ * Whether the extension, app, or theme declares that it supports offline.
* @since Chrome 15.
*/
offlineEnabled: boolean;
/**
* Optional.
- * The update URL of this extension, app, or theme.
+ * The update URL of this extension, app, or theme.
* @since Chrome 16.
*/
updateUrl?: string;
/**
- * The type of this extension, app, or theme.
+ * The type of this extension, app, or theme.
* @since Chrome 23.
*/
type: string;
@@ -4396,24 +3953,24 @@ declare module chrome.management {
/** The name of this extension, app, or theme. */
name: string;
/**
- * A short version of the name of this extension, app, or theme.
+ * A short version of the name of this extension, app, or theme.
* @since Chrome 31.
*/
shortName: string;
/**
* True if this is an app.
- * @deprecated since Chrome 33. Please use management.ExtensionInfo.type.
+ * @deprecated since Chrome 33. Please use management.ExtensionInfo.type.
*/
isApp: boolean;
/**
* Optional.
- * The app launch type (only present for apps).
+ * The app launch type (only present for apps).
* @since Chrome 37.
*/
launchType?: string;
/**
* Optional.
- * The currently available launch types (only present for apps).
+ * The currently available launch types (only present for apps).
* @since Chrome 37.
*/
availableLaunchTypes?: string[];
@@ -4430,151 +3987,126 @@ declare module chrome.management {
interface UninstallOptions {
/**
* Optional.
- * Whether or not a confirm-uninstall dialog should prompt the user. Defaults to false for self uninstalls. If an extension uninstalls another extension, this parameter is ignored and the dialog is always shown.
+ * Whether or not a confirm-uninstall dialog should prompt the user. Defaults to false for self uninstalls. If an extension uninstalls another extension, this parameter is ignored and the dialog is always shown.
*/
showConfirmDialog?: boolean;
}
- interface ManagementDisabledEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function( ExtensionInfo info) {...};
- */
- addListener(callback: (info: ExtensionInfo) => void): void;
- }
+ interface ManagementDisabledEvent extends chrome.events.Event<(info: ExtensionInfo) => void> {}
- interface ManagementUninstalledEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(string id) {...};
- * Parameter id: The id of the extension, app, or theme that was uninstalled.
- */
- addListener(callback: (id: string) => void): void;
- }
+ interface ManagementUninstalledEvent extends chrome.events.Event<(id: string) => void> {}
- interface ManagementInstalledEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function( ExtensionInfo info) {...};
- */
- addListener(callback: (info: ExtensionInfo) => void): void;
- }
+ interface ManagementInstalledEvent extends chrome.events.Event<(info: ExtensionInfo) => void> {}
- interface ManagementEnabledEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function( ExtensionInfo info) {...};
- */
- addListener(callback: (info: ExtensionInfo) => void): void;
- }
+ interface ManagementEnabledEvent extends chrome.events.Event<(info: ExtensionInfo) => void> {}
/**
- * Enables or disables an app or extension.
- * @param id This should be the id from an item of management.ExtensionInfo.
- * @param enabled Whether this item should be enabled or disabled.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Enables or disables an app or extension.
+ * @param id This should be the id from an item of management.ExtensionInfo.
+ * @param enabled Whether this item should be enabled or disabled.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function setEnabled(id: string, enabled: boolean, callback?: () => void): void;
/**
- * Returns a list of permission warnings for the given extension id.
+ * Returns a list of permission warnings for the given extension id.
* @since Chrome 15.
- * @param id The ID of an already installed extension.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function(array of string permissionWarnings) {...};
+ * @param id The ID of an already installed extension.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function(array of string permissionWarnings) {...};
*/
export function getPermissionWarningsById(id: string, callback?: (permissionWarnings: string[]) => void): void;
/**
- * Returns information about the installed extension, app, or theme that has the given ID.
+ * Returns information about the installed extension, app, or theme that has the given ID.
* @since Chrome 9.
- * @param id The ID from an item of management.ExtensionInfo.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function( ExtensionInfo result) {...};
+ * @param id The ID from an item of management.ExtensionInfo.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function( ExtensionInfo result) {...};
*/
export function get(id: string, callback?: (result: ExtensionInfo) => void): void;
/**
- * Returns a list of information about installed extensions and apps.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function(array of ExtensionInfo result) {...};
+ * Returns a list of information about installed extensions and apps.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function(array of ExtensionInfo result) {...};
*/
export function getAll(callback?: (result: ExtensionInfo[]) => void): void;
/**
- * Returns a list of permission warnings for the given extension manifest string. Note: This function can be used without requesting the 'management' permission in the manifest.
+ * Returns a list of permission warnings for the given extension manifest string. Note: This function can be used without requesting the 'management' permission in the manifest.
* @since Chrome 15.
- * @param manifestStr Extension manifest JSON string.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function(array of string permissionWarnings) {...};
+ * @param manifestStr Extension manifest JSON string.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function(array of string permissionWarnings) {...};
*/
export function getPermissionWarningsByManifest(manifestStr: string, callback?: (permissionwarnings: string[]) => void): void;
/**
- * Launches an application.
- * @param id The extension id of the application.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Launches an application.
+ * @param id The extension id of the application.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function launchApp(id: string, callback?: () => void): void;
/**
* Uninstalls a currently installed app or extension.
- * @since Chrome 21.
+ * @since Chrome 21.
* @param id This should be the id from an item of management.ExtensionInfo.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function uninstall(id: string, options?: UninstallOptions, callback?: () => void): void;
/**
* Uninstalls a currently installed app or extension.
- * @deprecated since Chrome 21. The options parameter was added to this function.
+ * @deprecated since Chrome 21. The options parameter was added to this function.
* @param id This should be the id from an item of management.ExtensionInfo.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function uninstall(id: string, callback?: () => void): void;
/**
- * Returns information about the calling extension, app, or theme. Note: This function can be used without requesting the 'management' permission in the manifest.
+ * Returns information about the calling extension, app, or theme. Note: This function can be used without requesting the 'management' permission in the manifest.
* @since Chrome 39.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function( ExtensionInfo result) {...};
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function( ExtensionInfo result) {...};
*/
export function getSelf(callback?: (result: ExtensionInfo) => void): void;
/**
- * Uninstalls the calling extension.
+ * Uninstalls the calling extension.
* Note: This function can be used without requesting the 'management' permission in the manifest.
- * @since Chrome 26.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * @since Chrome 26.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function uninstallSelf(options?: UninstallOptions, callback?: () => void): void;
/**
- * Uninstalls the calling extension.
+ * Uninstalls the calling extension.
* Note: This function can be used without requesting the 'management' permission in the manifest.
- * @since Chrome 26.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * @since Chrome 26.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function uninstallSelf(callback?: () => void): void;
/**
- * Display options to create shortcuts for an app. On Mac, only packaged app shortcuts can be created.
+ * Display options to create shortcuts for an app. On Mac, only packaged app shortcuts can be created.
* @since Chrome 37.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function createAppShortcut(id: string, callback?: () => void): void;
/**
- * Set the launch type of an app.
+ * Set the launch type of an app.
* @since Chrome 37.
- * @param id This should be the id from an app item of management.ExtensionInfo.
- * @param launchType The target launch type. Always check and make sure this launch type is in ExtensionInfo.availableLaunchTypes, because the available launch types vary on different platforms and configurations.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * @param id This should be the id from an app item of management.ExtensionInfo.
+ * @param launchType The target launch type. Always check and make sure this launch type is in ExtensionInfo.availableLaunchTypes, because the available launch types vary on different platforms and configurations.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function setLaunchType(id: string, launchType: string, callback?: () => void): void;
/**
- * Generate an app for a URL. Returns the generated bookmark app.
+ * Generate an app for a URL. Returns the generated bookmark app.
* @since Chrome 37.
- * @param url The URL of a web page. The scheme of the URL can only be "http" or "https".
- * @param title The title of the generated app.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function( ExtensionInfo result) {...};
+ * @param url The URL of a web page. The scheme of the URL can only be "http" or "https".
+ * @param title The title of the generated app.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function( ExtensionInfo result) {...};
*/
export function generateAppForLink(url: string, title: string, callback?: (result: ExtensionInfo) => void): void;
@@ -4592,12 +4124,12 @@ declare module chrome.management {
// Notifications
////////////////////
/**
- * Use the networking.config API to authenticate to captive portals.
- * Permissions: "networking.config"
- * Important: This API works only on Chrome OS.
+ * Use the networking.config API to authenticate to captive portals.
+ * Permissions: "networking.config"
+ * Important: This API works only on Chrome OS.
* @since Chrome 43.
*/
-declare module chrome.networking.config {
+declare namespace chrome.networking.config {
interface NetworkInfo {
/** Currently only WiFi supported. */
Type: string;
@@ -4613,37 +4145,30 @@ declare module chrome.networking.config {
Security?: string;
}
- interface CaptivePorttalDetectedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function( NetworkInfo networkInfo) {...};
- * Parameter networkInfo: Information about the network on which a captive portal was detected.
- */
- addListener(callback: (networkInfo: NetworkInfo) => void): void;
- }
-
+ interface CaptivePorttalDetectedEvent extends chrome.events.Event<(networkInfo: NetworkInfo) => void> {}
+
/**
- * Allows an extension to define network filters for the networks it can handle. A call to this function will remove all filters previously installed by the extension before setting the new list.
- * @param networks Network filters to set. Every NetworkInfo must either have the SSID or HexSSID set. Other fields will be ignored.
- * @param callback Called back when this operation is finished.
+ * Allows an extension to define network filters for the networks it can handle. A call to this function will remove all filters previously installed by the extension before setting the new list.
+ * @param networks Network filters to set. Every NetworkInfo must either have the SSID or HexSSID set. Other fields will be ignored.
+ * @param callback Called back when this operation is finished.
* The callback parameter should be a function that looks like this:
- * function() {...};
+ * function() {...};
*/
export function setNetworkFilter(networks: NetworkInfo[], callback: () => void): void;
/**
- * Called by the extension to notify the network config API that it finished a captive portal authentication attempt and hand over the result of the attempt. This function must only be called with the GUID of the latest onCaptivePortalDetected event.
- * @param GUID Unique network identifier obtained from onCaptivePortalDetected.
- * @param result The result of the authentication attempt.
+ * Called by the extension to notify the network config API that it finished a captive portal authentication attempt and hand over the result of the attempt. This function must only be called with the GUID of the latest onCaptivePortalDetected event.
+ * @param GUID Unique network identifier obtained from onCaptivePortalDetected.
+ * @param result The result of the authentication attempt.
* unhandled: The extension does not handle this network or captive portal (e.g. server end-point not found or not compatible).
* succeeded: The extension handled this network and authenticated successfully.
* rejected: The extension handled this network, tried to authenticate, however was rejected by the server.
- * failed: The extension handled this network, tried to authenticate, however failed due to an unspecified error.
- * @param callback Called back when this operation is finished.
+ * failed: The extension handled this network, tried to authenticate, however failed due to an unspecified error.
+ * @param callback Called back when this operation is finished.
* If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * function() {...};
*/
export function finishAuthentication(GUID: string, result: string, callback?: () => void): void;
-
+
/** This event fires everytime a captive portal is detected on a network matching any of the currently registered network filters and the user consents to use the extension for authentication. Network filters may be set using the setNetworkFilter. Upon receiving this event the extension should start its authentication attempt with the captive portal. When the extension finishes its attempt, it must call finishAuthentication with the GUID received with this event and the appropriate authentication result. */
var onCaptivePortalDetected: CaptivePorttalDetectedEvent;
}
@@ -4653,11 +4178,11 @@ declare module chrome.networking.config {
// https://developer.chrome.com/extensions/notifications
////////////////////
/**
- * Use the chrome.notifications API to create rich notifications using templates and show these notifications to users in the system tray.
- * Permissions: "notifications"
+ * Use the chrome.notifications API to create rich notifications using templates and show these notifications to users in the system tray.
+ * Permissions: "notifications"
* @since Chrome 28.
*/
-declare module chrome.notifications {
+declare namespace chrome.notifications {
interface ButtonOptions {
title: string;
iconUrl?: string;
@@ -4673,7 +4198,7 @@ declare module chrome.notifications {
interface NotificationOptions {
/** Optional. Which type of notification to display. Required for notifications.create method. */
type?: string;
- /**
+ /**
* Optional.
* A URL to the sender's avatar, app icon, or a thumbnail for image notifications.
* URLs can be a data URL, a blob URL, or a URL relative to a resource within this extension's .crx file Required for notifications.create method.
@@ -4685,7 +4210,7 @@ declare module chrome.notifications {
message?: string;
/**
* Optional.
- * Alternate notification content with a lower-weight font.
+ * Alternate notification content with a lower-weight font.
* @since Chrome 31.
*/
contextMessage?: string;
@@ -4699,19 +4224,19 @@ declare module chrome.notifications {
items?: ItemOptions[];
/**
* Optional.
- * Current progress ranges from 0 to 100.
+ * Current progress ranges from 0 to 100.
* @since Chrome 30.
*/
progress?: number;
/**
* Optional.
- * Whether to show UI indicating that the app will visibly respond to clicks on the body of a notification.
+ * Whether to show UI indicating that the app will visibly respond to clicks on the body of a notification.
* @since Chrome 32.
*/
isClickable?: boolean;
/**
* Optional.
- * A URL to the app icon mask. URLs have the same restrictions as iconUrl. The app icon mask should be in alpha channel, as only the alpha channel of the image will be considered.
+ * A URL to the app icon mask. URLs have the same restrictions as iconUrl. The app icon mask should be in alpha channel, as only the alpha channel of the image will be considered.
* @since Chrome 38.
*/
appIconMaskUrl?: string;
@@ -4719,45 +4244,15 @@ declare module chrome.notifications {
imageUrl?: string;
}
- interface NotificationClosedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(string notificationId, boolean byUser) {...};
- */
- addListener(callback: (notificationId: string, byUser: boolean) => void): void;
- }
+ interface NotificationClosedEvent extends chrome.events.Event<(notificationId: string, byUser: boolean) => void> {}
- interface NotificationClickedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(string notificationId) {...};
- */
- addListener(callback: (notificationId: string) => void): void;
- }
+ interface NotificationClickedEvent extends chrome.events.Event<(notificationId: string) => void> {}
- interface NotificationButtonClickedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(string notificationId, integer buttonIndex) {...};
- */
- addListener(callback: (notificationId: string, buttonIndex: number) => void): void;
- }
+ interface NotificationButtonClickedEvent extends chrome.events.Event<(notificationId: string, buttonIndex: number) => void> {}
- interface NotificationPermissionLevelChangedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function( PermissionLevel level) {...};
- */
- addListener(callback: (level: string) => void): void;
- }
+ interface NotificationPermissionLevelChangedEvent extends chrome.events.Event<(level: string) => void> {}
- interface NotificationShowSettingsEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function() {...};
- */
- addListener(callback: () => void): void;
- }
+ interface NotificationShowSettingsEvent extends chrome.events.Event<() => void> {}
/** The notification closed, either by the system or by user action. */
export var onClosed: NotificationClosedEvent;
@@ -4766,71 +4261,71 @@ declare module chrome.notifications {
/** The user pressed a button in the notification. */
export var onButtonClicked: NotificationButtonClickedEvent;
/**
- * The user changes the permission level.
+ * The user changes the permission level.
* @since Chrome 32.
*/
export var onPermissionLevelChanged: NotificationPermissionLevelChangedEvent;
/**
- * The user clicked on a link for the app's notification settings.
+ * The user clicked on a link for the app's notification settings.
* @since Chrome 32.
*/
export var onShowSettings: NotificationShowSettingsEvent;
/**
- * Creates and displays a notification.
+ * Creates and displays a notification.
* @param notificationId Identifier of the notification. If not set or empty, an ID will automatically be generated. If it matches an existing notification, this method first clears that notification before proceeding with the create operation.
* The notificationId parameter is required before Chrome 42.
- * @param options Contents of the notification.
+ * @param options Contents of the notification.
* @param callback Returns the notification id (either supplied or generated) that represents the created notification.
* The callback is required before Chrome 42.
* If you specify the callback parameter, it should be a function that looks like this:
- * function(string notificationId) {...};
+ * function(string notificationId) {...};
*/
export function create(notificationId: string, options: NotificationOptions, callback?: (notificationId: string) => void): void;
/**
- * Creates and displays a notification.
+ * Creates and displays a notification.
* @param notificationId Identifier of the notification. If not set or empty, an ID will automatically be generated. If it matches an existing notification, this method first clears that notification before proceeding with the create operation.
* The notificationId parameter is required before Chrome 42.
- * @param options Contents of the notification.
+ * @param options Contents of the notification.
* @param callback Returns the notification id (either supplied or generated) that represents the created notification.
* The callback is required before Chrome 42.
* If you specify the callback parameter, it should be a function that looks like this:
- * function(string notificationId) {...};
+ * function(string notificationId) {...};
*/
export function create(options: NotificationOptions, callback?: (notificationId: string) => void): void;
/**
- * Updates an existing notification.
- * @param notificationId The id of the notification to be updated. This is returned by notifications.create method.
- * @param options Contents of the notification to update to.
+ * Updates an existing notification.
+ * @param notificationId The id of the notification to be updated. This is returned by notifications.create method.
+ * @param options Contents of the notification to update to.
* @param callback Called to indicate whether a matching notification existed.
* The callback is required before Chrome 42.
* If you specify the callback parameter, it should be a function that looks like this:
- * function(boolean wasUpdated) {...};
+ * function(boolean wasUpdated) {...};
*/
export function update(notificationId: string, options: NotificationOptions, callback?: (wasUpdated: boolean) => void): void;
/**
- * Clears the specified notification.
- * @param notificationId The id of the notification to be cleared. This is returned by notifications.create method.
+ * Clears the specified notification.
+ * @param notificationId The id of the notification to be cleared. This is returned by notifications.create method.
* @param callback Called to indicate whether a matching notification existed.
* The callback is required before Chrome 42.
* If you specify the callback parameter, it should be a function that looks like this:
- * function(boolean wasCleared) {...};
+ * function(boolean wasCleared) {...};
*/
export function clear(notificationId: string, callback?: (wasCleared: boolean) => void): void;
/**
- * Retrieves all the notifications.
+ * Retrieves all the notifications.
* @since Chrome 29.
- * @param callback Returns the set of notification_ids currently in the system.
+ * @param callback Returns the set of notification_ids currently in the system.
* The callback parameter should be a function that looks like this:
- * function(object notifications) {...};
+ * function(object notifications) {...};
*/
export function getAll(callback: (notifications: Object) => void): void;
/**
- * Retrieves whether the user has enabled notifications from this app or extension.
+ * Retrieves whether the user has enabled notifications from this app or extension.
* @since Chrome 32.
- * @param callback Returns the current permission level.
+ * @param callback Returns the current permission level.
* The callback parameter should be a function that looks like this:
- * function( PermissionLevel level) {...};
+ * function( PermissionLevel level) {...};
*/
export function getPermissionLevel(callback: (level: string) => void): void;
}
@@ -4839,11 +4334,11 @@ declare module chrome.notifications {
// Omnibox
////////////////////
/**
- * The omnibox API allows you to register a keyword with Google Chrome's address bar, which is also known as the omnibox.
+ * The omnibox API allows you to register a keyword with Google Chrome's address bar, which is also known as the omnibox.
* Manifest: "omnibox": {...}
- * @since Chrome 9.
+ * @since Chrome 9.
*/
-declare module chrome.omnibox {
+declare namespace chrome.omnibox {
/** A suggest result. */
interface SuggestResult {
/** The text that is put into the URL bar, and that is sent to the extension when the user chooses this entry. */
@@ -4857,44 +4352,17 @@ declare module chrome.omnibox {
description: string;
}
- interface OmniboxInputEnteredEvent extends chrome.events.Event {
- /**
- * The callback parameter should be a function that looks like this:
- * function(string text, OnInputEnteredDisposition disposition) {...};
- */
- addListener(callback: (text: string) => void): void;
- }
+ interface OmniboxInputEnteredEvent extends chrome.events.Event<(text: string) => void> {}
- interface OmniboxInputChangedEvent extends chrome.events.Event {
- /**
- * The callback parameter should be a function that looks like this:
- * function(string text, function suggest) {...};
- * Parameter suggest: A callback passed to the onInputChanged event used for sending suggestions back to the browser.
- * The suggest parameter should be a function that looks like this:
- * function(array of SuggestResult suggestResults) {...};
- */
- addListener(callback: (text: string, suggest: (suggestResults: SuggestResult[]) => void) => void): void;
- }
+ interface OmniboxInputChangedEvent extends chrome.events.Event<(text: string, suggest: (suggestResults: SuggestResult[]) => void) => void> {}
- interface OmniboxInputStartedEvent extends chrome.events.Event {
- /**
- * The callback parameter should be a function that looks like this:
- * function() {...};
- */
- addListener(callback: () => void): void;
- }
+ interface OmniboxInputStartedEvent extends chrome.events.Event<() => void> {}
- interface OmniboxInputCancelledEvent extends chrome.events.Event {
- /**
- * The callback parameter should be a function that looks like this:
- * function() {...};
- */
- addListener(callback: () => void): void;
- }
+ interface OmniboxInputCancelledEvent extends chrome.events.Event<() => void> {}
/**
- * Sets the description and styling for the default suggestion. The default suggestion is the text that is displayed in the first suggestion row underneath the URL bar.
- * @param suggestion A partial SuggestResult object, without the 'content' parameter.
+ * Sets the description and styling for the default suggestion. The default suggestion is the text that is displayed in the first suggestion row underneath the URL bar.
+ * @param suggestion A partial SuggestResult object, without the 'content' parameter.
*/
export function setDefaultSuggestion(suggestion: Suggestion): void;
@@ -4912,18 +4380,12 @@ declare module chrome.omnibox {
// Page Action
////////////////////
/**
- * Use the chrome.pageAction API to put icons inside the address bar. Page actions represent actions that can be taken on the current page, but that aren't applicable to all pages.
- * Manifest: "page_action": {...}
+ * Use the chrome.pageAction API to put icons inside the address bar. Page actions represent actions that can be taken on the current page, but that aren't applicable to all pages.
+ * Manifest: "page_action": {...}
* @since Chrome 5.
*/
-declare module chrome.pageAction {
- interface PageActionClickedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function( tabs.Tab tab) {...};
- */
- addListener(callback: (tab: chrome.tabs.Tab) => void): void;
- }
+declare namespace chrome.pageAction {
+ interface PageActionClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> {}
interface TitleDetails {
/** The id of the tab for which you want to modify the page action. */
@@ -4949,29 +4411,29 @@ declare module chrome.pageAction {
tabId: number;
/**
* Optional.
- * @deprecated This argument is ignored.
+ * @deprecated This argument is ignored.
*/
iconIndex?: number;
/**
* Optional.
- * Either an ImageData object or a dictionary {size -> ImageData} representing icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals scale, then image with size scale * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.imageData = foo' is equivalent to 'details.imageData = {'19': foo}'
+ * Either an ImageData object or a dictionary {size -> ImageData} representing icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals scale, then image with size scale * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.imageData = foo' is equivalent to 'details.imageData = {'19': foo}'
*/
imageData?: ImageData;
/**
* Optional.
- * Either a relative image path or a dictionary {size -> relative image path} pointing to icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals scale, then image with size scale * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.path = foo' is equivalent to 'details.imageData = {'19': foo}'
+ * Either a relative image path or a dictionary {size -> relative image path} pointing to icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals scale, then image with size scale * 19 will be selected. Initially only scales 1 and 2 will be supported. At least one image must be specified. Note that 'details.path = foo' is equivalent to 'details.imageData = {'19': foo}'
*/
path?: any;
}
/**
- * Shows the page action. The page action is shown whenever the tab is selected.
- * @param tabId The id of the tab for which you want to modify the page action.
+ * Shows the page action. The page action is shown whenever the tab is selected.
+ * @param tabId The id of the tab for which you want to modify the page action.
*/
export function hide(tabId: number): void;
/**
- * Shows the page action. The page action is shown whenever the tab is selected.
- * @param tabId The id of the tab for which you want to modify the page action.
+ * Shows the page action. The page action is shown whenever the tab is selected.
+ * @param tabId The id of the tab for which you want to modify the page action.
*/
export function show(tabId: number): void;
/** Sets the title of the page action. This is displayed in a tooltip over the page action. */
@@ -4979,23 +4441,23 @@ declare module chrome.pageAction {
/** Sets the html document to be opened as a popup when the user clicks on the page action's icon. */
export function setPopup(details: PopupDetails): void;
/**
- * Gets the title of the page action.
+ * Gets the title of the page action.
* @since Chrome 19.
- * @param callback The callback parameter should be a function that looks like this:
+ * @param callback The callback parameter should be a function that looks like this:
* function(string result) {...};
*/
export function getTitle(details: GetDetails, callback: (result: string) => void): void;
/**
- * Gets the html document set as the popup for this page action.
+ * Gets the html document set as the popup for this page action.
* @since Chrome 19.
- * @param callback The callback parameter should be a function that looks like this:
- * function(string result) {...};
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(string result) {...};
*/
export function getPopup(details: GetDetails, callback: (result: string) => void): void;
/**
- * Sets the icon for the page action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the path or the imageData property must be specified.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
- * function() {...};
+ * Sets the icon for the page action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the path or the imageData property must be specified.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * function() {...};
*/
export function setIcon(details: IconDetails, callback?: () => void): void;
@@ -5007,22 +4469,22 @@ declare module chrome.pageAction {
// Page Capture
////////////////////
/**
- * Use the chrome.pageCapture API to save a tab as MHTML.
- * Permissions: "pageCapture"
+ * Use the chrome.pageCapture API to save a tab as MHTML.
+ * Permissions: "pageCapture"
* @since Chrome 18.
*/
-declare module chrome.pageCapture {
+declare namespace chrome.pageCapture {
interface SaveDetails {
/** The id of the tab to save as MHTML. */
tabId: number;
}
/**
- * Saves the content of the tab with given id as MHTML.
- * @param callback Called when the MHTML has been generated.
+ * Saves the content of the tab with given id as MHTML.
+ * @param callback Called when the MHTML has been generated.
* The callback parameter should be a function that looks like this:
* function(binary mhtmlData) {...};
- * Parameter mhtmlData: The MHTML data as a Blob.
+ * Parameter mhtmlData: The MHTML data as a Blob.
*/
export function saveAsMHTML(details: SaveDetails, callback: (mhtmlData: any) => void): void;
}
@@ -5031,67 +4493,67 @@ declare module chrome.pageCapture {
// Permissions
////////////////////
/**
- * Use the chrome.permissions API to request declared optional permissions at run time rather than install time, so users understand why the permissions are needed and grant only those that are necessary.
+ * Use the chrome.permissions API to request declared optional permissions at run time rather than install time, so users understand why the permissions are needed and grant only those that are necessary.
* @since Chrome 16.
*/
-declare module chrome.permissions {
+declare namespace chrome.permissions {
interface Permissions {
/**
* Optional.
- * List of named permissions (does not include hosts or origins). Anything listed here must appear in the optional_permissions list in the manifest.
+ * List of named permissions (does not include hosts or origins). Anything listed here must appear in the optional_permissions list in the manifest.
*/
origins?: string[];
/**
* Optional.
- * List of origin permissions. Anything listed here must be a subset of a host that appears in the optional_permissions list in the manifest. For example, if http://*.example.com/ or http://* appears in optional_permissions, you can request an origin of http://help.example.com/. Any path is ignored.
+ * List of origin permissions. Anything listed here must be a subset of a host that appears in the optional_permissions list in the manifest. For example, if http://*.example.com/ or http://* appears in optional_permissions, you can request an origin of http://help.example.com/. Any path is ignored.
*/
permissions?: string[];
}
interface PermissionsRemovedEvent {
/**
- * @param callback The callback parameter should be a function that looks like this:
+ * @param callback The callback parameter should be a function that looks like this:
* function( Permissions permissions) {...};
- * Parameter permissions: The permissions that have been removed.
+ * Parameter permissions: The permissions that have been removed.
*/
addListener(callback: (permissions: Permissions) => void): void;
}
interface PermissionsAddedEvent {
/**
- * @param callback The callback parameter should be a function that looks like this:
+ * @param callback The callback parameter should be a function that looks like this:
* function( Permissions permissions) {...};
- * Parameter permissions: The newly acquired permissions.
+ * Parameter permissions: The newly acquired permissions.
*/
addListener(callback: (permissions: Permissions) => void): void;
}
/**
- * Checks if the extension has the specified permissions.
- * @param callback The callback parameter should be a function that looks like this:
+ * Checks if the extension has the specified permissions.
+ * @param callback The callback parameter should be a function that looks like this:
* function(boolean result) {...};
- * Parameter result: True if the extension has the specified permissions.
+ * Parameter result: True if the extension has the specified permissions.
*/
export function contains(permissions: Permissions, callback: (result: boolean) => void): void;
/**
- * Gets the extension's current set of permissions.
- * @param callback The callback parameter should be a function that looks like this:
+ * Gets the extension's current set of permissions.
+ * @param callback The callback parameter should be a function that looks like this:
* function( Permissions permissions) {...};
- * Parameter permissions: The extension's active permissions.
+ * Parameter permissions: The extension's active permissions.
*/
export function getAll(callback: (permissions: Permissions) => void): void;
/**
- * Requests access to the specified permissions. These permissions must be defined in the optional_permissions field of the manifest. If there are any problems requesting the permissions, runtime.lastError will be set.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * Requests access to the specified permissions. These permissions must be defined in the optional_permissions field of the manifest. If there are any problems requesting the permissions, runtime.lastError will be set.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
* function(boolean granted) {...};
- * Parameter granted: True if the user granted the specified permissions.
+ * Parameter granted: True if the user granted the specified permissions.
*/
export function request(permissions: Permissions, callback?: (granted: boolean) => void): void;
/**
- * Removes access to the specified permissions. If there are any problems removing the permissions, runtime.lastError will be set.
- * @param callback If you specify the callback parameter, it should be a function that looks like this:
+ * Removes access to the specified permissions. If there are any problems removing the permissions, runtime.lastError will be set.
+ * @param callback If you specify the callback parameter, it should be a function that looks like this:
* function(boolean removed) {...};
- * Parameter removed: True if the permissions were removed.
+ * Parameter removed: True if the permissions were removed.
*/
export function remove(permissions: Permissions, callback?: (removed: boolean) => void): void;
@@ -5105,12 +4567,12 @@ declare module chrome.permissions {
// Platform Keys
////////////////////
/**
- * Use the chrome.platformKeys API to access client certificates managed by the platform. If the user or policy grants the permission, an extension can use such a certficate in its custom authentication protocol. E.g. this allows usage of platform managed certificates in third party VPNs (see chrome.vpnProvider).
- * Permissions: "platformKeys"
- * Important: This API works only on Chrome OS.
+ * Use the chrome.platformKeys API to access client certificates managed by the platform. If the user or policy grants the permission, an extension can use such a certficate in its custom authentication protocol. E.g. this allows usage of platform managed certificates in third party VPNs (see chrome.vpnProvider).
+ * Permissions: "platformKeys"
+ * Important: This API works only on Chrome OS.
* @since Chrome 45.
*/
-declare module chrome.platformKeys {
+declare namespace chrome.platformKeys {
interface Match {
/** The DER encoding of a X.509 certificate. */
certificate: ArrayBuffer;
@@ -5130,7 +4592,7 @@ declare module chrome.platformKeys {
request: ClientCertificateSelectRequestDetails;
/**
* Optional.
- * If given, the selectClientCertificates operates on this list. Otherwise, obtains the list of all certificates from the platform's certificate stores that are available to this extensions. Entries that the extension doesn't have permission for or which doesn't match the request, are removed.
+ * If given, the selectClientCertificates operates on this list. Otherwise, obtains the list of all certificates from the platform's certificate stores that are available to this extensions. Entries that the extension doesn't have permission for or which doesn't match the request, are removed.
*/
clientCerts?: ArrayBuffer[];
/** If true, the filtered list is presented to the user to manually select a certificate and thereby granting the extension access to the certificate(s) and key(s). Only the selected certificate(s) will be returned. If is false, the list is reduced to all certificates that the extension has been granted access to (automatically or manually). */
@@ -5153,30 +4615,30 @@ declare module chrome.platformKeys {
*/
debug_errors: string[];
}
-
+
/**
- * This function filters from a list of client certificates the ones that are known to the platform, match request and for which the extension has permission to access the certificate and its private key. If interactive is true, the user is presented a dialog where he can select from matching certificates and grant the extension access to the certificate. The selected/filtered client certificates will be passed to callback.
- * @param callback The callback parameter should be a function that looks like this:
+ * This function filters from a list of client certificates the ones that are known to the platform, match request and for which the extension has permission to access the certificate and its private key. If interactive is true, the user is presented a dialog where he can select from matching certificates and grant the extension access to the certificate. The selected/filtered client certificates will be passed to callback.
+ * @param callback The callback parameter should be a function that looks like this:
* function(array of Match matches) {...};
- * Parameter matches: The list of certificates that match the request, that the extension has permission for and, if interactive is true, that were selected by the user.
+ * Parameter matches: The list of certificates that match the request, that the extension has permission for and, if interactive is true, that were selected by the user.
*/
export function selectClientCertificates(details: ClientCertificateSelectDetails, callback: (matches: Match[]) => void): void;
/**
- * Passes the key pair of certificate for usage with platformKeys.subtleCrypto to callback.
- * @param certificate The certificate of a Match returned by selectClientCertificates.
- * @param parameters Determines signature/hash algorithm parameters additionally to the parameters fixed by the key itself. The same parameters are accepted as by WebCrypto's importKey function, e.g. RsaHashedImportParams for a RSASSA-PKCS1-v1_5 key. For RSASSA-PKCS1-v1_5 keys, additionally the parameters { 'hash': { 'name': 'none' } } are supported. The sign function will then apply PKCS#1 v1.5 padding and but not hash the given data.
- * @param callback The public and private CryptoKey of a certificate which can only be used with platformKeys.subtleCrypto.
+ * Passes the key pair of certificate for usage with platformKeys.subtleCrypto to callback.
+ * @param certificate The certificate of a Match returned by selectClientCertificates.
+ * @param parameters Determines signature/hash algorithm parameters additionally to the parameters fixed by the key itself. The same parameters are accepted as by WebCrypto's importKey function, e.g. RsaHashedImportParams for a RSASSA-PKCS1-v1_5 key. For RSASSA-PKCS1-v1_5 keys, additionally the parameters { 'hash': { 'name': 'none' } } are supported. The sign function will then apply PKCS#1 v1.5 padding and but not hash the given data.
+ * @param callback The public and private CryptoKey of a certificate which can only be used with platformKeys.subtleCrypto.
* The callback parameter should be a function that looks like this:
* function(object publicKey, object privateKey) {...};
- * Optional parameter privateKey: Might be null if this extension does not have access to it.
+ * Optional parameter privateKey: Might be null if this extension does not have access to it.
*/
export function getKeyPair(certificate: ArrayBuffer, parameters: Object, callback: (publicKey: CryptoKey, privateKey?: CryptoKey) => void): void;
/** An implementation of WebCrypto's SubtleCrypto that allows crypto operations on keys of client certificates that are available to this extension. */
export function subtleCrypto(): SubtleCrypto;
/**
- * Checks whether details.serverCertificateChain can be trusted for details.hostname according to the trust settings of the platform. Note: The actual behavior of the trust verification is not fully specified and might change in the future. The API implementation verifies certificate expiration, validates the certification path and checks trust by a known CA. The implementation is supposed to respect the EKU serverAuth and to support subject alternative names.
- * @param callback The callback parameter should be a function that looks like this:
- * function(object result) {...};
+ * Checks whether details.serverCertificateChain can be trusted for details.hostname according to the trust settings of the platform. Note: The actual behavior of the trust verification is not fully specified and might change in the future. The API implementation verifies certificate expiration, validates the certification path and checks trust by a known CA. The implementation is supposed to respect the EKU serverAuth and to support subject alternative names.
+ * @param callback The callback parameter should be a function that looks like this:
+ * function(object result) {...};
*/
export function verifyTLSServerCertificate(details: ServerCertificateVerificationDetails, callback: (result: ServerCertificateVerificationResult) => void): void;
}
@@ -5185,11 +4647,11 @@ declare module chrome.platformKeys {
// Power
////////////////////
/**
- * Use the chrome.power API to override the system's power management features.
- * Permissions: "power"
+ * Use the chrome.power API to override the system's power management features.
+ * Permissions: "power"
* @since Chrome 27.
*/
-declare module chrome.power {
+declare namespace chrome.power {
/** Requests that power management be temporarily disabled. |level| describes the degree to which power management should be disabled. If a request previously made by the same app is still active, it will be replaced by the new request. */
export function requestKeepAwake(level: string): void;
/** Releases a request previously made via requestKeepAwake(). */
@@ -5200,11 +4662,11 @@ declare module chrome.power {
// Printer Provider
////////////////////
/**
- * The chrome.printerProvider API exposes events used by print manager to query printers controlled by extensions, to query their capabilities and to submit print jobs to these printers.
- * Permissions: "printerProvider"
+ * The chrome.printerProvider API exposes events used by print manager to query printers controlled by extensions, to query their capabilities and to submit print jobs to these printers.
+ * Permissions: "printerProvider"
* @since Chrome 44.
*/
-declare module chrome.printerProvider {
+declare namespace chrome.printerProvider {
interface PrinterInfo {
/** Unique printer ID. */
id: string;
@@ -5232,50 +4694,18 @@ declare module chrome.printerProvider {
document: Blob;
}
- interface PrinterRequestedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(function resultCallback) {...};
- * Parameter resultCallback: Callback to return printer list. Every listener must call callback exactly once.
- */
- addListener(callback: (resultCallback: (printerInfo: PrinterInfo[]) => void) => void): void;
- }
+ interface PrinterRequestedEvent extends chrome.events.Event<(resultCallback: (printerInfo: PrinterInfo[]) => void) => void> {}
- interface PrinterInfoRequestedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function( usb.Device device, function resultCallback) {...};
- * Parameter device: The USB device.
- * Parameter resultCallback: Callback to return printer info. The receiving listener must call callback exactly once. If the parameter to this callback is undefined that indicates that the application has determined that the device is not supported.
- */
- addListener(callback: (device: any, resultCallback: (printerInfo?: PrinterInfo) => void) => void): void;
- }
+ interface PrinterInfoRequestedEvent extends chrome.events.Event<(device: any, resultCallback: (printerInfo?: PrinterInfo) => void) => void> {}
- interface CapabilityRequestedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(string printerId, function resultCallback) {...};
- * Parameter printerId: Unique ID of the printer whose capabilities are requested.
- * Parameter resultCallback: Callback to return device capabilities in CDD format. The receiving listener must call callback exectly once.
- */
- addListener(callback: (printerId: string, resultCallback: (capabilities: PrinterCapabilities) => void) => void): void;
- }
+ interface CapabilityRequestedEvent extends chrome.events.Event<(printerId: string, resultCallback: (capabilities: PrinterCapabilities) => void) => void> {}
+
+ interface PrintRequestedEvent extends chrome.events.Event<(printJob: PrintJob, resultCallback: (result: string) => void) => void> {}
- interface PrintRequestedEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(object printJob, function resultCallback) {...};
- * Parameter printJob: The printing request parameters.
- * Parameter resultCallback: Callback that should be called when the printing request is completed.
- * Parameter result (for resultCallback): OK: Operation completed successfully. FAILED: General failure. INVALID_TICKET: Print ticket is invalid. For example, ticket is inconsistent with capabilities or extension is not able to handle all settings from the ticket. INVALID_DATA: Document is invalid. For example, data may be corrupted or the format is incompatible with the extension.
- */
- addListener(callback: (printJob: PrintJob, resultCallback: (result: string) => void) => void): void;
- }
-
/** Event fired when print manager requests printers provided by extensions. */
export var onGetPrintersRequested: PrinterRequestedEvent;
/**
- * Event fired when print manager requests information about a USB device that may be a printer.
+ * Event fired when print manager requests information about a USB device that may be a printer.
* Note: An application should not rely on this event being fired more than once per device. If a connected device is supported it should be returned in the onGetPrintersRequested event.
* @since Chrome 45.
*/
@@ -5290,12 +4720,12 @@ declare module chrome.printerProvider {
// Privacy
////////////////////
/**
- * Use the chrome.privacy API to control usage of the features in Chrome that can affect a user's privacy. This API relies on the ChromeSetting prototype of the type API for getting and setting Chrome's configuration.
- * Permissions: "privacy"
- * The Chrome Privacy Whitepaper gives background detail regarding the features which this API can control.
+ * Use the chrome.privacy API to control usage of the features in Chrome that can affect a user's privacy. This API relies on the ChromeSetting prototype of the type API for getting and setting Chrome's configuration.
+ * Permissions: "privacy"
+ * The Chrome Privacy Whitepaper gives background detail regarding the features which this API can control.
* @since Chrome 18.
*/
-declare module chrome.privacy {
+declare namespace chrome.privacy {
interface Services {
/** since Chrome 20. */
spellingServiceEnabled: chrome.types.ChromeSetting;
@@ -5342,10 +4772,10 @@ declare module chrome.privacy {
////////////////////
/**
* Use the chrome.proxy API to manage Chrome's proxy settings. This API relies on the ChromeSetting prototype of the type API for getting and setting the proxy configuration.
- * Permissions: "proxy"
+ * Permissions: "proxy"
* @since Chrome 13.
*/
-declare module chrome.proxy {
+declare namespace chrome.proxy {
/** An object holding proxy auto-config information. Exactly one of the fields should be non-empty. */
interface PacScript {
/** Optional. URL of the PAC file to be used. */
@@ -5362,12 +4792,12 @@ declare module chrome.proxy {
rules?: ProxyRules;
/** Optional. The proxy auto-config (PAC) script for this configuration. Use this for 'pac_script' mode. */
pacScript?: PacScript;
- /**
+ /**
* 'direct' = Never use a proxy
* 'auto_detect' = Auto detect proxy settings
* 'pac_script' = Use specified PAC script
* 'fixed_servers' = Manually specify proxy servers
- * 'system' = Use system proxy settings
+ * 'system' = Use system proxy settings
*/
mode: string;
}
@@ -5407,13 +4837,7 @@ declare module chrome.proxy {
fatal: boolean;
}
- interface ProxyErrorEvent extends chrome.events.Event {
- /**
- * @param callback The callback parameter should be a function that looks like this:
- * function(object details) {...};
- */
- addListener(callback: (details: ErrorDetails) => void): void;
- }
+ interface ProxyErrorEvent extends chrome.events.Event<(details: ErrorDetails) => void> {}
var settings: chrome.types.ChromeSetting;
/** Notifies about proxy errors. */
@@ -5424,10 +4848,10 @@ declare module chrome.proxy {
// Runtime
////////////////////
/**
- * Use the chrome.runtime API to retrieve the background page, return details about the manifest, and listen for and respond to events in the app or extension lifecycle. You can also use this API to convert the relative path of URLs to fully-qualified URLs.
+ * Use the chrome.runtime API to retrieve the background page, return details about the manifest, and listen for and respond to events in the app or extension lifecycle. You can also use this API to convert the relative path of URLs to fully-qualified URLs.
* @since Chrome 22
*/
-declare module chrome.runtime {
+declare namespace chrome.runtime {
/** This will be defined during an API method callback if there was an error */
var lastError: LastError;
/** The ID of the extension/app. */
@@ -5444,18 +4868,18 @@ declare module chrome.runtime {
interface InstalledDetails {
/**
- * The reason that this event is being dispatched.
- * One of: "install", "update", "chrome_update", or "shared_module_update"
+ * The reason that this event is being dispatched.
+ * One of: "install", "update", "chrome_update", or "shared_module_update"
*/
reason: string;
/**
* Optional.
- * Indicates the previous version of the extension, which has just been updated. This is present only if 'reason' is 'update'.
+ * Indicates the previous version of the extension, which has just been updated. This is present only if 'reason' is 'update'.
*/
previousVersion?: string;
/**
* Optional.
- * Indicates the ID of the imported shared module extension which updated. This is present only if 'reason' is 'shared_module_update'.
+ * Indicates the ID of the imported shared module extension which updated. This is present only if 'reason' is 'shared_module_update'.
* @since Chrome 29.
*/
id?: string;
@@ -5476,17 +4900,17 @@ declare module chrome.runtime {
/** The tabs.Tab which opened the connection, if any. This property will only be present when the connection was opened from a tab (including content scripts), and only if the receiver is an extension, not an app. */
tab?: chrome.tabs.Tab;
/**
- * The frame that opened the connection. 0 for top-level frames, positive for child frames. This will only be set when tab is set.
+ * The frame that opened the connection. 0 for top-level frames, positive for child frames. This will only be set when tab is set.
* @since Chrome 41.
*/
frameId?: number;
/**
- * The URL of the page or frame that opened the connection. If the sender is in an iframe, it will be iframe's URL not the URL of the page which hosts it.
+ * The URL of the page or frame that opened the connection. If the sender is in an iframe, it will be iframe's URL not the URL of the page which hosts it.
* @since Chrome 28.
*/
url?: string;
/**
- * The TLS channel ID of the page or frame that opened the connection, if requested by the extension or app, and if available.
+ * The TLS channel ID of the page or frame that opened the connection, if requested by the extension or app, and if available.
* @since Chrome 32.
*/
tlsChannelId?: string;
@@ -5497,19 +4921,19 @@ declare module chrome.runtime {
* @since Chrome 36.
*/
interface PlatformInfo {
- /**
+ /**
* The operating system chrome is running on.
- * One of: "mac", "win", "android", "cros", "linux", or "openbsd"
+ * One of: "mac", "win", "android", "cros", "linux", or "openbsd"
*/
os: string;
/**
- * The machine's processor architecture.
- * One of: "arm", "x86-32", or "x86-64"
+ * The machine's processor architecture.
+ * One of: "arm", "x86-32", or "x86-64"
*/
arch: string;
/**
- * The native client architecture. This may be different from arch on some platforms.
- * One of: "arm", "x86-32", or "x86-64"
+ * The native client architecture. This may be different from arch on some platforms.
+ * One of: "arm", "x86-32", or "x86-64"
*/
nacl_arch: string;
}
@@ -5523,11 +4947,11 @@ declare module chrome.runtime {
disconnect: () => void;
/**
* Optional.
- * This property will only be present on ports passed to onConnect/onConnectExternal listeners.
+ * This property will only be present on ports passed to onConnect/onConnectExternal listeners.
*/
sender?: MessageSender;
/** An object which allows the addition and removal of listeners for a Chrome event. */
- onDisconnect: chrome.events.Event;
+ onDisconnect: chrome.events.Event<() => void>;
/** An object which allows the addition and removal of listeners for a Chrome event. */
onMessage: PortMessageEvent;
name: string;
@@ -5543,151 +4967,331 @@ declare module chrome.runtime {
version: string;
}
- interface PortMessageEvent extends chrome.events.Event {
- addListener(callback: (message: Object, port: Port) => void): void;
- }
+ interface PortMessageEvent extends chrome.events.Event<(message: Object, port: Port) => void> {}
- interface ExtensionMessageEvent extends chrome.events.Event {
- /**
- * @param callback
- * Optional parameter message: The message sent by the calling script.
- * Parameter sendResponse: Function to call (at most once) when you have a response. The argument should be any JSON-ifiable object. If you have more than one onMessage listener in the same document, then only one may send a response. This function becomes invalid when the event listener returns, unless you return true from the event listener to indicate you wish to send a response asynchronously (this will keep the message channel open to the other end until sendResponse is called).
- */
- addListener(callback: (message: any, sender: MessageSender, sendResponse: Function) => void): void;
- }
+ interface ExtensionMessageEvent extends chrome.events.Event<(message: any, sender: MessageSender, sendResponse: (response: any) => void) => void> {}
- interface ExtensionConnectEvent extends chrome.events.Event {
- addListener(callback: (port: Port) => void): void;
- }
+ interface ExtensionConnectEvent extends chrome.events.Event<(port: Port) => void> {}
- interface RuntimeInstalledEvent extends chrome.events.Event {
- addListener(callback: (details: InstalledDetails) => void): void;
- }
+ interface RuntimeInstalledEvent extends chrome.events.Event<(details: InstalledDetails) => void> {}
- interface RuntimeEvent extends chrome.events.Event {
- addListener(callback: () => void): void;
- }
+ interface RuntimeEvent extends chrome.events.Event<() => void> {}
- interface RuntimeRestartRequiredEvent extends chrome.events.Event {
- /**
- * @param callback
- * Parameter reason: The reason that the event is being dispatched. One of: "app_update", "os_update", or "periodic"
- */
- addListener(callback: (reason: string) => void): void;
- }
+ interface RuntimeRestartRequiredEvent extends chrome.events.Event<(reason: string) => void> {}
- interface RuntimeUpdateAvailableEvent extends chrome.events.Event {
- /**
- * @param callback
- * Parameter details: The manifest details of the available update.
- */
- addListener(callback: (details: UpdateAvailableDetails) => void): void;
- }
+ interface RuntimeUpdateAvailableEvent extends chrome.events.Event<(details: UpdateAvailableDetails) => void> {}
+
+ interface ManifestIcons {
+ [size: number]: string;
+ }
+
+ interface ManifestAction {
+ default_icon?: ManifestIcons;
+ default_title?: string;
+ default_popup?: string;
+ }
+
+ interface SearchProvider {
+ name?: string;
+ keyword?: string;
+ favicon_url?: string;
+ search_url: string;
+ encoding?: string;
+ suggest_url?: string;
+ instant_url?: string;
+ image_url?: string;
+ search_url_post_params?: string;
+ suggest_url_post_params?: string;
+ instant_url_post_params?: string;
+ image_url_post_params?: string;
+ alternate_urls?: string[];
+ prepopulated_id?: number;
+ is_default?: boolean;
+ }
+
+ interface Manifest {
+ // Required
+ manifest_version: number;
+ name: string;
+ version: string;
+
+ // Recommended
+ default_locale?: string;
+ description?: string;
+ icons?: ManifestIcons;
+
+ // Pick one (or none)
+ browser_action?: ManifestAction;
+ page_action?: ManifestAction;
+
+ // Optional
+ author?: any;
+ automation?: any;
+ background?: {
+ scripts?: string[];
+ page?: string;
+ persistent?: boolean;
+ };
+ background_page?: string;
+ chrome_settings_overrides?: {
+ homepage?: string;
+ search_provider?: SearchProvider;
+ startup_pages?: string[];
+ };
+ chrome_ui_overrides?: {
+ bookmarks_ui?: {
+ remove_bookmark_shortcut?: boolean;
+ remove_button?: boolean;
+ }
+ };
+ chrome_url_overrides?: {
+ bookmarks?: string;
+ history?: string;
+ newtab?: string;
+ };
+ commands?: {
+ [name: string]: {
+ suggested_key?: {
+ default?: string;
+ windows?: string;
+ mac?: string;
+ chromeos?: string;
+ linux?: string;
+ };
+ description?: string;
+ global?: boolean
+ }
+ };
+ content_capabilities?: {
+ matches?: string[];
+ permissions?: string[];
+ };
+ content_scripts?: {
+ matches?: string[];
+ exclude_matches?: string[];
+ css?: string[];
+ js?: string[];
+ run_at?: string;
+ all_frames?: boolean;
+ include_globs?: string[];
+ exclude_globs?: string[];
+ }[];
+ content_security_policy?: string;
+ converted_from_user_script?: boolean;
+ copresence?: any;
+ current_locale?: string;
+ devtools_page?: string;
+ event_rules?: {
+ event?: string;
+ actions?: {
+ type: string;
+ }[];
+ conditions?: chrome.declarativeContent.PageStateMatcher[]
+ }[];
+ externally_connectable?: {
+ ids?: string[];
+ matches?: string[];
+ accepts_tls_channel_id?: boolean;
+ };
+ file_browser_handlers?: {
+ id?: string;
+ default_title?: string;
+ file_filters?: string[];
+ }[];
+ file_system_provider_capabilities?: {
+ configurable?: boolean;
+ watchable?: boolean;
+ multiple_mounts?: boolean;
+ source?: string;
+ };
+ homepage_url?: string;
+ import?: {
+ id: string;
+ minimum_version?: string
+ }[];
+ export?: {
+ whitelist?: string[]
+ };
+ incognito?: string;
+ input_components?: {
+ name?: string;
+ type?: string;
+ id?: string;
+ description?: string;
+ language?: string;
+ layouts?: any[];
+ }[];
+ key?: string;
+ minimum_chrome_version?: string;
+ nacl_modules?: {
+ path: string;
+ mime_type: string;
+ }[];
+ oauth2?: {
+ client_id: string;
+ scopes?: string[];
+ };
+ offline_enabled?: boolean;
+ omnibox?: {
+ keyword: string;
+ };
+ optional_permissions?: string[];
+ options_page?: string;
+ options_ui?: {
+ page?: string;
+ chrome_style?: boolean;
+ open_in_tab?: boolean;
+ };
+ permissions?: string[];
+ platforms?: {
+ nacl_arch?: string;
+ sub_package_path: string;
+ }[];
+ plugins?: {
+ path: string;
+ }[];
+ requirements?: {
+ '3D'?: {
+ features?: string[]
+ };
+ plugins?: {
+ npapi?: boolean;
+ }
+ };
+ sandbox?: {
+ pages: string[];
+ content_security_policy?: string;
+ };
+ short_name?: string;
+ signature?: any;
+ spellcheck?: {
+ dictionary_language?: string;
+ dictionary_locale?: string;
+ dictionary_format?: string;
+ dictionary_path?: string;
+ };
+ storage?: {
+ managed_schema: string
+ };
+ system_indicator?: any;
+ tts_engine?: {
+ voices: {
+ voice_name: string;
+ lang?: string;
+ gender?: string;
+ event_types?: string[];
+ }[]
+ };
+ update_url?: string;
+ version_name?: string;
+ web_accessible_resources?: string[];
+ [key: string]: any;
+ }
/**
- * Attempts to connect to connect listeners within an extension/app (such as the background page), or other extensions/apps. This is useful for content scripts connecting to their extension processes, inter-app/extension communication, and web messaging. Note that this does not connect to any listeners in a content script. Extensions may connect to content scripts embedded in tabs via tabs.connect.
+ * Attempts to connect to connect listeners within an extension/app (such as the background page), or other extensions/apps. This is useful for content scripts connecting to their extension processes, inter-app/extension communication, and web messaging. Note that this does not connect to any listeners in a content script. Extensions may connect to content scripts embedded in tabs via tabs.connect.
* @since Chrome 26.
*/
export function connect(connectInfo?: ConnectInfo): Port;
/**
- * Attempts to connect to connect listeners within an extension/app (such as the background page), or other extensions/apps. This is useful for content scripts connecting to their extension processes, inter-app/extension communication, and web messaging. Note that this does not connect to any listeners in a content script. Extensions may connect to content scripts embedded in tabs via tabs.connect.
+ * Attempts to connect to connect listeners within an extension/app (such as the background page), or other extensions/apps. This is useful for content scripts connecting to their extension processes, inter-app/extension communication, and web messaging. Note that this does not connect to any listeners in a content script. Extensions may connect to content scripts embedded in tabs via tabs.connect.
* @since Chrome 26.
* @param extensionId Optional.
- * The ID of the extension or app to connect to. If omitted, a connection will be attempted with your own extension. Required if sending messages from a web page for web messaging.
+ * The ID of the extension or app to connect to. If omitted, a connection will be attempted with your own extension. Required if sending messages from a web page for web messaging.
*/
export function connect(extensionId: string, connectInfo?: ConnectInfo): Port;
/**
- * Connects to a native application in the host machine.
+ * Connects to a native application in the host machine.
* @since Chrome 28.
- * @param application The name of the registered application to connect to.
+ * @param application The name of the registered application to connect to.
*/
export function connectNative(application: string): Port;
/** Retrieves the JavaScript 'window' object for the background page running inside the current extension/app. If the background page is an event page, the system will ensure it is loaded before calling the callback. If there is no background page, an error is set. */
export function getBackgroundPage(callback: (backgroundPage?: Window) => void): void;
/**
- * Returns details about the app or extension from the manifest. The object returned is a serialization of the full manifest file.
+ * Returns details about the app or extension from the manifest. The object returned is a serialization of the full manifest file.
* @returns The manifest details.
*/
- export function getManifest(): Object;
+ export function getManifest(): Manifest;
/**
- * Returns a DirectoryEntry for the package directory.
+ * Returns a DirectoryEntry for the package directory.
* @since Chrome 29.
*/
export function getPackageDirectoryEntry(callback: (directoryEntry: DirectoryEntry) => void): void;
/**
- * Returns information about the current platform.
+ * Returns information about the current platform.
* @since Chrome 29.
- * @param callback Called with results
+ * @param callback Called with results
*/
export function getPlatformInfo(callback: (platformInfo: PlatformInfo) => void): void;
/**
- * Converts a relative path within an app/extension install directory to a fully-qualified URL.
- * @param path A path to a resource within an app/extension expressed relative to its install directory.
+ * Converts a relative path within an app/extension install directory to a fully-qualified URL.
+ * @param path A path to a resource within an app/extension expressed relative to its install directory.
*/
export function getURL(path: string): string;
/**
- * Reloads the app or extension.
+ * Reloads the app or extension.
* @since Chrome 25.
*/
export function reload(): void;
/**
- * Requests an update check for this app/extension.
+ * Requests an update check for this app/extension.
* @since Chrome 25.
* @param callback
- * Parameter status: Result of the update check. One of: "throttled", "no_update", or "update_available"
- * Optional parameter details: If an update is available, this contains more information about the available update.
+ * Parameter status: Result of the update check. One of: "throttled", "no_update", or "update_available"
+ * Optional parameter details: If an update is available, this contains more information about the available update.
*/
export function requestUpdateCheck(callback: (status: string, details?: UpdateCheckDetails) => void): void;
/**
- * Restart the ChromeOS device when the app runs in kiosk mode. Otherwise, it's no-op.
+ * Restart the ChromeOS device when the app runs in kiosk mode. Otherwise, it's no-op.
* @since Chrome 32.
*/
export function restart(): void;
/**
- * Sends a single message to event listeners within your extension/app or a different extension/app. Similar to runtime.connect but only sends a single message, with an optional response. If sending to your extension, the runtime.onMessage event will be fired in each page, or runtime.onMessageExternal, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use tabs.sendMessage.
+ * Sends a single message to event listeners within your extension/app or a different extension/app. Similar to runtime.connect but only sends a single message, with an optional response. If sending to your extension, the runtime.onMessage event will be fired in each page, or runtime.onMessageExternal, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use tabs.sendMessage.
* @since Chrome 26.
* @param responseCallback Optional
- * Parameter response: The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and runtime.lastError will be set to the error message.
+ * Parameter response: The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and runtime.lastError will be set to the error message.
*/
export function sendMessage(message: any, responseCallback?: (response: any) => void): void;
/**
- * Sends a single message to event listeners within your extension/app or a different extension/app. Similar to runtime.connect but only sends a single message, with an optional response. If sending to your extension, the runtime.onMessage event will be fired in each page, or runtime.onMessageExternal, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use tabs.sendMessage.
+ * Sends a single message to event listeners within your extension/app or a different extension/app. Similar to runtime.connect but only sends a single message, with an optional response. If sending to your extension, the runtime.onMessage event will be fired in each page, or runtime.onMessageExternal, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use tabs.sendMessage.
* @since Chrome 32.
* @param responseCallback Optional
- * Parameter response: The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and runtime.lastError will be set to the error message.
+ * Parameter response: The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and runtime.lastError will be set to the error message.
*/
export function sendMessage(message: any, options: MessageOptions, responseCallback?: (response: any) => void): void;
/**
- * Sends a single message to event listeners within your extension/app or a different extension/app. Similar to runtime.connect but only sends a single message, with an optional response. If sending to your extension, the runtime.onMessage event will be fired in each page, or runtime.onMessageExternal, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use tabs.sendMessage.
+ * Sends a single message to event listeners within your extension/app or a different extension/app. Similar to runtime.connect but only sends a single message, with an optional response. If sending to your extension, the runtime.onMessage event will be fired in each page, or runtime.onMessageExternal, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use tabs.sendMessage.
* @since Chrome 26.
* @param extensionId The ID of the extension/app to send the message to. If omitted, the message will be sent to your own extension/app. Required if sending messages from a web page for web messaging.
* @param responseCallback Optional
- * Parameter response: The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and runtime.lastError will be set to the error message.
+ * Parameter response: The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and runtime.lastError will be set to the error message.
*/
export function sendMessage(extensionId: string, message: any, responseCallback?: (response: any) => void): void;
/**
- * Sends a single message to event listeners within your extension/app or a different extension/app. Similar to runtime.connect but only sends a single message, with an optional response. If sending to your extension, the runtime.onMessage event will be fired in each page, or runtime.onMessageExternal, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use tabs.sendMessage.
+ * Sends a single message to event listeners within your extension/app or a different extension/app. Similar to runtime.connect but only sends a single message, with an optional response. If sending to your extension, the runtime.onMessage event will be fired in each page, or runtime.onMessageExternal, if a different extension. Note that extensions cannot send messages to content scripts using this method. To send messages to content scripts, use tabs.sendMessage.
* @since Chrome 32.
* @param extensionId The ID of the extension/app to send the message to. If omitted, the message will be sent to your own extension/app. Required if sending messages from a web page for web messaging.
* @param responseCallback Optional
- * Parameter response: The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and runtime.lastError will be set to the error message.
+ * Parameter response: The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and runtime.lastError will be set to the error message.
*/
export function sendMessage(extensionId: string, message: any, options: MessageOptions, responseCallback?: (response: any) => void): void;
/**
- * Send a single message to a native application.
+ * Send a single message to a native application.
* @since Chrome 28.
* @param application The of the native messaging host.
- * @param message The message that will be passed to the native messaging host.
+ * @param message The message that will be passed to the native messaging host.
* @param responseCallback Optional.
- * Parameter response: The response message sent by the native messaging host. If an error occurs while connecting to the native messaging host, the callback will be called with no arguments and runtime.lastError will be set to the error message.
+ * Parameter response: The response message sent by the native messaging host. If an error occurs while connecting to the native messaging host, the callback will be called with no arguments and runtime.lastError will be set to the error message.
*/
export function sendNativeMessage(application: string, message: Object, responseCallback?: (response: any) => void): void;
/**
- * Sets the URL to be visited upon uninstallation. This may be used to clean up server-side data, do analytics, and implement surveys. Maximum 255 characters.
+ * Sets the URL to be visited upon uninstallation. This may be used to clean up server-side data, do analytics, and implement surveys. Maximum 255 characters.
* @since Chrome 41.
* @param url Since Chrome 34.
- * URL to be opened after the extension is uninstalled. This URL must have an http: or https: scheme. Set an empty string to not open a new tab upon uninstallation.
- * @param callback Called when the uninstall URL is set. If the given URL is invalid, runtime.lastError will be set.
+ * URL to be opened after the extension is uninstalled. This URL must have an http: or https: scheme. Set an empty string to not open a new tab upon uninstallation.
+ * @param callback Called when the uninstall URL is set. If the given URL is invalid, runtime.lastError will be set.
*/
export function setUninstallURL(url: string, callback?: () => void): void;
/**
@@ -5699,19 +5303,19 @@ declare module chrome.runtime {
export function openOptionsPage(callback?: () => void): void;
/**
- * Fired when a connection is made from either an extension process or a content script.
+ * Fired when a connection is made from either an extension process or a content script.
* @since Chrome 26.
*/
var onConnect: ExtensionConnectEvent;
/**
- * Fired when a connection is made from another extension.
+ * Fired when a connection is made from another extension.
* @since Chrome 26.
*/
- var onConnectExternal: RuntimeEvent;
+ var onConnectExternal: ExtensionConnectEvent;
/** Sent to the event page just before it is unloaded. This gives the extension opportunity to do some clean up. Note that since the page is unloading, any asynchronous operations started while handling this event are not guaranteed to complete. If more activity for the event page occurs before it gets unloaded the onSuspendCanceled event will be sent and the page won't be unloaded. */
var onSuspend: RuntimeEvent;
/**
- * Fired when a profile that has this extension installed first starts up. This event is not fired when an incognito profile is started, even if this extension is operating in 'split' incognito mode.
+ * Fired when a profile that has this extension installed first starts up. This event is not fired when an incognito profile is started, even if this extension is operating in 'split' incognito mode.
* @since Chrome 23.
*/
var onStartup: RuntimeEvent;
@@ -5720,28 +5324,28 @@ declare module chrome.runtime {
/** Sent after onSuspend to indicate that the app won't be unloaded after all. */
var onSuspendCanceled: RuntimeEvent;
/**
- * Fired when a message is sent from either an extension process or a content script.
+ * Fired when a message is sent from either an extension process or a content script.
* @since Chrome 26.
*/
var onMessage: ExtensionMessageEvent;
/**
- * Fired when a message is sent from another extension/app. Cannot be used in a content script.
+ * Fired when a message is sent from another extension/app. Cannot be used in a content script.
* @since Chrome 26.
*/
var onMessageExternal: ExtensionMessageEvent;
/**
- * Fired when an app or the device that it runs on needs to be restarted. The app should close all its windows at its earliest convenient time to let the restart to happen. If the app does nothing, a restart will be enforced after a 24-hour grace period has passed. Currently, this event is only fired for Chrome OS kiosk apps.
+ * Fired when an app or the device that it runs on needs to be restarted. The app should close all its windows at its earliest convenient time to let the restart to happen. If the app does nothing, a restart will be enforced after a 24-hour grace period has passed. Currently, this event is only fired for Chrome OS kiosk apps.
* @since Chrome 29.
*/
var onRestartRequired: RuntimeRestartRequiredEvent;
/**
- * Fired when an update is available, but isn't installed immediately because the app is currently running. If you do nothing, the update will be installed the next time the background page gets unloaded, if you want it to be installed sooner you can explicitly call chrome.runtime.reload(). If your extension is using a persistent background page, the background page of course never gets unloaded, so unless you call chrome.runtime.reload() manually in response to this event the update will not get installed until the next time chrome itself restarts. If no handlers are listening for this event, and your extension has a persistent background page, it behaves as if chrome.runtime.reload() is called in response to this event.
+ * Fired when an update is available, but isn't installed immediately because the app is currently running. If you do nothing, the update will be installed the next time the background page gets unloaded, if you want it to be installed sooner you can explicitly call chrome.runtime.reload(). If your extension is using a persistent background page, the background page of course never gets unloaded, so unless you call chrome.runtime.reload() manually in response to this event the update will not get installed until the next time chrome itself restarts. If no handlers are listening for this event, and your extension has a persistent background page, it behaves as if chrome.runtime.reload() is called in response to this event.
* @since Chrome 25.
*/
var onUpdateAvailable: RuntimeUpdateAvailableEvent;
/**
* @deprecated since Chrome 33. Please use chrome.runtime.onRestartRequired.
- * Fired when a Chrome update is available, but isn't installed immediately because a browser restart is required.
+ * Fired when a Chrome update is available, but isn't installed immediately because a browser restart is required.
*/
var onBrowserUpdateAvailable: RuntimeEvent;
}
@@ -5749,7 +5353,7 @@ declare module chrome.runtime {
////////////////////
// Script Badge
////////////////////
-declare module chrome.scriptBadge {
+declare namespace chrome.scriptBadge {
interface GetPopupDetails {
tabId: number;
}
@@ -5763,9 +5367,7 @@ declare module chrome.scriptBadge {
popup: string;
}
- interface ScriptBadgeClickedEvent extends chrome.events.Event {
- addListener(callback: (tab: chrome.tabs.Tab) => void): void;
- }
+ interface ScriptBadgeClickedEvent extends chrome.events.Event<(tab: chrome.tabs.Tab) => void> {}
export function getPopup(details: GetPopupDetails, callback: Function): void;
export function getAttention(details: AttentionDetails): void;
@@ -5778,15 +5380,15 @@ declare module chrome.scriptBadge {
// Sessions
////////////////////
/**
- * Use the chrome.sessions API to query and restore tabs and windows from a browsing session.
- * Permissions: "sessions"
+ * Use the chrome.sessions API to query and restore tabs and windows from a browsing session.
+ * Permissions: "sessions"
* @since Chrome 37.
*/
-declare module chrome.sessions {
+declare namespace chrome.sessions {
interface Filter {
/**
* Optional.
- * The maximum number of entries to be fetched in the requested list. Omit this parameter to fetch the maximum number of entries (sessions.MAX_SESSION_RESULTS).
+ * The maximum number of entries to be fetched in the requested list. Omit this parameter to fetch the maximum number of entries (sessions.MAX_SESSION_RESULTS).
*/
maxResults?: number;
}
@@ -5796,12 +5398,12 @@ declare module chrome.sessions {
lastModified: number;
/**
* Optional.
- * The tabs.Tab, if this entry describes a tab. Either this or sessions.Session.window will be set.
+ * The tabs.Tab, if this entry describes a tab. Either this or sessions.Session.window will be set.
*/
tab?: tabs.Tab;
/**
* Optional.
- * The windows.Window, if this entry describes a window. Either this or sessions.Session.tab will be set.
+ * The windows.Window, if this entry describes a window. Either this or sessions.Session.tab will be set.
*/
window?: windows.Window;
}
@@ -5813,46 +5415,44 @@ declare module chrome.sessions {
sessions: Session[];
}
- interface SessionChangedEvent extends chrome.events.Event {
- addListener(callback: () => void): void;
- }
-
+ interface SessionChangedEvent extends chrome.events.Event<() => void> {}
+
/** The maximum number of sessions.Session that will be included in a requested list. */
export var MAX_SESSION_RESULTS: number;
-
+
/**
- * Gets the list of recently closed tabs and/or windows.
- * @param callback
- * Parameter sessions: The list of closed entries in reverse order that they were closed (the most recently closed tab or window will be at index 0). The entries may contain either tabs or windows.
+ * Gets the list of recently closed tabs and/or windows.
+ * @param callback
+ * Parameter sessions: The list of closed entries in reverse order that they were closed (the most recently closed tab or window will be at index 0). The entries may contain either tabs or windows.
*/
export function getRecentlyClosed(filter: Filter, callback: (sessions: Session[]) => void): void;
/**
- * Gets the list of recently closed tabs and/or windows.
- * @param callback
- * Parameter sessions: The list of closed entries in reverse order that they were closed (the most recently closed tab or window will be at index 0). The entries may contain either tabs or windows.
+ * Gets the list of recently closed tabs and/or windows.
+ * @param callback
+ * Parameter sessions: The list of closed entries in reverse order that they were closed (the most recently closed tab or window will be at index 0). The entries may contain either tabs or windows.
*/
export function getRecentlyClosed(callback: (sessions: Session[]) => void): void;
/**
- * Retrieves all devices with synced sessions.
- * @param callback
- * Parameter devices: The list of sessions.Device objects for each synced session, sorted in order from device with most recently modified session to device with least recently modified session. tabs.Tab objects are sorted by recency in the windows.Window of the sessions.Session objects.
+ * Retrieves all devices with synced sessions.
+ * @param callback
+ * Parameter devices: The list of sessions.Device objects for each synced session, sorted in order from device with most recently modified session to device with least recently modified session. tabs.Tab objects are sorted by recency in the windows.Window of the sessions.Session objects.
*/
export function getDevices(filter: Filter, callback: (devices: Device[]) => void): void;
/**
- * Retrieves all devices with synced sessions.
- * @param callback
- * Parameter devices: The list of sessions.Device objects for each synced session, sorted in order from device with most recently modified session to device with least recently modified session. tabs.Tab objects are sorted by recency in the windows.Window of the sessions.Session objects.
+ * Retrieves all devices with synced sessions.
+ * @param callback
+ * Parameter devices: The list of sessions.Device objects for each synced session, sorted in order from device with most recently modified session to device with least recently modified session. tabs.Tab objects are sorted by recency in the windows.Window of the sessions.Session objects.
*/
export function getDevices(callback: (devices: Device[]) => void): void;
/**
- * Reopens a windows.Window or tabs.Tab, with an optional callback to run when the entry has been restored.
+ * Reopens a windows.Window or tabs.Tab, with an optional callback to run when the entry has been restored.
* @param sessionId Optional.
- * The windows.Window.sessionId, or tabs.Tab.sessionId to restore. If this parameter is not specified, the most recently closed session is restored.
+ * The windows.Window.sessionId, or tabs.Tab.sessionId to restore. If this parameter is not specified, the most recently closed session is restored.
* @param callback Optional.
- * Parameter restoredSession: A sessions.Session containing the restored windows.Window or tabs.Tab object.
+ * Parameter restoredSession: A sessions.Session containing the restored windows.Window or tabs.Tab object.
*/
export function restore(sessionId?: string, callback?: (restoredSession: Session) => void): void;
-
+
/** Fired when recently closed tabs and/or windows are changed. This event does not monitor synced sessions changes. */
export var onChanged: SessionChangedEvent;
}
@@ -5861,85 +5461,85 @@ declare module chrome.sessions {
// Storage
////////////////////
/**
- * Use the chrome.storage API to store, retrieve, and track changes to user data.
- * Permissions: "storage"
+ * Use the chrome.storage API to store, retrieve, and track changes to user data.
+ * Permissions: "storage"
* @since Chrome 20.
*/
-declare module chrome.storage {
+declare namespace chrome.storage {
interface StorageArea {
/**
- * Gets the amount of space (in bytes) being used by one or more items.
- * @param callback Callback with the amount of space being used by storage, or on failure (in which case runtime.lastError will be set).
- * Parameter bytesInUse: Amount of space being used in storage, in bytes.
+ * Gets the amount of space (in bytes) being used by one or more items.
+ * @param callback Callback with the amount of space being used by storage, or on failure (in which case runtime.lastError will be set).
+ * Parameter bytesInUse: Amount of space being used in storage, in bytes.
*/
getBytesInUse(callback: (bytesInUse: number) => void): void;
/**
- * Gets the amount of space (in bytes) being used by one or more items.
- * @param key A single key to get the total usage for. Pass in null to get the total usage of all of storage.
- * @param callback Callback with the amount of space being used by storage, or on failure (in which case runtime.lastError will be set).
- * Parameter bytesInUse: Amount of space being used in storage, in bytes.
+ * Gets the amount of space (in bytes) being used by one or more items.
+ * @param key A single key to get the total usage for. Pass in null to get the total usage of all of storage.
+ * @param callback Callback with the amount of space being used by storage, or on failure (in which case runtime.lastError will be set).
+ * Parameter bytesInUse: Amount of space being used in storage, in bytes.
*/
getBytesInUse(key: string, callback: (bytesInUse: number) => void): void;
/**
- * Gets the amount of space (in bytes) being used by one or more items.
- * @param keys A list of keys to get the total usage for. An empty list will return 0. Pass in null to get the total usage of all of storage.
- * @param callback Callback with the amount of space being used by storage, or on failure (in which case runtime.lastError will be set).
- * Parameter bytesInUse: Amount of space being used in storage, in bytes.
+ * Gets the amount of space (in bytes) being used by one or more items.
+ * @param keys A list of keys to get the total usage for. An empty list will return 0. Pass in null to get the total usage of all of storage.
+ * @param callback Callback with the amount of space being used by storage, or on failure (in which case runtime.lastError will be set).
+ * Parameter bytesInUse: Amount of space being used in storage, in bytes.
*/
getBytesInUse(keys: string[], callback: (bytesInUse: number) => void): void;
/**
- * Removes all items from storage.
+ * Removes all items from storage.
* @param callback Optional.
* Callback on success, or on failure (in which case runtime.lastError will be set).
*/
clear(callback?: () => void): void;
/**
- * Sets multiple items.
+ * Sets multiple items.
* @param items An object which gives each key/value pair to update storage with. Any other key/value pairs in storage will not be affected.
* Primitive values such as numbers will serialize as expected. Values with a typeof "object" and "function" will typically serialize to {}, with the exception of Array (serializes as expected), Date, and Regex (serialize using their String representation).
* @param callback Optional.
- * Callback on success, or on failure (in which case runtime.lastError will be set).
+ * Callback on success, or on failure (in which case runtime.lastError will be set).
*/
set(items: Object, callback?: () => void): void;
/**
* Removes one item from storage.
* @param key A single key for items to remove.
* @param callback Optional.
- * Callback on success, or on failure (in which case runtime.lastError will be set).
+ * Callback on success, or on failure (in which case runtime.lastError will be set).
*/
remove(key: string, callback?: () => void): void;
/**
* Removes items from storage.
* @param keys A list of keys for items to remove.
* @param callback Optional.
- * Callback on success, or on failure (in which case runtime.lastError will be set).
+ * Callback on success, or on failure (in which case runtime.lastError will be set).
*/
remove(keys: string[], callback?: () => void): void;
/**
- * Gets one or more items from storage.
- * @param callback Callback with storage items, or on failure (in which case runtime.lastError will be set).
- * Parameter items: Object with items in their key-value mappings.
+ * Gets one or more items from storage.
+ * @param callback Callback with storage items, or on failure (in which case runtime.lastError will be set).
+ * Parameter items: Object with items in their key-value mappings.
*/
get(callback: (items: { [key: string]: any }) => void): void;
/**
- * Gets one or more items from storage.
- * @param key A single key to get. Pass in null to get the entire contents of storage.
- * @param callback Callback with storage items, or on failure (in which case runtime.lastError will be set).
- * Parameter items: Object with items in their key-value mappings.
+ * Gets one or more items from storage.
+ * @param key A single key to get. Pass in null to get the entire contents of storage.
+ * @param callback Callback with storage items, or on failure (in which case runtime.lastError will be set).
+ * Parameter items: Object with items in their key-value mappings.
*/
get(key: string, callback: (items: { [key: string]: any }) => void): void;
/**
- * Gets one or more items from storage.
- * @param keys A list of keys to get. An empty list or object will return an empty result object. Pass in null to get the entire contents of storage.
- * @param callback Callback with storage items, or on failure (in which case runtime.lastError will be set).
- * Parameter items: Object with items in their key-value mappings.
+ * Gets one or more items from storage.
+ * @param keys A list of keys to get. An empty list or object will return an empty result object. Pass in null to get the entire contents of storage.
+ * @param callback Callback with storage items, or on failure (in which case runtime.lastError will be set).
+ * Parameter items: Object with items in their key-value mappings.
*/
get(keys: string[], callback: (items: { [key: string]: any }) => void): void;
/**
- * Gets one or more items from storage.
- * @param keys A dictionary specifying default values. Pass in null to get the entire contents of storage.
- * @param callback Callback with storage items, or on failure (in which case runtime.lastError will be set).
- * Parameter items: Object with items in their key-value mappings.
+ * Gets one or more items from storage.
+ * @param keys A dictionary specifying default values. Pass in null to get the entire contents of storage.
+ * @param callback Callback with storage items, or on failure (in which case runtime.lastError will be set).
+ * Parameter items: Object with items in their key-value mappings.
*/
get(keys: Object, callback: (items: { [key: string]: any }) => void): void;
}
@@ -5978,14 +5578,7 @@ declare module chrome.storage {
MAX_WRITE_OPERATIONS_PER_MINUTE: number;
}
- interface StorageChangedEvent extends chrome.events.Event {
- /**
- * @param callback
- * Parameter changes: Object mapping each key that changed to its corresponding storage.StorageChange for that item.
- * Parameter areaName: Since Chrome 22. The name of the storage area ("sync", "local" or "managed") the changes are for.
- */
- addListener(callback: (changes: { [key: string]: StorageChange }, areaName: string) => void): void;
- }
+ interface StorageChangedEvent extends chrome.events.Event<(changes: { [key: string]: StorageChange }, areaName: string) => void> {}
/** Items in the local storage area are local to each machine. */
var local: LocalStorageArea;
@@ -5993,7 +5586,7 @@ declare module chrome.storage {
var sync: SyncStorageArea;
/**
- * Items in the managed storage area are set by the domain administrator, and are read-only for the extension; trying to modify this namespace results in an error.
+ * Items in the managed storage area are set by the domain administrator, and are read-only for the extension; trying to modify this namespace results in an error.
* @since Chrome 33.
*/
var managed: StorageArea;
@@ -6005,7 +5598,7 @@ declare module chrome.storage {
////////////////////
// Socket
////////////////////
-declare module chrome.socket {
+declare namespace chrome.socket {
interface CreateInfo {
socketId: number;
}
@@ -6067,10 +5660,10 @@ declare module chrome.socket {
////////////////////
/**
* Use the system.cpu API to query CPU metadata.
- * Permissions: "system.cpu"
+ * Permissions: "system.cpu"
* @since Chrome 32.
*/
-declare module chrome.system.cpu {
+declare namespace chrome.system.cpu {
interface ProcessorUsage {
/** The cumulative time used by userspace programs on this processor. */
user: number;
@@ -6094,15 +5687,15 @@ declare module chrome.system.cpu {
archName: string;
/** The model name of the processors. */
modelName: string;
- /**
- * A set of feature codes indicating some of the processor's capabilities.
- * The currently supported codes are "mmx", "sse", "sse2", "sse3", "ssse3", "sse4_1", "sse4_2", and "avx".
+ /**
+ * A set of feature codes indicating some of the processor's capabilities.
+ * The currently supported codes are "mmx", "sse", "sse2", "sse3", "ssse3", "sse4_1", "sse4_2", and "avx".
*/
features: string[];
/** Information about each logical processor. */
processors: ProcessorInfo[];
}
-
+
/** Queries basic CPU information of the system. */
export function getInfo(callback: (info: CpuInfo) => void): void;
}
@@ -6111,18 +5704,18 @@ declare module chrome.system.cpu {
// System Memory
////////////////////
/**
- * The chrome.system.memory API.
- * Permissions: "system.memory"
+ * The chrome.system.memory API.
+ * Permissions: "system.memory"
* @since Chrome 32.
*/
-declare module chrome.system.memory {
+declare namespace chrome.system.memory {
interface MemoryInfo {
/** The total amount of physical memory capacity, in bytes. */
capacity: number;
/** The amount of available capacity, in bytes. */
availableCapacity: number;
}
-
+
/** Get physical memory information. */
export function getInfo(callback: (info: MemoryInfo) => void): void;
}
@@ -6131,21 +5724,21 @@ declare module chrome.system.memory {
// System Storage
////////////////////
/**
- * Use the chrome.system.storage API to query storage device information and be notified when a removable storage device is attached and detached.
- * Permissions: "system.storage"
+ * Use the chrome.system.storage API to query storage device information and be notified when a removable storage device is attached and detached.
+ * Permissions: "system.storage"
* @since Chrome 30.
*/
-declare module chrome.system.storage {
+declare namespace chrome.system.storage {
interface StorageUnitInfo {
/** The transient ID that uniquely identifies the storage device. This ID will be persistent within the same run of a single application. It will not be a persistent identifier between different runs of an application, or between different applications. */
id: string;
/** The name of the storage unit. */
name: string;
- /**
+ /**
* The media type of the storage unit.
- * fixed: The storage has fixed media, e.g. hard disk or SSD.
- * removable: The storage is removable, e.g. USB flash drive.
- * unknown: The storage type is unknown.
+ * fixed: The storage has fixed media, e.g. hard disk or SSD.
+ * removable: The storage is removable, e.g. USB flash drive.
+ * unknown: The storage type is unknown.
*/
type: string;
/** The total amount of the storage space, in bytes. */
@@ -6159,28 +5752,24 @@ declare module chrome.system.storage {
availableCapacity: number;
}
- interface SystemStorageAttachedEvent extends chrome.events.Event {
- addListener(callback: (info: StorageUnitInfo) => void): void;
- }
+ interface SystemStorageAttachedEvent extends chrome.events.Event<(info: StorageUnitInfo) => void> {}
+
+ interface SystemStorageDetachedEvent extends chrome.events.Event<(id: string) => void> {}
- interface SystemStorageDetachedEvent extends chrome.events.Event {
- addListener(callback: (id: string) => void): void;
- }
-
/** Get the storage information from the system. The argument passed to the callback is an array of StorageUnitInfo objects. */
export function getInfo(callback: (info: StorageUnitInfo[]) => void): void;
/**
- * Ejects a removable storage device.
+ * Ejects a removable storage device.
* @param callback
- * Parameter result: success: The ejection command is successful -- the application can prompt the user to remove the device; in_use: The device is in use by another application. The ejection did not succeed; the user should not remove the device until the other application is done with the device; no_such_device: There is no such device known. failure: The ejection command failed.
+ * Parameter result: success: The ejection command is successful -- the application can prompt the user to remove the device; in_use: The device is in use by another application. The ejection did not succeed; the user should not remove the device until the other application is done with the device; no_such_device: There is no such device known. failure: The ejection command failed.
*/
export function ejectDevice(id: string, callback: (result: string) => void): void;
/**
- * Get the available capacity of a specified |id| storage device. The |id| is the transient device ID from StorageUnitInfo.
+ * Get the available capacity of a specified |id| storage device. The |id| is the transient device ID from StorageUnitInfo.
* @since Dev channel only.
*/
export function getAvailableCapacity(id: string, callback: (info: StorageCapacityInfo) => void): void;
-
+
/** Fired when a new removable storage is attached to the system. */
export var onAttached: SystemStorageAttachedEvent;
/** Fired when a removable storage is detached from the system. */
@@ -6191,16 +5780,16 @@ declare module chrome.system.storage {
// TabCapture
////////////////////
/**
- * Use the chrome.tabCapture API to interact with tab media streams.
- * Permissions: "tabCapture"
+ * Use the chrome.tabCapture API to interact with tab media streams.
+ * Permissions: "tabCapture"
* @since Chrome 31.
*/
-declare module chrome.tabCapture {
+declare namespace chrome.tabCapture {
interface CaptureInfo {
/** The id of the tab whose status changed. */
tabId: number;
/**
- * The new capture status of the tab.
+ * The new capture status of the tab.
* One of: "pending", "active", "stopped", or "error"
*/
status: string;
@@ -6219,26 +5808,20 @@ declare module chrome.tabCapture {
videoConstraints?: MediaStreamConstraints;
}
- interface CaptureStatusChangedEvent extends chrome.events.Event {
- /**
- * @param callback
- * Parameter info: CaptureInfo with new capture status for the tab.
- */
- addListener(callback: (info: CaptureInfo) => void): void;
- }
+ interface CaptureStatusChangedEvent extends chrome.events.Event<(info: CaptureInfo) => void> {}
/**
- * Captures the visible area of the currently active tab. Capture can only be started on the currently active tab after the extension has been invoked. Capture is maintained across page navigations within the tab, and stops when the tab is closed, or the media stream is closed by the extension.
- * @param options Configures the returned media stream.
- * @param callback Callback with either the tab capture stream or null.
+ * Captures the visible area of the currently active tab. Capture can only be started on the currently active tab after the extension has been invoked. Capture is maintained across page navigations within the tab, and stops when the tab is closed, or the media stream is closed by the extension.
+ * @param options Configures the returned media stream.
+ * @param callback Callback with either the tab capture stream or null.
*/
export function capture(options: CaptureOptions, callback: (stream: MediaStream) => void): void;
/**
- * Returns a list of tabs that have requested capture or are being captured, i.e. status != stopped and status != error. This allows extensions to inform the user that there is an existing tab capture that would prevent a new tab capture from succeeding (or to prevent redundant requests for the same tab).
- * @param callback Callback invoked with CaptureInfo[] for captured tabs.
+ * Returns a list of tabs that have requested capture or are being captured, i.e. status != stopped and status != error. This allows extensions to inform the user that there is an existing tab capture that would prevent a new tab capture from succeeding (or to prevent redundant requests for the same tab).
+ * @param callback Callback invoked with CaptureInfo[] for captured tabs.
*/
export function getCapturedTabs(callback: (result: CaptureInfo[]) => void): void;
-
+
/** Event fired when the capture status of a tab changes. This allows extension authors to keep track of the capture status of tabs to keep UI elements like page actions in sync. */
var onStatusChanged: CaptureStatusChangedEvent;
}
@@ -6247,11 +5830,11 @@ declare module chrome.tabCapture {
// Tabs
////////////////////
/**
- * Use the chrome.tabs API to interact with the browser's tab system. You can use this API to create, modify, and rearrange tabs in the browser.
+ * Use the chrome.tabs API to interact with the browser's tab system. You can use this API to create, modify, and rearrange tabs in the browser.
* Permissions: The majority of the chrome.tabs API can be used without declaring any permission. However, the "tabs" permission is required in order to populate the url, title, and favIconUrl properties of Tab.
- * @since Chrome 5.
+ * @since Chrome 5.
*/
-declare module chrome.tabs {
+declare namespace chrome.tabs {
/**
* Tab muted state and the reason for the last state change.
* @since Chrome 46. Warning: this is the current Beta channel.
@@ -6262,14 +5845,14 @@ declare module chrome.tabs {
/**
* Optional.
* The reason the tab was muted or unmuted. Not set if the tab's mute state has never been changed.
- * "user": A user input action has set/overridden the muted state.
- * "capture": Tab capture started, forcing a muted state change.
- * "extension": An extension, identified by the extensionId field, set the muted state.
+ * "user": A user input action has set/overridden the muted state.
+ * "capture": Tab capture started, forcing a muted state change.
+ * "extension": An extension, identified by the extensionId field, set the muted state.
*/
reason?: string;
/**
* Optional.
- * The ID of the extension that changed the muted state. Not set if an extension was not the reason the muted state last changed.
+ * The ID of the extension that changed the muted state. Not set if an extension was not the reason the muted state last changed.
*/
extensionId?: string;
}
@@ -6277,85 +5860,85 @@ declare module chrome.tabs {
interface Tab {
/**
* Optional.
- * Either loading or complete.
+ * Either loading or complete.
*/
status?: string;
/** The zero-based index of the tab within its window. */
index: number;
/**
* Optional.
- * The ID of the tab that opened this tab, if any. This property is only present if the opener tab still exists.
+ * The ID of the tab that opened this tab, if any. This property is only present if the opener tab still exists.
* @since Chrome 18.
*/
openerTabId?: number;
/**
* Optional.
- * The title of the tab. This property is only present if the extension's manifest includes the "tabs" permission.
+ * The title of the tab. This property is only present if the extension's manifest includes the "tabs" permission.
*/
title?: string;
/**
* Optional.
- * The URL the tab is displaying. This property is only present if the extension's manifest includes the "tabs" permission.
+ * The URL the tab is displaying. This property is only present if the extension's manifest includes the "tabs" permission.
*/
url?: string;
/**
- * Whether the tab is pinned.
+ * Whether the tab is pinned.
* @since Chrome 9.
*/
pinned: boolean;
/**
- * Whether the tab is highlighted.
+ * Whether the tab is highlighted.
* @since Chrome 16.
*/
highlighted: boolean;
/** The ID of the window the tab is contained within. */
windowId: number;
/**
- * Whether the tab is active in its window. (Does not necessarily mean the window is focused.)
+ * Whether the tab is active in its window. (Does not necessarily mean the window is focused.)
* @since Chrome 16.
*/
active: boolean;
/**
* Optional.
- * The URL of the tab's favicon. This property is only present if the extension's manifest includes the "tabs" permission. It may also be an empty string if the tab is loading.
+ * The URL of the tab's favicon. This property is only present if the extension's manifest includes the "tabs" permission. It may also be an empty string if the tab is loading.
*/
favIconUrl?: string;
/**
* Optional.
- * The ID of the tab. Tab IDs are unique within a browser session. Under some circumstances a Tab may not be assigned an ID, for example when querying foreign tabs using the sessions API, in which case a session ID may be present. Tab ID can also be set to chrome.tabs.TAB_ID_NONE for apps and devtools windows.
+ * The ID of the tab. Tab IDs are unique within a browser session. Under some circumstances a Tab may not be assigned an ID, for example when querying foreign tabs using the sessions API, in which case a session ID may be present. Tab ID can also be set to chrome.tabs.TAB_ID_NONE for apps and devtools windows.
*/
id?: number;
/** Whether the tab is in an incognito window. */
incognito: boolean;
/**
- * Whether the tab is selected.
- * @deprecated since Chrome 33. Please use tabs.Tab.highlighted.
+ * Whether the tab is selected.
+ * @deprecated since Chrome 33. Please use tabs.Tab.highlighted.
*/
selected: boolean;
/**
* Optional.
- * Whether the tab has produced sound over the past couple of seconds (but it might not be heard if also muted). Equivalent to whether the speaker audio indicator is showing.
+ * Whether the tab has produced sound over the past couple of seconds (but it might not be heard if also muted). Equivalent to whether the speaker audio indicator is showing.
* @since Chrome 45.
*/
audible?: boolean;
/**
* Optional.
- * Current tab muted state and the reason for the last state change.
+ * Current tab muted state and the reason for the last state change.
* @since Chrome 46. Warning: this is the current Beta channel.
*/
mutedInfo?: MutedInfo;
/**
- * Optional. The width of the tab in pixels.
+ * Optional. The width of the tab in pixels.
* @since Chrome 31.
*/
width?: number;
/**
- * Optional. The height of the tab in pixels.
+ * Optional. The height of the tab in pixels.
* @since Chrome 31.
*/
height?: number;
/**
- * Optional. The session ID used to uniquely identify a Tab obtained from the sessions API.
+ * Optional. The session ID used to uniquely identify a Tab obtained from the sessions API.
* @since Chrome 31.
*/
sessionId?: string;
@@ -6368,22 +5951,22 @@ declare module chrome.tabs {
interface ZoomSettings {
/**
* Optional.
- * Defines how zoom changes are handled, i.e. which entity is responsible for the actual scaling of the page; defaults to "automatic".
- * "automatic": Zoom changes are handled automatically by the browser.
- * "manual": Overrides the automatic handling of zoom changes. The onZoomChange event will still be dispatched, and it is the responsibility of the extension to listen for this event and manually scale the page. This mode does not support per-origin zooming, and will thus ignore the scope zoom setting and assume per-tab.
- * "disabled": Disables all zooming in the tab. The tab will revert to the default zoom level, and all attempted zoom changes will be ignored.
+ * Defines how zoom changes are handled, i.e. which entity is responsible for the actual scaling of the page; defaults to "automatic".
+ * "automatic": Zoom changes are handled automatically by the browser.
+ * "manual": Overrides the automatic handling of zoom changes. The onZoomChange event will still be dispatched, and it is the responsibility of the extension to listen for this event and manually scale the page. This mode does not support per-origin zooming, and will thus ignore the scope zoom setting and assume per-tab.
+ * "disabled": Disables all zooming in the tab. The tab will revert to the default zoom level, and all attempted zoom changes will be ignored.
*/
mode?: string;
/**
* Optional.
- * Defines whether zoom changes will persist for the page's origin, or only take effect in this tab; defaults to per-origin when in automatic mode, and per-tab otherwise.
- * "per-origin": Zoom changes will persist in the zoomed page's origin, i.e. all other tabs navigated to that same origin will be zoomed as well. Moreover, per-origin zoom changes are saved with the origin, meaning that when navigating to other pages in the same origin, they will all be zoomed to the same zoom factor. The per-origin scope is only available in the automatic mode.
- * "per-tab": Zoom changes only take effect in this tab, and zoom changes in other tabs will not affect the zooming of this tab. Also, per-tab zoom changes are reset on navigation; navigating a tab will always load pages with their per-origin zoom factors.
+ * Defines whether zoom changes will persist for the page's origin, or only take effect in this tab; defaults to per-origin when in automatic mode, and per-tab otherwise.
+ * "per-origin": Zoom changes will persist in the zoomed page's origin, i.e. all other tabs navigated to that same origin will be zoomed as well. Moreover, per-origin zoom changes are saved with the origin, meaning that when navigating to other pages in the same origin, they will all be zoomed to the same zoom factor. The per-origin scope is only available in the automatic mode.
+ * "per-tab": Zoom changes only take effect in this tab, and zoom changes in other tabs will not affect the zooming of this tab. Also, per-tab zoom changes are reset on navigation; navigating a tab will always load pages with their per-origin zoom factors.
*/
scope?: string;
/**
* Optional.
- * Used to return the default zoom level for the current tab in calls to tabs.getZoomSettings.
+ * Used to return the default zoom level for the current tab in calls to tabs.getZoomSettings.
* @since Chrome 43.
*/
defaultZoomFactor?: number;
@@ -6392,16 +5975,16 @@ declare module chrome.tabs {
interface InjectDetails {
/**
* Optional.
- * If allFrames is true, implies that the JavaScript or CSS should be injected into all frames of current page. By default, it's false and is only injected into the top frame.
+ * If allFrames is true, implies that the JavaScript or CSS should be injected into all frames of current page. By default, it's false and is only injected into the top frame.
*/
allFrames?: boolean;
/**
* Optional. JavaScript or CSS code to inject.
- * Warning: Be careful using the code parameter. Incorrect use of it may open your extension to cross site scripting attacks.
+ * Warning: Be careful using the code parameter. Incorrect use of it may open your extension to cross site scripting attacks.
*/
code?: string;
/**
- * Optional. The soonest that the JavaScript or CSS will be injected into the tab.
+ * Optional. The soonest that the JavaScript or CSS will be injected into the tab.
* One of: "document_start", "document_end", or "document_idle"
* @since Chrome 20.
*/
@@ -6411,7 +5994,7 @@ declare module chrome.tabs {
/**
* Optional.
* If matchAboutBlank is true, then the code is also injected in about:blank and about:srcdoc frames if your extension has access to its parent document. Code cannot be inserted in top-level about:-frames. By default it is false.
- * @since Chrome 39.
+ * @since Chrome 39.
*/
matchAboutBlank?: boolean;
}
@@ -6421,17 +6004,17 @@ declare module chrome.tabs {
index?: number;
/**
* Optional.
- * The ID of the tab that opened this tab. If specified, the opener tab must be in the same window as the newly created tab.
+ * The ID of the tab that opened this tab. If specified, the opener tab must be in the same window as the newly created tab.
* @since Chrome 18.
*/
openerTabId?: number;
/**
* Optional.
- * The URL to navigate the tab to initially. Fully-qualified URLs must include a scheme (i.e. 'http://www.google.com', not 'www.google.com'). Relative URLs will be relative to the current page within the extension. Defaults to the New Tab Page.
+ * The URL to navigate the tab to initially. Fully-qualified URLs must include a scheme (i.e. 'http://www.google.com', not 'www.google.com'). Relative URLs will be relative to the current page within the extension. Defaults to the New Tab Page.
*/
url?: string;
/**
- * Optional. Whether the tab should be pinned. Defaults to false
+ * Optional. Whether the tab should be pinned. Defaults to false
* @since Chrome 9.
*/
pinned?: boolean;
@@ -6439,13 +6022,13 @@ declare module chrome.tabs {
windowId?: number;
/**
* Optional.
- * Whether the tab should become the active tab in the window. Does not affect whether the window is focused (see windows.update). Defaults to true.
+ * Whether the tab should become the active tab in the window. Does not affect whether the window is focused (see windows.update). Defaults to true.
* @since Chrome 16.
*/
active?: boolean;
/**
* Optional. Whether the tab should become the selected tab in the window. Defaults to true
- * @deprecated since Chrome 33. Please use active.
+ * @deprecated since Chrome 33. Please use active.
*/
selected?: boolean;
}
@@ -6458,35 +6041,35 @@ declare module chrome.tabs {
}
interface UpdateProperties {
- /**
- * Optional. Whether the tab should be pinned.
+ /**
+ * Optional. Whether the tab should be pinned.
* @since Chrome 9.
*/
pinned?: boolean;
/**
- * Optional. The ID of the tab that opened this tab. If specified, the opener tab must be in the same window as this tab.
+ * Optional. The ID of the tab that opened this tab. If specified, the opener tab must be in the same window as this tab.
* @since Chrome 18.
*/
openerTabId?: number;
/** Optional. A URL to navigate the tab to. */
url?: string;
/**
- * Optional. Adds or removes the tab from the current selection.
+ * Optional. Adds or removes the tab from the current selection.
* @since Chrome 16.
*/
highlighted?: boolean;
/**
- * Optional. Whether the tab should be active. Does not affect whether the window is focused (see windows.update).
+ * Optional. Whether the tab should be active. Does not affect whether the window is focused (see windows.update).
* @since Chrome 16.
*/
active?: boolean;
/**
- * Optional. Whether the tab should be selected.
- * @deprecated since Chrome 33. Please use highlighted.
+ * Optional. Whether the tab should be selected.
+ * @deprecated since Chrome 33. Please use highlighted.
*/
selected?: boolean;
/**
- * Optional. Whether the tab should be muted.
+ * Optional. Whether the tab should be muted.
* @since Chrome 45.
*/
muted?: boolean;
@@ -6495,11 +6078,11 @@ declare module chrome.tabs {
interface CaptureVisibleTabOptions {
/**
* Optional.
- * When format is "jpeg", controls the quality of the resulting image. This value is ignored for PNG images. As quality is decreased, the resulting image will have more visual artifacts, and the number of bytes needed to store it will decrease.
+ * When format is "jpeg", controls the quality of the resulting image. This value is ignored for PNG images. As quality is decreased, the resulting image will have more visual artifacts, and the number of bytes needed to store it will decrease.
*/
quality?: number;
/**
- * Optional. The format of an image.
+ * Optional. The format of an image.
* One of: "jpeg", or "png"
*/
format?: string;
@@ -6514,7 +6097,7 @@ declare module chrome.tabs {
/** Optional. Will be passed into onConnect for content scripts that are listening for the connection event. */
name?: string;
/**
- * Open a port to a specific frame identified by frameId instead of all frames in the tab.
+ * Open a port to a specific frame identified by frameId instead of all frames in the tab.
* @since Chrome 41.
*/
frameId?: number;
@@ -6535,25 +6118,25 @@ declare module chrome.tabs {
interface QueryInfo {
/**
* Optional. Whether the tabs have completed loading.
- * One of: "loading", or "complete"
+ * One of: "loading", or "complete"
*/
status?: string;
/**
- * Optional. Whether the tabs are in the last focused window.
+ * Optional. Whether the tabs are in the last focused window.
* @since Chrome 19.
*/
lastFocusedWindow?: boolean;
/** Optional. The ID of the parent window, or windows.WINDOW_ID_CURRENT for the current window. */
windowId?: number;
/**
- * Optional. The type of window the tabs are in.
- * One of: "normal", "popup", "panel", "app", or "devtools"
+ * Optional. The type of window the tabs are in.
+ * One of: "normal", "popup", "panel", "app", or "devtools"
*/
windowType?: string;
/** Optional. Whether the tabs are active in their windows. */
active?: boolean;
/**
- * Optional. The position of the tabs within their windows.
+ * Optional. The position of the tabs within their windows.
* @since Chrome 18.
*/
index?: number;
@@ -6562,7 +6145,7 @@ declare module chrome.tabs {
/** Optional. Match tabs against one or more URL patterns. Note that fragment identifiers are not matched. */
url?: string | string[];
/**
- * Optional. Whether the tabs are in the current window.
+ * Optional. Whether the tabs are in the current window.
* @since Chrome 19.
*/
currentWindow?: boolean;
@@ -6571,12 +6154,12 @@ declare module chrome.tabs {
/** Optional. Whether the tabs are pinned. */
pinned?: boolean;
/**
- * Optional. Whether the tabs are audible.
+ * Optional. Whether the tabs are audible.
* @since Chrome 45.
*/
audible?: boolean;
/**
- * Optional. Whether the tabs are muted.
+ * Optional. Whether the tabs are muted.
* @since Chrome 45.
*/
muted?: boolean;
@@ -6589,7 +6172,7 @@ declare module chrome.tabs {
interface TabRemoveInfo {
/**
- * The window whose tab is closed.
+ * The window whose tab is closed.
* @since Chrome 25.
*/
windowId: number;
@@ -6606,27 +6189,32 @@ declare module chrome.tabs {
/** Optional. The status of the tab. Can be either loading or complete. */
status?: string;
/**
- * The tab's new pinned state.
+ * The tab's new pinned state.
* @since Chrome 9.
*/
pinned?: boolean;
/** Optional. The tab's URL if it has changed. */
url?: string;
/**
- * The tab's new audible state.
+ * The tab's new audible state.
* @since Chrome 45.
*/
audible?: boolean;
/**
- * The tab's new muted state and the reason for the change.
+ * The tab's new muted state and the reason for the change.
* @since Chrome 46. Warning: this is the current Beta channel.
*/
mutedInfo?: MutedInfo;
/**
- * The tab's new favicon URL.
+ * The tab's new favicon URL.
* @since Chrome 27.
*/
- faviconUrl?: string;
+ favIconUrl?: string;
+ /**
+ * The tab's new title.
+ * @since Chrome 48.
+ */
+ title?: string;
}
interface TabMoveInfo {
@@ -6659,175 +6247,144 @@ declare module chrome.tabs {
zoomSettings: ZoomSettings;
}
- interface TabHighlightedEvent extends chrome.events.Event {
- addListener(callback: (highlightInfo: HighlightInfo) => void): void;
- }
+ interface TabHighlightedEvent extends chrome.events.Event<(highlightInfo: HighlightInfo) => void> {}
- interface TabRemovedEvent extends chrome.events.Event {
- addListener(callback: (tabId: number, removeInfo: TabRemoveInfo) => void): void;
- }
+ interface TabRemovedEvent extends chrome.events.Event<(tabId: number, removeInfo: TabRemoveInfo) => void> {}
- interface TabUpdatedEvent extends chrome.events.Event {
- /**
- * @param callback
- * Parameter changeInfo: Lists the changes to the state of the tab that was updated.
- * Parameter tab: Gives the state of the tab that was updated.
- */
- addListener(callback: (tabId: number, changeInfo: TabChangeInfo, tab: Tab) => void): void;
- }
+ interface TabUpdatedEvent extends chrome.events.Event<(tabId: number, changeInfo: TabChangeInfo, tab: Tab) => void> {}
- interface TabAttachedEvent extends chrome.events.Event {
- addListener(callback: (tabId: number, attachInfo: TabAttachInfo) => void): void;
- }
+ interface TabAttachedEvent extends chrome.events.Event<(tabId: number, attachInfo: TabAttachInfo) => void> {}
- interface TabMovedEvent extends chrome.events.Event {
- addListener(callback: (tabId: number, moveInfo: TabMoveInfo) => void): void;
- }
+ interface TabMovedEvent extends chrome.events.Event<(tabId: number, moveInfo: TabMoveInfo) => void> {}
- interface TabDetachedEvent extends chrome.events.Event {
- addListener(callback: (tabId: number, detachInfo: TabDetachInfo) => void): void;
- }
+ interface TabDetachedEvent extends chrome.events.Event<(tabId: number, detachInfo: TabDetachInfo) => void> {}
- interface TabCreatedEvent extends chrome.events.Event {
- /**
- * @param callback
- * Parameter tab: Details of the tab that was created.
- */
- addListener(callback: (tab: Tab) => void): void;
- }
+ interface TabCreatedEvent extends chrome.events.Event<(tab: Tab) => void> {}
- interface TabActivatedEvent extends chrome.events.Event {
- addListener(callback: (activeInfo: TabActiveInfo) => void): void;
- }
+ interface TabActivatedEvent extends chrome.events.Event<(activeInfo: TabActiveInfo) => void> {}
- interface TabReplacedEvent extends chrome.events.Event {
- addListener(callback: (addedTabId: number, removedTabId: number) => void): void;
- }
+ interface TabReplacedEvent extends chrome.events.Event<(addedTabId: number, removedTabId: number) => void> {}
- interface TabSelectedEvent extends chrome.events.Event {
- addListener(callback: (tabId: number, selectInfo: TabWindowInfo) => void): void;
- }
+ interface TabSelectedEvent extends chrome.events.Event<(tabId: number, selectInfo: TabWindowInfo) => void> {}
- interface TabZoomChangeEvent extends chrome.events.Event {
- addListener(callback: (ZoomChangeInfo: ZoomChangeInfo) => void): void;
- }
+ interface TabZoomChangeEvent extends chrome.events.Event<(ZoomChangeInfo: ZoomChangeInfo) => void> {}
/**
- * Injects JavaScript code into a page. For details, see the programmatic injection section of the content scripts doc.
- * @param details Details of the script or CSS to inject. Either the code or the file property must be set, but both may not be set at the same time.
+ * Injects JavaScript code into a page. For details, see the programmatic injection section of the content scripts doc.
+ * @param details Details of the script or CSS to inject. Either the code or the file property must be set, but both may not be set at the same time.
* @param callback Optional. Called after all the JavaScript has been executed.
- * Parameter result: The result of the script in every injected frame.
+ * Parameter result: The result of the script in every injected frame.
*/
export function executeScript(details: InjectDetails, callback?: (result: any[]) => void): void;
/**
- * Injects JavaScript code into a page. For details, see the programmatic injection section of the content scripts doc.
- * @param tabId Optional. The ID of the tab in which to run the script; defaults to the active tab of the current window.
- * @param details Details of the script or CSS to inject. Either the code or the file property must be set, but both may not be set at the same time.
+ * Injects JavaScript code into a page. For details, see the programmatic injection section of the content scripts doc.
+ * @param tabId Optional. The ID of the tab in which to run the script; defaults to the active tab of the current window.
+ * @param details Details of the script or CSS to inject. Either the code or the file property must be set, but both may not be set at the same time.
* @param callback Optional. Called after all the JavaScript has been executed.
- * Parameter result: The result of the script in every injected frame.
+ * Parameter result: The result of the script in every injected frame.
*/
export function executeScript(tabId: number, details: InjectDetails, callback?: (result: any[]) => void): void;
/** Retrieves details about the specified tab. */
export function get(tabId: number, callback: (tab: Tab) => void): void;
/**
- * Gets details about all tabs in the specified window.
+ * Gets details about all tabs in the specified window.
* @deprecated since Chrome 33. Please use tabs.query {windowId: windowId}.
*/
export function getAllInWindow(callback: (tab: Tab) => void): void;
/**
- * Gets details about all tabs in the specified window.
+ * Gets details about all tabs in the specified window.
* @deprecated since Chrome 33. Please use tabs.query {windowId: windowId}.
- * @param windowId Optional. Defaults to the current window.
+ * @param windowId Optional. Defaults to the current window.
*/
export function getAllInWindow(windowId: number, callback: (tab: Tab) => void): void;
/** Gets the tab that this script call is being made from. May be undefined if called from a non-tab context (for example: a background page or popup view). */
export function getCurrent(callback: (tab?: Tab) => void): void;
/**
- * Gets the tab that is selected in the specified window.
+ * Gets the tab that is selected in the specified window.
* @deprecated since Chrome 33. Please use tabs.query {active: true}.
*/
export function getSelected(callback: (tab: Tab) => void): void;
/**
- * Gets the tab that is selected in the specified window.
+ * Gets the tab that is selected in the specified window.
* @deprecated since Chrome 33. Please use tabs.query {active: true}.
- * @param windowId Optional. Defaults to the current window.
+ * @param windowId Optional. Defaults to the current window.
*/
export function getSelected(windowId: number, callback: (tab: Tab) => void): void;
/**
- * Creates a new tab.
+ * Creates a new tab.
* @param callback Optional.
- * Parameter tab: Details about the created tab. Will contain the ID of the new tab.
+ * Parameter tab: Details about the created tab. Will contain the ID of the new tab.
*/
export function create(createProperties: CreateProperties, callback?: (tab: Tab) => void): void;
/**
- * Moves one or more tabs to a new position within its window, or to a new window. Note that tabs can only be moved to and from normal (window.type === "normal") windows.
+ * Moves one or more tabs to a new position within its window, or to a new window. Note that tabs can only be moved to and from normal (window.type === "normal") windows.
* @param tabId The tab to move.
* @param callback Optional.
* Parameter tab: Details about the moved tab.
*/
export function move(tabId: number, moveProperties: MoveProperties, callback?: (tab: Tab) => void): void;
/**
- * Moves one or more tabs to a new position within its window, or to a new window. Note that tabs can only be moved to and from normal (window.type === "normal") windows.
+ * Moves one or more tabs to a new position within its window, or to a new window. Note that tabs can only be moved to and from normal (window.type === "normal") windows.
* @param tabIds The tabs to move.
* @param callback Optional.
* Parameter tabs: Details about the moved tabs.
*/
export function move(tabIds: number[], moveProperties: MoveProperties, callback?: (tabs: Tab[]) => void): void;
/**
- * Modifies the properties of a tab. Properties that are not specified in updateProperties are not modified.
+ * Modifies the properties of a tab. Properties that are not specified in updateProperties are not modified.
* @param callback Optional.
- * Optional parameter tab: Details about the updated tab. The tabs.Tab object doesn't contain url, title and favIconUrl if the "tabs" permission has not been requested.
+ * Optional parameter tab: Details about the updated tab. The tabs.Tab object doesn't contain url, title and favIconUrl if the "tabs" permission has not been requested.
*/
export function update(updateProperties: UpdateProperties, callback?: (tab?: Tab) => void): void;
/**
- * Modifies the properties of a tab. Properties that are not specified in updateProperties are not modified.
- * @param tabId Defaults to the selected tab of the current window.
+ * Modifies the properties of a tab. Properties that are not specified in updateProperties are not modified.
+ * @param tabId Defaults to the selected tab of the current window.
* @param callback Optional.
- * Optional parameter tab: Details about the updated tab. The tabs.Tab object doesn't contain url, title and favIconUrl if the "tabs" permission has not been requested.
+ * Optional parameter tab: Details about the updated tab. The tabs.Tab object doesn't contain url, title and favIconUrl if the "tabs" permission has not been requested.
*/
export function update(tabId: number, updateProperties: UpdateProperties, callback?: (tab?: Tab) => void): void;
/**
* Closes a tab.
- * @param tabId The tab to close.
+ * @param tabId The tab to close.
*/
export function remove(tabId: number, callback?: Function): void;
/**
* Closes several tabs.
- * @param tabIds The list of tabs to close.
+ * @param tabIds The list of tabs to close.
*/
export function remove(tabIds: number[], callback?: Function): void;
/**
- * Captures the visible area of the currently active tab in the specified window. You must have <all_urls> permission to use this method.
- * @param callback
- * Parameter dataUrl: A data URL which encodes an image of the visible area of the captured tab. May be assigned to the 'src' property of an HTML Image element for display.
+ * Captures the visible area of the currently active tab in the specified window. You must have <all_urls> permission to use this method.
+ * @param callback
+ * Parameter dataUrl: A data URL which encodes an image of the visible area of the captured tab. May be assigned to the 'src' property of an HTML Image element for display.
*/
export function captureVisibleTab(callback: (dataUrl: string) => void): void;
/**
- * Captures the visible area of the currently active tab in the specified window. You must have <all_urls> permission to use this method.
+ * Captures the visible area of the currently active tab in the specified window. You must have <all_urls> permission to use this method.
* @param windowId Optional. The target window. Defaults to the current window.
- * @param callback
- * Parameter dataUrl: A data URL which encodes an image of the visible area of the captured tab. May be assigned to the 'src' property of an HTML Image element for display.
+ * @param callback
+ * Parameter dataUrl: A data URL which encodes an image of the visible area of the captured tab. May be assigned to the 'src' property of an HTML Image element for display.
*/
export function captureVisibleTab(windowId: number, callback: (dataUrl: string) => void): void;
/**
- * Captures the visible area of the currently active tab in the specified window. You must have <all_urls> permission to use this method.
- * @param options Optional. Details about the format and quality of an image.
- * @param callback
- * Parameter dataUrl: A data URL which encodes an image of the visible area of the captured tab. May be assigned to the 'src' property of an HTML Image element for display.
+ * Captures the visible area of the currently active tab in the specified window. You must have <all_urls> permission to use this method.
+ * @param options Optional. Details about the format and quality of an image.
+ * @param callback
+ * Parameter dataUrl: A data URL which encodes an image of the visible area of the captured tab. May be assigned to the 'src' property of an HTML Image element for display.
*/
export function captureVisibleTab(options: CaptureVisibleTabOptions, callback: (dataUrl: string) => void): void;
/**
- * Captures the visible area of the currently active tab in the specified window. You must have <all_urls> permission to use this method.
+ * Captures the visible area of the currently active tab in the specified window. You must have <all_urls> permission to use this method.
* @param windowId Optional. The target window. Defaults to the current window.
- * @param options Optional. Details about the format and quality of an image.
- * @param callback
- * Parameter dataUrl: A data URL which encodes an image of the visible area of the captured tab. May be assigned to the 'src' property of an HTML Image element for display.
+ * @param options Optional. Details about the format and quality of an image.
+ * @param callback
+ * Parameter dataUrl: A data URL which encodes an image of the visible area of the captured tab. May be assigned to the 'src' property of an HTML Image element for display.
*/
export function captureVisibleTab(windowId: number, options: CaptureVisibleTabOptions, callback: (dataUrl: string) => void): void;
/**
* Reload a tab.
* @since Chrome 16.
- * @param tabId The ID of the tab to reload; defaults to the selected tab of the current window.
+ * @param tabId The ID of the tab to reload; defaults to the selected tab of the current window.
*/
export function reload(tabId: number, reloadProperties?: ReloadProperties, callback?: () => void): void;
/**
@@ -6841,28 +6398,28 @@ declare module chrome.tabs {
*/
export function reload(callback?: () => void): void;
/**
- * Duplicates a tab.
+ * Duplicates a tab.
* @since Chrome 23.
- * @param tabId The ID of the tab which is to be duplicated.
+ * @param tabId The ID of the tab which is to be duplicated.
* @param callback Optional.
- * Optional parameter tab: Details about the duplicated tab. The tabs.Tab object doesn't contain url, title and favIconUrl if the "tabs" permission has not been requested.
+ * Optional parameter tab: Details about the duplicated tab. The tabs.Tab object doesn't contain url, title and favIconUrl if the "tabs" permission has not been requested.
*/
export function duplicate(tabId: number, callback?: (tab?: Tab) => void): void;
/**
* Sends a single message to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The runtime.onMessage event is fired in each content script running in the specified tab for the current extension.
- * @since Chrome 20.
+ * @since Chrome 20.
*/
export function sendMessage(tabId: number, message: any, responseCallback?: (response: any) => void): void;
/**
* Sends a single message to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The runtime.onMessage event is fired in each content script running in the specified tab for the current extension.
- * @since Chrome 41.
+ * @since Chrome 41.
* @param responseCallback Optional.
- * Parameter response: The JSON response object sent by the handler of the message. If an error occurs while connecting to the specified tab, the callback will be called with no arguments and runtime.lastError will be set to the error message.
+ * Parameter response: The JSON response object sent by the handler of the message. If an error occurs while connecting to the specified tab, the callback will be called with no arguments and runtime.lastError will be set to the error message.
*/
export function sendMessage(tabId: number, message: any, options: MessageSendOptions, responseCallback?: (response: any) => void): void;
/**
- * Sends a single request to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The extension.onRequest event is fired in each content script running in the specified tab for the current extension.
- * @deprecated since Chrome 33. Please use runtime.sendMessage.
+ * Sends a single request to the content script(s) in the specified tab, with an optional callback to run when a response is sent back. The extension.onRequest event is fired in each content script running in the specified tab for the current extension.
+ * @deprecated since Chrome 33. Please use runtime.sendMessage.
* @param responseCallback Optional.
* Parameter response: The JSON response object sent by the handler of the request. If an error occurs while connecting to the specified tab, the callback will be called with no arguments and runtime.lastError will be set to the error message.
*/
@@ -6871,105 +6428,105 @@ declare module chrome.tabs {
export function connect(tabId: number, connectInfo?: ConnectInfo): runtime.Port;
/**
* Injects CSS into a page. For details, see the programmatic injection section of the content scripts doc.
- * @param details Details of the script or CSS to inject. Either the code or the file property must be set, but both may not be set at the same time.
- * @param callback Optional. Called when all the CSS has been inserted.
+ * @param details Details of the script or CSS to inject. Either the code or the file property must be set, but both may not be set at the same time.
+ * @param callback Optional. Called when all the CSS has been inserted.
*/
export function insertCSS(details: InjectDetails, callback?: Function): void;
/**
* Injects CSS into a page. For details, see the programmatic injection section of the content scripts doc.
- * @param tabId Optional. The ID of the tab in which to insert the CSS; defaults to the active tab of the current window.
- * @param details Details of the script or CSS to inject. Either the code or the file property must be set, but both may not be set at the same time.
- * @param callback Optional. Called when all the CSS has been inserted.
+ * @param tabId Optional. The ID of the tab in which to insert the CSS; defaults to the active tab of the current window.
+ * @param details Details of the script or CSS to inject. Either the code or the file property must be set, but both may not be set at the same time.
+ * @param callback Optional. Called when all the CSS has been inserted.
*/
export function insertCSS(tabId: number, details: InjectDetails, callback?: Function): void;
/**
- * Highlights the given tabs.
+ * Highlights the given tabs.
* @since Chrome 16.
* @param callback Optional.
- * Parameter window: Contains details about the window whose tabs were highlighted.
+ * Parameter window: Contains details about the window whose tabs were highlighted.
*/
export function highlight(highlightInfo: HighlightInfo, callback: (window: chrome.windows.Window) => void): void;
/**
- * Gets all tabs that have the specified properties, or all tabs if no properties are specified.
+ * Gets all tabs that have the specified properties, or all tabs if no properties are specified.
* @since Chrome 16.
*/
export function query(queryInfo: QueryInfo, callback: (result: Tab[]) => void): void;
/**
- * Detects the primary language of the content in a tab.
- * @param callback
- * Parameter language: An ISO language code such as en or fr. For a complete list of languages supported by this method, see kLanguageInfoTable. The 2nd to 4th columns will be checked and the first non-NULL value will be returned except for Simplified Chinese for which zh-CN will be returned. For an unknown language, und will be returned.
+ * Detects the primary language of the content in a tab.
+ * @param callback
+ * Parameter language: An ISO language code such as en or fr. For a complete list of languages supported by this method, see kLanguageInfoTable. The 2nd to 4th columns will be checked and the first non-NULL value will be returned except for Simplified Chinese for which zh-CN will be returned. For an unknown language, und will be returned.
*/
export function detectLanguage(callback: (language: string) => void): void;
/**
* Detects the primary language of the content in a tab.
- * @param tabId Optional. Defaults to the active tab of the current window.
- * @param callback
- * Parameter language: An ISO language code such as en or fr. For a complete list of languages supported by this method, see kLanguageInfoTable. The 2nd to 4th columns will be checked and the first non-NULL value will be returned except for Simplified Chinese for which zh-CN will be returned. For an unknown language, und will be returned.
+ * @param tabId Optional. Defaults to the active tab of the current window.
+ * @param callback
+ * Parameter language: An ISO language code such as en or fr. For a complete list of languages supported by this method, see kLanguageInfoTable. The 2nd to 4th columns will be checked and the first non-NULL value will be returned except for Simplified Chinese for which zh-CN will be returned. For an unknown language, und will be returned.
*/
export function detectLanguage(tabId: number, callback: (language: string) => void): void;
/**
* Zooms a specified tab.
* @since Chrome 42.
- * @param zoomFactor The new zoom factor. Use a value of 0 here to set the tab to its current default zoom factor. Values greater than zero specify a (possibly non-default) zoom factor for the tab.
- * @param callback Optional. Called after the zoom factor has been changed.
+ * @param zoomFactor The new zoom factor. Use a value of 0 here to set the tab to its current default zoom factor. Values greater than zero specify a (possibly non-default) zoom factor for the tab.
+ * @param callback Optional. Called after the zoom factor has been changed.
*/
export function setZoom(zoomFactor: number, callback?: () => void): void;
/**
* Zooms a specified tab.
* @since Chrome 42.
* @param tabId Optional. The ID of the tab to zoom; defaults to the active tab of the current window.
- * @param zoomFactor The new zoom factor. Use a value of 0 here to set the tab to its current default zoom factor. Values greater than zero specify a (possibly non-default) zoom factor for the tab.
- * @param callback Optional. Called after the zoom factor has been changed.
+ * @param zoomFactor The new zoom factor. Use a value of 0 here to set the tab to its current default zoom factor. Values greater than zero specify a (possibly non-default) zoom factor for the tab.
+ * @param callback Optional. Called after the zoom factor has been changed.
*/
export function setZoom(tabId: number, zoomFactor: number, callback?: () => void): void;
/**
- * Gets the current zoom factor of a specified tab.
+ * Gets the current zoom factor of a specified tab.
* @since Chrome 42.
- * @param callback Called with the tab's current zoom factor after it has been fetched.
- * Parameter zoomFactor: The tab's current zoom factor.
+ * @param callback Called with the tab's current zoom factor after it has been fetched.
+ * Parameter zoomFactor: The tab's current zoom factor.
*/
export function getZoom(callback: (zoomFactor: number) => void): void;
/**
- * Gets the current zoom factor of a specified tab.
+ * Gets the current zoom factor of a specified tab.
* @since Chrome 42.
- * @param tabId Optional. The ID of the tab to get the current zoom factor from; defaults to the active tab of the current window.
- * @param callback Called with the tab's current zoom factor after it has been fetched.
- * Parameter zoomFactor: The tab's current zoom factor.
+ * @param tabId Optional. The ID of the tab to get the current zoom factor from; defaults to the active tab of the current window.
+ * @param callback Called with the tab's current zoom factor after it has been fetched.
+ * Parameter zoomFactor: The tab's current zoom factor.
*/
export function getZoom(tabId: number, callback: (zoomFactor: number) => void): void;
/**
- * Sets the zoom settings for a specified tab, which define how zoom changes are handled. These settings are reset to defaults upon navigating the tab.
+ * Sets the zoom settings for a specified tab, which define how zoom changes are handled. These settings are reset to defaults upon navigating the tab.
* @since Chrome 42.
- * @param zoomSettings Defines how zoom changes are handled and at what scope.
- * @param callback Optional. Called after the zoom settings have been changed.
+ * @param zoomSettings Defines how zoom changes are handled and at what scope.
+ * @param callback Optional. Called after the zoom settings have been changed.
*/
export function setZoomSettings(zoomSettings: ZoomSettings, callback?: () => void): void;
/**
- * Sets the zoom settings for a specified tab, which define how zoom changes are handled. These settings are reset to defaults upon navigating the tab.
+ * Sets the zoom settings for a specified tab, which define how zoom changes are handled. These settings are reset to defaults upon navigating the tab.
* @since Chrome 42.
- * @param tabId Optional. The ID of the tab to change the zoom settings for; defaults to the active tab of the current window.
- * @param zoomSettings Defines how zoom changes are handled and at what scope.
- * @param callback Optional. Called after the zoom settings have been changed.
+ * @param tabId Optional. The ID of the tab to change the zoom settings for; defaults to the active tab of the current window.
+ * @param zoomSettings Defines how zoom changes are handled and at what scope.
+ * @param callback Optional. Called after the zoom settings have been changed.
*/
export function setZoomSettings(tabId: number, zoomSettings: ZoomSettings, callback?: () => void): void;
/**
- * Gets the current zoom settings of a specified tab.
+ * Gets the current zoom settings of a specified tab.
* @since Chrome 42.
- * @param callback Called with the tab's current zoom settings.
- * Paramater zoomSettings: The tab's current zoom settings.
+ * @param callback Called with the tab's current zoom settings.
+ * Paramater zoomSettings: The tab's current zoom settings.
*/
export function getZoomSettings(callback: (zoomSettings: ZoomSettings) => void): void;
/**
- * Gets the current zoom settings of a specified tab.
+ * Gets the current zoom settings of a specified tab.
* @since Chrome 42.
- * @param tabId Optional. The ID of the tab to get the current zoom settings from; defaults to the active tab of the current window.
- * @param callback Called with the tab's current zoom settings.
- * Paramater zoomSettings: The tab's current zoom settings.
+ * @param tabId Optional. The ID of the tab to get the current zoom settings from; defaults to the active tab of the current window.
+ * @param callback Called with the tab's current zoom settings.
+ * Paramater zoomSettings: The tab's current zoom settings.
*/
export function getZoomSettings(tabId: number, callback: (zoomSettings: ZoomSettings) => void): void;
/**
- * Fired when the highlighted or selected tabs in a window changes.
+ * Fired when the highlighted or selected tabs in a window changes.
* @since Chrome 18.
*/
var onHighlighted: TabHighlightedEvent;
@@ -6980,7 +6537,7 @@ declare module chrome.tabs {
/** Fired when a tab is attached to a window, for example because it was moved between windows. */
var onAttached: TabAttachedEvent;
/**
- * Fired when a tab is moved within a window. Only one move event is fired, representing the tab the user directly moved. Move events are not fired for the other tabs that must move in response. This event is not fired when a tab is moved between windows. For that, see tabs.onDetached.
+ * Fired when a tab is moved within a window. Only one move event is fired, representing the tab the user directly moved. Move events are not fired for the other tabs that must move in response. This event is not fired when a tab is moved between windows. For that, see tabs.onDetached.
*/
var onMoved: TabMovedEvent;
/** Fired when a tab is detached from a window, for example because it is being moved between windows. */
@@ -6988,32 +6545,32 @@ declare module chrome.tabs {
/** Fired when a tab is created. Note that the tab's URL may not be set at the time this event fired, but you can listen to onUpdated events to be notified when a URL is set. */
var onCreated: TabCreatedEvent;
/**
- * Fires when the active tab in a window changes. Note that the tab's URL may not be set at the time this event fired, but you can listen to onUpdated events to be notified when a URL is set.
+ * Fires when the active tab in a window changes. Note that the tab's URL may not be set at the time this event fired, but you can listen to onUpdated events to be notified when a URL is set.
* @since Chrome 18.
*/
var onActivated: TabActivatedEvent;
/**
- * Fired when a tab is replaced with another tab due to prerendering or instant.
+ * Fired when a tab is replaced with another tab due to prerendering or instant.
* @since Chrome 26.
*/
var onReplaced: TabReplacedEvent;
/**
* @deprecated since Chrome 33. Please use tabs.onActivated.
- * Fires when the selected tab in a window changes.
+ * Fires when the selected tab in a window changes.
*/
var onSelectionChanged: TabSelectedEvent;
/**
* @deprecated since Chrome 33. Please use tabs.onActivated.
- * Fires when the selected tab in a window changes. Note that the tab's URL may not be set at the time this event fired, but you can listen to tabs.onUpdated events to be notified when a URL is set.
+ * Fires when the selected tab in a window changes. Note that the tab's URL may not be set at the time this event fired, but you can listen to tabs.onUpdated events to be notified when a URL is set.
*/
var onActiveChanged: TabSelectedEvent;
/**
- * @deprecated since Chrome 33. Please use tabs.onHighlighted.
- * Fired when the highlighted or selected tabs in a window changes.
+ * @deprecated since Chrome 33. Please use tabs.onHighlighted.
+ * Fired when the highlighted or selected tabs in a window changes.
*/
var onHighlightChanged: TabHighlightedEvent;
/**
- * Fired when a tab is zoomed.
+ * Fired when a tab is zoomed.
* @since Chrome 38.
*/
var onZoomChange: TabZoomChangeEvent;
@@ -7023,11 +6580,11 @@ declare module chrome.tabs {
// Top Sites
////////////////////
/**
- * Use the chrome.topSites API to access the top sites that are displayed on the new tab page.
- * Permissions: "topSites"
+ * Use the chrome.topSites API to access the top sites that are displayed on the new tab page.
+ * Permissions: "topSites"
* @since Chrome 19.
*/
-declare module chrome.topSites {
+declare namespace chrome.topSites {
/** An object encapsulating a most visited URL, such as the URLs on the new tab page. */
interface MostVisitedURL {
/** The most visited URL. */
@@ -7044,11 +6601,11 @@ declare module chrome.topSites {
// Text to Speech
////////////////////
/**
- * Use the chrome.tts API to play synthesized text-to-speech (TTS). See also the related ttsEngine API, which allows an extension to implement a speech engine.
- * Permissions: "tts"
+ * Use the chrome.tts API to play synthesized text-to-speech (TTS). See also the related ttsEngine API, which allows an extension to implement a speech engine.
+ * Permissions: "tts"
* @since Chrome 14.
*/
-declare module chrome.tts {
+declare namespace chrome.tts {
/** An event from the TTS engine to communicate the status of an utterance. */
interface TtsEvent {
/** Optional. The index of the current character in the utterance. */
@@ -7056,7 +6613,7 @@ declare module chrome.tts {
/** Optional. The error description, if the event type is 'error'. */
errorMessage?: string;
/**
- * The type can be 'start' as soon as speech has started, 'word' when a word boundary is reached, 'sentence' when a sentence boundary is reached, 'marker' when an SSML mark element is reached, 'end' when the end of the utterance is reached, 'interrupted' when the utterance is stopped or interrupted before reaching the end, 'cancelled' when it's removed from the queue before ever being synthesized, or 'error' when any other error occurs. When pausing speech, a 'pause' event is fired if a particular utterance is paused in the middle, and 'resume' if an utterance resumes speech. Note that pause and resume events may not fire if speech is paused in-between utterances.
+ * The type can be 'start' as soon as speech has started, 'word' when a word boundary is reached, 'sentence' when a sentence boundary is reached, 'marker' when an SSML mark element is reached, 'end' when the end of the utterance is reached, 'interrupted' when the utterance is stopped or interrupted before reaching the end, 'cancelled' when it's removed from the queue before ever being synthesized, or 'error' when any other error occurs. When pausing speech, a 'pause' event is fired if a particular utterance is paused in the middle, and 'resume' if an utterance resumes speech. Note that pause and resume events may not fire if speech is paused in-between utterances.
* One of: "start", "end", "word", "sentence", "marker", "interrupted", "cancelled", "error", "pause", or "resume"
*/
type: string;
@@ -7066,9 +6623,9 @@ declare module chrome.tts {
interface TtsVoice {
/** Optional. The language that this voice supports, in the form language-region. Examples: 'en', 'en-US', 'en-GB', 'zh-CN'. */
lang?: string;
- /**
+ /**
* Optional. This voice's gender.
- * One of: "male", or "female"
+ * One of: "male", or "female"
*/
gender?: string;
/** Optional. The name of the voice. */
@@ -7078,7 +6635,7 @@ declare module chrome.tts {
/** All of the callback event types that this voice is capable of sending. */
eventTypes?: string[];
/**
- * If true, the synthesis engine is a remote network resource. It may be higher latency and may incur bandwidth costs.
+ * If true, the synthesis engine is a remote network resource. It may be higher latency and may incur bandwidth costs.
* @since Chrome 33.
*/
remote?: boolean;
@@ -7089,22 +6646,22 @@ declare module chrome.tts {
volume?: number;
/**
* Optional.
- * If true, enqueues this utterance if TTS is already in progress. If false (the default), interrupts any current speech and flushes the speech queue before speaking this new utterance.
+ * If true, enqueues this utterance if TTS is already in progress. If false (the default), interrupts any current speech and flushes the speech queue before speaking this new utterance.
*/
enqueue?: boolean;
/**
* Optional.
- * Speaking rate relative to the default rate for this voice. 1.0 is the default rate, normally around 180 to 220 words per minute. 2.0 is twice as fast, and 0.5 is half as fast. Values below 0.1 or above 10.0 are strictly disallowed, but many voices will constrain the minimum and maximum rates further—for example a particular voice may not actually speak faster than 3 times normal even if you specify a value larger than 3.0.
+ * Speaking rate relative to the default rate for this voice. 1.0 is the default rate, normally around 180 to 220 words per minute. 2.0 is twice as fast, and 0.5 is half as fast. Values below 0.1 or above 10.0 are strictly disallowed, but many voices will constrain the minimum and maximum rates further—for example a particular voice may not actually speak faster than 3 times normal even if you specify a value larger than 3.0.
*/
rate?: number;
- /**
+ /**
* Optional. This function is called with events that occur in the process of speaking the utterance.
- * @param event The update event from the text-to-speech engine indicating the status of this utterance.
+ * @param event The update event from the text-to-speech engine indicating the status of this utterance.
*/
onEvent?: (event: TtsEvent) => void;
/**
* Optional.
- * Speaking pitch between 0 and 2 inclusive, with 0 being lowest and 2 being highest. 1.0 corresponds to a voice's default pitch.
+ * Speaking pitch between 0 and 2 inclusive, with 0 being lowest and 2 being highest. 1.0 corresponds to a voice's default pitch.
*/
pitch?: number;
/** Optional. The language to be used for synthesis, in the form language-region. Examples: 'en', 'en-US', 'en-GB', 'zh-CN'. */
@@ -7114,8 +6671,8 @@ declare module chrome.tts {
/** Optional. The extension ID of the speech engine to use, if known. */
extensionId?: string;
/**
- * Optional. Gender of voice for synthesized speech.
- * One of: "male", or "female"
+ * Optional. Gender of voice for synthesized speech.
+ * One of: "male", or "female"
*/
gender?: string;
/** Optional. The TTS event types the voice must support. */
@@ -7131,25 +6688,25 @@ declare module chrome.tts {
/** Gets an array of all available voices. */
export function getVoices(callback?: (voices: TtsVoice[]) => void): void;
/**
- * Speaks text using a text-to-speech engine.
- * @param utterance The text to speak, either plain text or a complete, well-formed SSML document. Speech engines that do not support SSML will strip away the tags and speak the text. The maximum length of the text is 32,768 characters.
- * @param callback Optional. Called right away, before speech finishes. Check chrome.runtime.lastError to make sure there were no errors. Use options.onEvent to get more detailed feedback.
+ * Speaks text using a text-to-speech engine.
+ * @param utterance The text to speak, either plain text or a complete, well-formed SSML document. Speech engines that do not support SSML will strip away the tags and speak the text. The maximum length of the text is 32,768 characters.
+ * @param callback Optional. Called right away, before speech finishes. Check chrome.runtime.lastError to make sure there were no errors. Use options.onEvent to get more detailed feedback.
*/
export function speak(utterance: string, callback?: Function): void;
/**
- * Speaks text using a text-to-speech engine.
- * @param utterance The text to speak, either plain text or a complete, well-formed SSML document. Speech engines that do not support SSML will strip away the tags and speak the text. The maximum length of the text is 32,768 characters.
- * @param options Optional. The speech options.
- * @param callback Optional. Called right away, before speech finishes. Check chrome.runtime.lastError to make sure there were no errors. Use options.onEvent to get more detailed feedback.
+ * Speaks text using a text-to-speech engine.
+ * @param utterance The text to speak, either plain text or a complete, well-formed SSML document. Speech engines that do not support SSML will strip away the tags and speak the text. The maximum length of the text is 32,768 characters.
+ * @param options Optional. The speech options.
+ * @param callback Optional. Called right away, before speech finishes. Check chrome.runtime.lastError to make sure there were no errors. Use options.onEvent to get more detailed feedback.
*/
export function speak(utterance: string, options: SpeakOptions, callback?: Function): void;
/**
- * Pauses speech synthesis, potentially in the middle of an utterance. A call to resume or stop will un-pause speech.
+ * Pauses speech synthesis, potentially in the middle of an utterance. A call to resume or stop will un-pause speech.
* @since Chrome 29.
*/
export function pause(): void;
/**
- * If speech was paused, resumes speaking where it left off.
+ * If speech was paused, resumes speaking where it left off.
* @since Chrome 29.
*/
export function resume(): void;
@@ -7159,18 +6716,18 @@ declare module chrome.tts {
// Text to Speech Engine
////////////////////
/**
- * Use the chrome.ttsEngine API to implement a text-to-speech(TTS) engine using an extension. If your extension registers using this API, it will receive events containing an utterance to be spoken and other parameters when any extension or Chrome App uses the tts API to generate speech. Your extension can then use any available web technology to synthesize and output the speech, and send events back to the calling function to report the status.
- * Permissions: "ttsEngine"
+ * Use the chrome.ttsEngine API to implement a text-to-speech(TTS) engine using an extension. If your extension registers using this API, it will receive events containing an utterance to be spoken and other parameters when any extension or Chrome App uses the tts API to generate speech. Your extension can then use any available web technology to synthesize and output the speech, and send events back to the calling function to report the status.
+ * Permissions: "ttsEngine"
* @since Chrome 14.
*/
-declare module chrome.ttsEngine {
+declare namespace chrome.ttsEngine {
interface SpeakOptions {
/** Optional. The language to be used for synthesis, in the form language-region. Examples: 'en', 'en-US', 'en-GB', 'zh-CN'. */
lang?: string;
/** Optional. The name of the voice to use for synthesis. */
voiceName?: string;
/**
- * Optional. Gender of voice for synthesized speech.
+ * Optional. Gender of voice for synthesized speech.
* One of: "male", or "female"
*/
gender?: string;
@@ -7178,47 +6735,39 @@ declare module chrome.ttsEngine {
volume?: number;
/**
* Optional.
- * Speaking rate relative to the default rate for this voice. 1.0 is the default rate, normally around 180 to 220 words per minute. 2.0 is twice as fast, and 0.5 is half as fast. This value is guaranteed to be between 0.1 and 10.0, inclusive. When a voice does not support this full range of rates, don't return an error. Instead, clip the rate to the range the voice supports.
+ * Speaking rate relative to the default rate for this voice. 1.0 is the default rate, normally around 180 to 220 words per minute. 2.0 is twice as fast, and 0.5 is half as fast. This value is guaranteed to be between 0.1 and 10.0, inclusive. When a voice does not support this full range of rates, don't return an error. Instead, clip the rate to the range the voice supports.
*/
rate?: number;
/** Optional. Speaking pitch between 0 and 2 inclusive, with 0 being lowest and 2 being highest. 1.0 corresponds to this voice's default pitch. */
pitch?: number;
}
- interface TtsEngineSpeakEvent extends chrome.events.Event {
- /**
- * @param callback
- * Parameter utterance: The text to speak, specified as either plain text or an SSML document. If your engine does not support SSML, you should strip out all XML markup and synthesize only the underlying text content. The value of this parameter is guaranteed to be no more than 32,768 characters. If this engine does not support speaking that many characters at a time, the utterance should be split into smaller chunks and queued internally without returning an error.
- * Parameter options: Options specified to the tts.speak() method.
- * Parameter sendTtsEvent: Call this function with events that occur in the process of speaking the utterance.
- */
- addListener(callback: (utterance: string, options: SpeakOptions, sendTtsEvent: (event: chrome.tts.TtsEvent) => void) => void): void;
- }
+ interface TtsEngineSpeakEvent extends chrome.events.Event<(utterance: string, options: SpeakOptions, sendTtsEvent: (event: chrome.tts.TtsEvent) => void) => void> {}
/** Called when the user makes a call to tts.speak() and one of the voices from this extension's manifest is the first to match the options object. */
var onSpeak: TtsEngineSpeakEvent;
/** Fired when a call is made to tts.stop and this extension may be in the middle of speaking. If an extension receives a call to onStop and speech is already stopped, it should do nothing (not raise an error). If speech is in the paused state, this should cancel the paused state. */
- var onStop: chrome.events.Event;
+ var onStop: chrome.events.Event<() => void>;
/**
- * Optional: if an engine supports the pause event, it should pause the current utterance being spoken, if any, until it receives a resume event or stop event. Note that a stop event should also clear the paused state.
+ * Optional: if an engine supports the pause event, it should pause the current utterance being spoken, if any, until it receives a resume event or stop event. Note that a stop event should also clear the paused state.
* @since Chrome 29.
*/
- var onPause: chrome.events.Event;
+ var onPause: chrome.events.Event<() => void>;
/**
- * Optional: if an engine supports the pause event, it should also support the resume event, to continue speaking the current utterance, if any. Note that a stop event should also clear the paused state.
+ * Optional: if an engine supports the pause event, it should also support the resume event, to continue speaking the current utterance, if any. Note that a stop event should also clear the paused state.
* @since Chrome 29.
*/
- var onResume: chrome.events.Event;
+ var onResume: chrome.events.Event<() => void>;
}
////////////////////
// Types
////////////////////
/**
- * The chrome.types API contains type declarations for Chrome.
+ * The chrome.types API contains type declarations for Chrome.
* @since Chrome 13.
*/
-declare module chrome.types {
+declare namespace chrome.types {
interface ChromeSettingClearDetails {
/**
* Optional.
@@ -7233,8 +6782,8 @@ declare module chrome.types {
interface ChromeSettingSetDetails extends ChromeSettingClearDetails {
/**
- * The value of the setting.
- * Note that every setting has a specific value type, which is described together with the setting. An extension should not set a value of a different type.
+ * The value of the setting.
+ * Note that every setting has a specific value type, which is described together with the setting. An extension should not set a value of a different type.
*/
value: any;
/**
@@ -7254,7 +6803,7 @@ declare module chrome.types {
}
/**
- * @param details Details of the currently effective value.
+ * @param details Details of the currently effective value.
*/
type DetailsCallback = (details: ChromeSettingGetResultDetails) => void;
@@ -7272,32 +6821,30 @@ declare module chrome.types {
/**
* Optional.
* Whether the effective value is specific to the incognito session.
- * This property will only be present if the incognito property in the details parameter of get() was true.
+ * This property will only be present if the incognito property in the details parameter of get() was true.
*/
incognitoSpecific?: boolean;
}
- interface ChromeSettingChangedEvent extends chrome.events.Event {
- addListener(callback: DetailsCallback): void;
- }
+ interface ChromeSettingChangedEvent extends chrome.events.Event<DetailsCallback> {}
/** An interface that allows access to a Chrome browser setting. See accessibilityFeatures for an example. */
interface ChromeSetting {
/**
- * Sets the value of a setting.
- * @param details Which setting to change.
- * @param callback Optional. Called at the completion of the set operation.
+ * Sets the value of a setting.
+ * @param details Which setting to change.
+ * @param callback Optional. Called at the completion of the set operation.
*/
set(details: ChromeSettingSetDetails, callback?: Function): void;
/**
- * Gets the value of a setting.
- * @param details Which setting to consider.
+ * Gets the value of a setting.
+ * @param details Which setting to consider.
*/
get(details: ChromeSettingGetDetails, callback?: DetailsCallback): void;
/**
- * Clears the setting, restoring any default value.
+ * Clears the setting, restoring any default value.
* @param details Which setting to clear.
- * @param callback Optional. Called at the completion of the clear operation.
+ * @param callback Optional. Called at the completion of the clear operation.
*/
clear(details: ChromeSettingClearDetails, callback?: Function): void;
/** Fired after the setting changes. */
@@ -7309,12 +6856,12 @@ declare module chrome.types {
// VPN Provider
////////////////////
/**
- * Use the chrome.vpnProvider API to implement a VPN client.
- * Permissions: "vpnProvider"
- * Important: This API works only on Chrome OS.
+ * Use the chrome.vpnProvider API to implement a VPN client.
+ * Permissions: "vpnProvider"
+ * Important: This API works only on Chrome OS.
* @since Chrome 43.
*/
-declare module chrome.vpnProvider {
+declare namespace chrome.vpnProvider {
interface VpnSessionParameters {
/** IP address for the VPN interface in CIDR notation. IPv4 is currently the only supported mode. */
address: string;
@@ -7323,11 +6870,11 @@ declare module chrome.vpnProvider {
/** Optional. MTU setting for the VPN interface. (default: 1500 bytes) */
mtu?: string;
/**
- * Exclude network traffic to the list of IP blocks in CIDR notation from the tunnel. This can be used to bypass traffic to and from the VPN server. When many rules match a destination, the rule with the longest matching prefix wins. Entries that correspond to the same CIDR block are treated as duplicates. Such duplicates in the collated (exclusionList + inclusionList) list are eliminated and the exact duplicate entry that will be eliminated is undefined.
+ * Exclude network traffic to the list of IP blocks in CIDR notation from the tunnel. This can be used to bypass traffic to and from the VPN server. When many rules match a destination, the rule with the longest matching prefix wins. Entries that correspond to the same CIDR block are treated as duplicates. Such duplicates in the collated (exclusionList + inclusionList) list are eliminated and the exact duplicate entry that will be eliminated is undefined.
*/
exclusionList: string[];
/**
- * Include network traffic to the list of IP blocks in CIDR notation to the tunnel. This parameter can be used to set up a split tunnel. By default no traffic is directed to the tunnel. Adding the entry "0.0.0.0/0" to this list gets all the user traffic redirected to the tunnel. When many rules match a destination, the rule with the longest matching prefix wins. Entries that correspond to the same CIDR block are treated as duplicates. Such duplicates in the collated (exclusionList + inclusionList) list are eliminated and the exact duplicate entry that will be eliminated is undefined.
+ * Include network traffic to the list of IP blocks in CIDR notation to the tunnel. This parameter can be used to set up a split tunnel. By default no traffic is directed to the tunnel. Adding the entry "0.0.0.0/0" to this list gets all the user traffic redirected to the tunnel. When many rules match a destination, the rule with the longest matching prefix wins. Entries that correspond to the same CIDR block are treated as duplicates. Such duplicates in the collated (exclusionList + inclusionList) list are eliminated and the exact duplicate entry that will be eliminated is undefined.
*/
inclusionList: string[];
/** Optional. A list of search domains. (default: no search domain) */
@@ -7336,90 +6883,50 @@ declare module chrome.vpnProvider {
dnsServer: string[];
}
- interface VpnPlatformMessageEvent extends chrome.events.Event {
- /**
- * @param callback
- * Parameter id: ID of the configuration the message is intended for.
- * Parameter message: The message received from the platform.
- * * connected: VPN configuration connected.
- * * disconnected: VPN configuration disconnected.
- * * error: An error occurred in VPN connection, for example a timeout. A description of the error is give as the error argument to onPlatformMessage.
- * Parameter error: Error message when there is an error.
- */
- addListener(callback: (id: string, message: string, error: string) => void): void;
- }
+ interface VpnPlatformMessageEvent extends chrome.events.Event<(id: string, message: string, error: string) => void> {}
- interface VpnPacketReceptionEvent extends chrome.events.Event {
- /**
- * @param callback
- * Parameter data: The IP packet received from the platform.
- */
- addListener(callback: (data: ArrayBuffer) => void): void;
- }
+ interface VpnPacketReceptionEvent extends chrome.events.Event<(data: ArrayBuffer) => void> {}
- interface VpnConfigRemovalEvent extends chrome.events.Event {
- /**
- * @param callback
- * Parameter id: ID of the removed configuration.
- */
- addListener(callback: (id: string) => void): void;
- }
+ interface VpnConfigRemovalEvent extends chrome.events.Event<(id: string) => void> {}
- interface VpnConfigCreationEvent extends chrome.events.Event {
- /**
- * @param callback
- * Parameter id: ID of the configuration created.
- * Parameter name: Name of the configuration created.
- * Parameter data: Configuration data provided by the administrator.
- */
- addListener(callback: (id: string, name: string, data: Object) => void): void;
- }
+ interface VpnConfigCreationEvent extends chrome.events.Event<(id: string, name: string, data: Object) => void> {}
+
+ interface VpnUiEvent extends chrome.events.Event<(event: string, id?: string) => void> {}
- interface VpnUiEvent extends chrome.events.Event {
- /**
- * @param callback
- * Parameter event: The UI event that is triggered.
- * * showAddDialog: Request the VPN client to show add configuration dialog to the user.
- * * showConfigureDialog: Request the VPN client to show configuration settings dialog to the user.
- * Optional parameter id: ID of the configuration for which the UI event was triggered.
- */
- addListener(callback: (event: string, id?: string) => void): void;
- }
-
/**
- * Creates a new VPN configuration that persists across multiple login sessions of the user.
- * @param name The name of the VPN configuration.
- * @param callback Called when the configuration is created or if there is an error.
- * Parameter id: A unique ID for the created configuration, empty string on failure.
+ * Creates a new VPN configuration that persists across multiple login sessions of the user.
+ * @param name The name of the VPN configuration.
+ * @param callback Called when the configuration is created or if there is an error.
+ * Parameter id: A unique ID for the created configuration, empty string on failure.
*/
export function createConfig(name: string, callback: (id: string) => void): void;
/**
- * Destroys a VPN configuration created by the extension.
- * @param id ID of the VPN configuration to destroy.
- * @param callback Optional. Called when the configuration is destroyed or if there is an error.
+ * Destroys a VPN configuration created by the extension.
+ * @param id ID of the VPN configuration to destroy.
+ * @param callback Optional. Called when the configuration is destroyed or if there is an error.
*/
export function destroyConfig(id: string, callback?: Function): void;
/**
- * Sets the parameters for the VPN session. This should be called immediately after "connected" is received from the platform. This will succeed only when the VPN session is owned by the extension.
- * @param parameters The parameters for the VPN session.
- * @param callback Called when the parameters are set or if there is an error.
+ * Sets the parameters for the VPN session. This should be called immediately after "connected" is received from the platform. This will succeed only when the VPN session is owned by the extension.
+ * @param parameters The parameters for the VPN session.
+ * @param callback Called when the parameters are set or if there is an error.
*/
export function setParameters(parameters: VpnSessionParameters, callback: Function): void;
/**
- * Sends an IP packet through the tunnel created for the VPN session. This will succeed only when the VPN session is owned by the extension.
- * @param data The IP packet to be sent to the platform.
- * @param callback Optional. Called when the packet is sent or if there is an error.
+ * Sends an IP packet through the tunnel created for the VPN session. This will succeed only when the VPN session is owned by the extension.
+ * @param data The IP packet to be sent to the platform.
+ * @param callback Optional. Called when the packet is sent or if there is an error.
*/
export function sendPacket(data: ArrayBuffer, callback?: Function): void;
/**
- * Notifies the VPN session state to the platform. This will succeed only when the VPN session is owned by the extension.
- * @param state The VPN session state of the VPN client.
- * connected: VPN connection was successful.
+ * Notifies the VPN session state to the platform. This will succeed only when the VPN session is owned by the extension.
+ * @param state The VPN session state of the VPN client.
+ * connected: VPN connection was successful.
* failure: VPN connection failed.
- * @param callback Optional. Called when the notification is complete or if there is an error.
+ * @param callback Optional. Called when the notification is complete or if there is an error.
*/
export function notifyConnectionStateChanged(state: string, callback?: Function): void;
-
+
/** Triggered when a message is received from the platform for a VPN configuration owned by the extension. */
var onPlatformMessage: VpnPlatformMessageEvent;
/** Triggered when an IP packet is received via the tunnel for the VPN session owned by the extension. */
@@ -7436,20 +6943,20 @@ declare module chrome.vpnProvider {
// Wallpaper
////////////////////
/**
- * Use the chrome.wallpaper API to change the ChromeOS wallpaper.
+ * Use the chrome.wallpaper API to change the ChromeOS wallpaper.
* Permissions: "wallpaper"
- * Important: This API works only on Chrome OS.
+ * Important: This API works only on Chrome OS.
* @since Chrome 43.
*/
-declare module chrome.wallpaper {
+declare namespace chrome.wallpaper {
interface WallpaperDetails {
/** Optional. The jpeg or png encoded wallpaper image. */
data?: any;
/** Optional. The URL of the wallpaper to be set. */
url?: string;
/**
- * The supported wallpaper layouts.
- * One of: "STRETCH", "CENTER", or "CENTER_CROPPED"
+ * The supported wallpaper layouts.
+ * One of: "STRETCH", "CENTER", or "CENTER_CROPPED"
*/
layout: string;
/** The file name of the saved wallpaper. */
@@ -7459,9 +6966,9 @@ declare module chrome.wallpaper {
}
/**
- * Sets wallpaper to the image at url or wallpaperData with the specified layout
+ * Sets wallpaper to the image at url or wallpaperData with the specified layout
* @param callback
- * Optional parameter thumbnail: The jpeg encoded wallpaper thumbnail. It is generated by resizing the wallpaper to 128x60.
+ * Optional parameter thumbnail: The jpeg encoded wallpaper thumbnail. It is generated by resizing the wallpaper to 128x60.
*/
export function setWallpaper(details: WallpaperDetails, callback: (thumbnail: any) => void): void;
}
@@ -7470,14 +6977,14 @@ declare module chrome.wallpaper {
// Web Navigation
////////////////////
/**
- * Use the chrome.webNavigation API to receive notifications about the status of navigation requests in-flight.
- * Permissions: "webNavigation"
+ * Use the chrome.webNavigation API to receive notifications about the status of navigation requests in-flight.
+ * Permissions: "webNavigation"
* @since Chrome 16.
*/
-declare module chrome.webNavigation {
+declare namespace chrome.webNavigation {
interface GetFrameDetails {
/**
- * The ID of the process runs the renderer for this tab.
+ * The ID of the process runs the renderer for this tab.
* @since Chrome 22.
*/
processId: number;
@@ -7528,7 +7035,7 @@ declare module chrome.webNavigation {
/** 0 indicates the navigation happens in the tab content window; a positive value indicates navigation in a subframe. Frame IDs are unique for a given tab and process. */
frameId: number;
/**
- * The ID of the process runs the renderer for this tab.
+ * The ID of the process runs the renderer for this tab.
* @since Chrome 22.
*/
processId: number;
@@ -7543,7 +7050,7 @@ declare module chrome.webNavigation {
/** The ID of the tab in which the navigation is triggered. */
sourceTabId: number;
/**
- * The ID of the process runs the renderer for the source tab.
+ * The ID of the process runs the renderer for the source tab.
* @since Chrome 22.
*/
sourceProcessId: number;
@@ -7553,7 +7060,7 @@ declare module chrome.webNavigation {
interface WebNavigationParentedCallbackDetails extends WebNavigationFramedCallbackDetails {
/**
- * ID of frame that wraps the frame. Set to -1 of no parent frame exists.
+ * ID of frame that wraps the frame. Set to -1 of no parent frame exists.
* @since Chrome 24.
*/
parentFrameId: number;
@@ -7561,13 +7068,13 @@ declare module chrome.webNavigation {
interface WebNavigationTransitionCallbackDetails extends WebNavigationFramedCallbackDetails {
/**
- * Cause of the navigation.
- * One of: "link", "typed", "auto_bookmark", "auto_subframe", "manual_subframe", "generated", "start_page", "form_submit", "reload", "keyword", or "keyword_generated"
+ * Cause of the navigation.
+ * One of: "link", "typed", "auto_bookmark", "auto_subframe", "manual_subframe", "generated", "start_page", "form_submit", "reload", "keyword", or "keyword_generated"
*/
transitionType: string;
/**
- * A list of transition qualifiers.
- * Each element one of: "client_redirect", "server_redirect", "forward_back", or "from_address_bar"
+ * A list of transition qualifiers.
+ * Each element one of: "client_redirect", "server_redirect", "forward_back", or "from_address_bar"
*/
transitionQualifiers: string[];
}
@@ -7577,46 +7084,34 @@ declare module chrome.webNavigation {
url: chrome.events.UrlFilter[];
}
- interface WebNavigationEvent extends chrome.events.Event {
- addListener(callback: (details: WebNavigationCallbackDetails, filters?: WebNavigationEventFilter) => void): void;
+ interface WebNavigationEvent<T extends WebNavigationCallbackDetails> extends chrome.events.Event<(details: T) => void> {
+ addListener(callback: (details: T) => void, filters?: WebNavigationEventFilter): void;
}
- interface WebNavigationFramedEvent extends WebNavigationEvent {
- addListener(callback: (details: WebNavigationFramedCallbackDetails, filters?: WebNavigationEventFilter) => void): void;
- }
+ interface WebNavigationFramedEvent extends WebNavigationEvent<WebNavigationFramedCallbackDetails> {}
- interface WebNavigationFramedErrorEvent extends WebNavigationFramedEvent {
- addListener(callback: (details: WebNavigationFramedErrorCallbackDetails, filters?: WebNavigationEventFilter) => void): void;
- }
+ interface WebNavigationFramedErrorEvent extends WebNavigationEvent<WebNavigationFramedErrorCallbackDetails> {}
- interface WebNavigationSourceEvent extends WebNavigationEvent {
- addListener(callback: (details: WebNavigationSourceCallbackDetails, filters?: WebNavigationEventFilter) => void): void;
- }
+ interface WebNavigationSourceEvent extends WebNavigationEvent<WebNavigationSourceCallbackDetails> {}
- interface WebNavigationParentedEvent extends WebNavigationEvent {
- addListener(callback: (details: WebNavigationParentedCallbackDetails, filters?: WebNavigationEventFilter) => void): void;
- }
+ interface WebNavigationParentedEvent extends WebNavigationEvent<WebNavigationParentedCallbackDetails> {}
- interface WebNavigationTransitionalEvent extends WebNavigationEvent {
- addListener(callback: (details: WebNavigationTransitionCallbackDetails, filters?: WebNavigationEventFilter) => void): void;
- }
+ interface WebNavigationTransitionalEvent extends WebNavigationEvent<WebNavigationTransitionCallbackDetails> {}
- interface WebNavigationReplacementEvent extends WebNavigationEvent {
- addListener(callback: (details: WebNavigationReplacementCallbackDetails, filters?: WebNavigationEventFilter) => void): void;
- }
+ interface WebNavigationReplacementEvent extends WebNavigationEvent<WebNavigationReplacementCallbackDetails> {}
/**
- * Retrieves information about the given frame. A frame refers to an <iframe> or a <frame> of a web page and is identified by a tab ID and a frame ID.
- * @param details Information about the frame to retrieve information about.
+ * Retrieves information about the given frame. A frame refers to an <iframe> or a <frame> of a web page and is identified by a tab ID and a frame ID.
+ * @param details Information about the frame to retrieve information about.
* @param callback
- * Optional parameter details: Information about the requested frame, null if the specified frame ID and/or tab ID are invalid.
+ * Optional parameter details: Information about the requested frame, null if the specified frame ID and/or tab ID are invalid.
*/
export function getFrame(details: GetFrameDetails, callback: (details?: GetFrameResultDetails) => void): void;
/**
- * Retrieves information about all frames of a given tab.
+ * Retrieves information about all frames of a given tab.
* @param details Information about the tab to retrieve all frames from.
* @param callback
- * Optional parameter details: A list of frames in the given tab, null if the specified tab ID is invalid.
+ * Optional parameter details: A list of frames in the given tab, null if the specified tab ID is invalid.
*/
export function getAllFrames(details: GetAllFrameDetails, callback: (details?: GetAllFrameResultDetails[]) => void): void;
@@ -7625,14 +7120,14 @@ declare module chrome.webNavigation {
/** Fired when a document, including the resources it refers to, is completely loaded and initialized. */
var onCompleted: WebNavigationFramedEvent;
/**
- * Fired when the frame's history was updated to a new URL. All future events for that frame will use the updated URL.
+ * Fired when the frame's history was updated to a new URL. All future events for that frame will use the updated URL.
* @since Chrome 22.
*/
var onHistoryStateUpdated: WebNavigationTransitionalEvent;
/** Fired when a new window, or a new tab in an existing window, is created to host a navigation. */
var onCreatedNavigationTarget: WebNavigationSourceEvent;
/**
- * Fired when the contents of the tab is replaced by a different (usually previously pre-rendered) tab.
+ * Fired when the contents of the tab is replaced by a different (usually previously pre-rendered) tab.
* @since Chrome 22.
*/
var onTabReplaced: WebNavigationReplacementEvent;
@@ -7650,11 +7145,11 @@ declare module chrome.webNavigation {
// Web Request
////////////////////
/**
- * Use the chrome.webRequest API to observe and analyze traffic and to intercept, block, or modify requests in-flight.
+ * Use the chrome.webRequest API to observe and analyze traffic and to intercept, block, or modify requests in-flight.
* Permissions: "webRequest", host permissions
- * @since Chrome 17.
+ * @since Chrome 17.
*/
-declare module chrome.webRequest {
+declare namespace chrome.webRequest {
interface AuthCredentials {
username: string;
password: string;
@@ -7673,19 +7168,19 @@ declare module chrome.webRequest {
cancel?: boolean;
/**
* Optional.
- * Only used as a response to the onBeforeRequest and onHeadersReceived events. If set, the original request is prevented from being sent/completed and is instead redirected to the given URL. Redirections to non-HTTP schemes such as data: are allowed. Redirects initiated by a redirect action use the original request method for the redirect, with one exception: If the redirect is initiated at the onHeadersReceived stage, then the redirect will be issued using the GET method.
+ * Only used as a response to the onBeforeRequest and onHeadersReceived events. If set, the original request is prevented from being sent/completed and is instead redirected to the given URL. Redirections to non-HTTP schemes such as data: are allowed. Redirects initiated by a redirect action use the original request method for the redirect, with one exception: If the redirect is initiated at the onHeadersReceived stage, then the redirect will be issued using the GET method.
*/
redirectUrl?: string;
/**
* Optional.
- * Only used as a response to the onHeadersReceived event. If set, the server is assumed to have responded with these response headers instead. Only return responseHeaders if you really want to modify the headers in order to limit the number of conflicts (only one extension may modify responseHeaders for each request).
+ * Only used as a response to the onHeadersReceived event. If set, the server is assumed to have responded with these response headers instead. Only return responseHeaders if you really want to modify the headers in order to limit the number of conflicts (only one extension may modify responseHeaders for each request).
*/
responseHeaders?: HttpHeader[];
/** Optional. Only used as a response to the onAuthRequired event. If set, the request is made using the supplied credentials. */
authCredentials?: AuthCredentials;
/**
* Optional.
- * Only used as a response to the onBeforeSendHeaders event. If set, the request is made with these request headers instead.
+ * Only used as a response to the onBeforeSendHeaders event. If set, the request is made with these request headers instead.
*/
requestHeaders?: HttpHeader[];
}
@@ -7695,8 +7190,8 @@ declare module chrome.webRequest {
/** Optional. */
tabId?: number;
/**
- * A list of request types. Requests that cannot match any of the types will be filtered out.
- * Each element one of: "main_frame", "sub_frame", "stylesheet", "script", "image", "object", "xmlhttprequest", or "other"
+ * A list of request types. Requests that cannot match any of the types will be filtered out.
+ * Each element one of: "main_frame", "sub_frame", "stylesheet", "script", "image", "object", "xmlhttprequest", or "other"
*/
types?: string[];
/** A list of URLs or URL patterns. Requests that cannot match any of the URLs will be filtered out. */
@@ -7721,12 +7216,12 @@ declare module chrome.webRequest {
error?: string;
/**
* Optional.
- * If the request method is POST and the body is a sequence of key-value pairs encoded in UTF8, encoded as either multipart/form-data, or application/x-www-form-urlencoded, this dictionary is present and for each key contains the list of all values for that key. If the data is of another media type, or if it is malformed, the dictionary is not present. An example value of this dictionary is {'key': ['value1', 'value2']}.
+ * If the request method is POST and the body is a sequence of key-value pairs encoded in UTF8, encoded as either multipart/form-data, or application/x-www-form-urlencoded, this dictionary is present and for each key contains the list of all values for that key. If the data is of another media type, or if it is malformed, the dictionary is not present. An example value of this dictionary is {'key': ['value1', 'value2']}.
*/
- formData?: Object;
+ formData?: { [key: string]: string[] };
/**
* Optional.
- * If the request method is PUT or POST, and the body is not already parsed in formData, then the unparsed request body elements are contained in this array.
+ * If the request method is PUT or POST, and the body is not already parsed in formData, then the unparsed request body elements are contained in this array.
*/
raw?: UploadData[];
}
@@ -7737,6 +7232,7 @@ declare module chrome.webRequest {
}
interface ResourceRequest {
+ url: string;
/** The ID of the request. Request IDs are unique within a browser session. As a result, they could be used to relate different events of the same request. */
requestId: string;
/** The value 0 indicates that the request happens in the main frame; a positive value indicates the ID of a subframe in which the request happens. If the document of a (sub-)frame is loaded (type is main_frame or sub_frame), frameId indicates the ID of this frame, not the ID of the outer frame. Frame IDs are unique within a tab. */
@@ -7746,8 +7242,8 @@ declare module chrome.webRequest {
/** The ID of the tab in which the request takes place. Set to -1 if the request isn't related to a tab. */
tabId: number;
/**
- * How the requested resource will be used.
- * One of: "main_frame", "sub_frame", "stylesheet", "script", "image", "object", "xmlhttprequest", or "other"
+ * How the requested resource will be used.
+ * One of: "main_frame", "sub_frame", "stylesheet", "script", "image", "object", "xmlhttprequest", or "other"
*/
type: string;
/** The time when this signal is triggered, in milliseconds since the epoch. */
@@ -7755,7 +7251,6 @@ declare module chrome.webRequest {
}
interface WebRequestDetails extends ResourceRequest {
- url: string;
/** Standard HTTP method. */
method: string;
}
@@ -7767,7 +7262,7 @@ declare module chrome.webRequest {
interface WebRequestBodyDetails extends WebRequestDetails {
/**
- * Contains the HTTP request body data. Only provided if extraInfoSpec contains 'requestBody'.
+ * Contains the HTTP request body data. Only provided if extraInfoSpec contains 'requestBody'.
* @since Chrome 23.
*/
requestBody: WebRequestBody;
@@ -7780,7 +7275,7 @@ declare module chrome.webRequest {
/** HTTP status line of the response or the 'HTTP/0.9 200 OK' string for HTTP/0.9 responses (i.e., responses that lack a status line). */
statusLine: string;
/**
- * Standard HTTP status code returned by the server.
+ * Standard HTTP status code returned by the server.
* @since Chrome 43.
*/
statusCode: number;
@@ -7794,7 +7289,7 @@ declare module chrome.webRequest {
interface WebResponseCacheDetails extends WebResponseHeadersDetails {
/**
* Optional.
- * The server IP address that the request was actually sent to. Note that it may be a literal IPv6 address.
+ * The server IP address that the request was actually sent to. Note that it may be a literal IPv6 address.
*/
ip?: string;
/** Indicates if this response was fetched from disk cache. */
@@ -7808,7 +7303,7 @@ declare module chrome.webRequest {
interface WebAuthenticationChallengeDetails extends WebResponseHeadersDetails {
/** The authentication scheme, e.g. Basic or Digest. */
- schema: string;
+ scheme: string;
/** The authentication realm provided by the server, if there is one. */
realm?: string;
/** The server requesting authentication. */
@@ -7822,36 +7317,32 @@ declare module chrome.webRequest {
error: string;
}
- interface WebRequestBodyEvent extends chrome.events.Event {
+ interface WebRequestBodyEvent extends chrome.events.Event<(details: WebRequestBodyDetails) => void> {
addListener(callback: (details: WebRequestBodyDetails) => void, filter?: RequestFilter, opt_extraInfoSpec?: string[]): void;
}
- interface WebRequestHeadersEvent extends chrome.events.Event {
+ interface WebRequestHeadersEvent extends chrome.events.Event<(details: WebRequestHeadersDetails) => void> {
addListener(callback: (details: WebRequestHeadersDetails) => void, filter?: RequestFilter, opt_extraInfoSpec?: string[]): void;
}
- interface WebResponseHeadersEvent extends chrome.events.Event {
- addListener(callback: (details: WebResponseHeadersDetails) => void, filter?: RequestFilter, opt_extraInfoSpec?: string[]): void;
+ interface _WebResponseHeadersEvent<T extends WebResponseHeadersDetails> extends chrome.events.Event<(details: T) => void> {
+ addListener(callback: (details: T) => void, filter?: RequestFilter, opt_extraInfoSpec?: string[]): void;
}
- interface WebResponseCacheEvent extends WebResponseHeadersEvent {
- addListener(callback: (details: WebResponseCacheDetails) => void, filter?: RequestFilter, opt_extraInfoSpec?: string[]): void;
- }
+ interface WebResponseHeadersEvent extends _WebResponseHeadersEvent<WebResponseHeadersDetails> {}
- interface WebRedirectionResponseEvent extends WebResponseCacheEvent {
- addListener(callback: (details: WebRedirectionResponseDetails) => void, filter?: RequestFilter, opt_extraInfoSpec?: string[]): void;
- }
+ interface WebResponseCacheEvent extends _WebResponseHeadersEvent<WebResponseCacheDetails> {}
- interface WebAuthenticationChallengeEvent extends chrome.events.Event {
- addListener(callback: (details: WebAuthenticationChallengeDetails, callback?: (response: BlockingResponse) => void) => void): void;
- }
+ interface WebRedirectionResponseEvent extends _WebResponseHeadersEvent<WebRedirectionResponseDetails> {}
- interface WebResponseErrorEvent extends WebResponseCacheEvent {
- addListener(callback: (details: WebResponseErrorDetails) => void, filter?: RequestFilter, opt_extraInfoSpec?: string[]): void;
+ interface WebAuthenticationChallengeEvent extends chrome.events.Event<(details: WebAuthenticationChallengeDetails, callback?: (response: BlockingResponse) => void) => void> {
+ addListener(callback: (details: WebAuthenticationChallengeDetails) => void, filter?: RequestFilter, opt_extraInfoSpec?: string[]): void;
}
+ interface WebResponseErrorEvent extends _WebResponseHeadersEvent<WebResponseErrorDetails> {}
+
/**
- * The maximum number of times that handlerBehaviorChanged can be called per 10 minute sustained interval. handlerBehaviorChanged is an expensive function call that shouldn't be called often.
+ * The maximum number of times that handlerBehaviorChanged can be called per 10 minute sustained interval. handlerBehaviorChanged is an expensive function call that shouldn't be called often.
* @since Chrome 23.
*/
var MAX_HANDLER_BEHAVIOR_CHANGED_CALLS_PER_10_MINUTES: number;
@@ -7883,110 +7374,97 @@ declare module chrome.webRequest {
// Web Store
////////////////////
/**
- * Use the chrome.webstore API to initiate app and extension installations "inline" from your site.
+ * Use the chrome.webstore API to initiate app and extension installations "inline" from your site.
* @since Chrome 15.
*/
-declare module chrome.webstore {
+declare namespace chrome.webstore {
/**
- * @param url Optional. If you have more than one <link> tag on your page with the chrome-webstore-item relation, you can choose which item you'd like to install by passing in its URL here. If it is omitted, then the first (or only) link will be used. An exception will be thrown if the passed in URL does not exist on the page.
- * @param successCallback Optional. This function is invoked when inline installation successfully completes (after the dialog is shown and the user agrees to add the item to Chrome). You may wish to use this to hide the user interface element that prompted the user to install the app or extension.
- * @param failureCallback Optional. This function is invoked when inline installation does not successfully complete. Possible reasons for this include the user canceling the dialog, the linked item not being found in the store, or the install being initiated from a non-verified site.
+ * @param url Optional. If you have more than one <link> tag on your page with the chrome-webstore-item relation, you can choose which item you'd like to install by passing in its URL here. If it is omitted, then the first (or only) link will be used. An exception will be thrown if the passed in URL does not exist on the page.
+ * @param successCallback Optional. This function is invoked when inline installation successfully completes (after the dialog is shown and the user agrees to add the item to Chrome). You may wish to use this to hide the user interface element that prompted the user to install the app or extension.
+ * @param failureCallback Optional. This function is invoked when inline installation does not successfully complete. Possible reasons for this include the user canceling the dialog, the linked item not being found in the store, or the install being initiated from a non-verified site.
* Parameter error: The failure detail. You may wish to inspect or log this for debugging purposes, but you should not rely on specific strings being passed back.
- * Optional parameter errorCode: The error code from the stable set of possible errors.
+ * Optional parameter errorCode: The error code from the stable set of possible errors.
* * Enum of the possible install results, including error codes sent back in the event that an inline installation has failed.
- * * * "otherError": An uncommon, unrecognized, or unexpected error. In some cases, the readable error string can provide more information.
- * * * "aborted": The operation was aborted as the requestor is no longer alive.
- * * * "installInProgress": An installation of the same extension is in progress.
- * * * "notPermitted": The installation is not permitted.
- * * * "invalidId": Invalid Chrome Web Store item ID.
- * * * "webstoreRequestError": Failed to retrieve extension metadata from the Web Store.
- * * * "invalidWebstoreResponse": The extension metadata retrieved from the Web Store was invalid.
- * * * "invalidManifest": An error occurred while parsing the extension manifest retrieved from the Web Store.
- * * * "iconError": Failed to retrieve the extension's icon from the Web Store, or the icon was invalid.
- * * * "userCanceled": The user canceled the operation.
- * * * "blacklisted": The extension is blacklisted.
- * * * "missingDependencies": Unsatisfied dependencies, such as shared modules.
- * * * "requirementViolations": Unsatisfied requirements, such as webgl.
- * * * "blockedByPolicy": The extension is blocked by management policies.
- * * * "launchFeatureDisabled": The launch feature is not available.
- * * * "launchUnsupportedExtensionType": The launch feature is not supported for the extension type.
- * * * "launchInProgress": A launch of the same extension is in progress.
+ * * * "otherError": An uncommon, unrecognized, or unexpected error. In some cases, the readable error string can provide more information.
+ * * * "aborted": The operation was aborted as the requestor is no longer alive.
+ * * * "installInProgress": An installation of the same extension is in progress.
+ * * * "notPermitted": The installation is not permitted.
+ * * * "invalidId": Invalid Chrome Web Store item ID.
+ * * * "webstoreRequestError": Failed to retrieve extension metadata from the Web Store.
+ * * * "invalidWebstoreResponse": The extension metadata retrieved from the Web Store was invalid.
+ * * * "invalidManifest": An error occurred while parsing the extension manifest retrieved from the Web Store.
+ * * * "iconError": Failed to retrieve the extension's icon from the Web Store, or the icon was invalid.
+ * * * "userCanceled": The user canceled the operation.
+ * * * "blacklisted": The extension is blacklisted.
+ * * * "missingDependencies": Unsatisfied dependencies, such as shared modules.
+ * * * "requirementViolations": Unsatisfied requirements, such as webgl.
+ * * * "blockedByPolicy": The extension is blocked by management policies.
+ * * * "launchFeatureDisabled": The launch feature is not available.
+ * * * "launchUnsupportedExtensionType": The launch feature is not supported for the extension type.
+ * * * "launchInProgress": A launch of the same extension is in progress.
*/
export function install(url: string, successCallback?: Function, failureCallback?: (error: string, errorCode?: string) => void): void;
/**
- * @param successCallback Optional. This function is invoked when inline installation successfully completes (after the dialog is shown and the user agrees to add the item to Chrome). You may wish to use this to hide the user interface element that prompted the user to install the app or extension.
- * @param failureCallback Optional. This function is invoked when inline installation does not successfully complete. Possible reasons for this include the user canceling the dialog, the linked item not being found in the store, or the install being initiated from a non-verified site.
+ * @param successCallback Optional. This function is invoked when inline installation successfully completes (after the dialog is shown and the user agrees to add the item to Chrome). You may wish to use this to hide the user interface element that prompted the user to install the app or extension.
+ * @param failureCallback Optional. This function is invoked when inline installation does not successfully complete. Possible reasons for this include the user canceling the dialog, the linked item not being found in the store, or the install being initiated from a non-verified site.
* Parameter error: The failure detail. You may wish to inspect or log this for debugging purposes, but you should not rely on specific strings being passed back.
- * Optional parameter errorCode: The error code from the stable set of possible errors.
+ * Optional parameter errorCode: The error code from the stable set of possible errors.
* * Enum of the possible install results, including error codes sent back in the event that an inline installation has failed.
- * * * "otherError": An uncommon, unrecognized, or unexpected error. In some cases, the readable error string can provide more information.
- * * * "aborted": The operation was aborted as the requestor is no longer alive.
- * * * "installInProgress": An installation of the same extension is in progress.
- * * * "notPermitted": The installation is not permitted.
- * * * "invalidId": Invalid Chrome Web Store item ID.
- * * * "webstoreRequestError": Failed to retrieve extension metadata from the Web Store.
- * * * "invalidWebstoreResponse": The extension metadata retrieved from the Web Store was invalid.
- * * * "invalidManifest": An error occurred while parsing the extension manifest retrieved from the Web Store.
- * * * "iconError": Failed to retrieve the extension's icon from the Web Store, or the icon was invalid.
- * * * "userCanceled": The user canceled the operation.
- * * * "blacklisted": The extension is blacklisted.
- * * * "missingDependencies": Unsatisfied dependencies, such as shared modules.
- * * * "requirementViolations": Unsatisfied requirements, such as webgl.
- * * * "blockedByPolicy": The extension is blocked by management policies.
- * * * "launchFeatureDisabled": The launch feature is not available.
- * * * "launchUnsupportedExtensionType": The launch feature is not supported for the extension type.
- * * * "launchInProgress": A launch of the same extension is in progress.
+ * * * "otherError": An uncommon, unrecognized, or unexpected error. In some cases, the readable error string can provide more information.
+ * * * "aborted": The operation was aborted as the requestor is no longer alive.
+ * * * "installInProgress": An installation of the same extension is in progress.
+ * * * "notPermitted": The installation is not permitted.
+ * * * "invalidId": Invalid Chrome Web Store item ID.
+ * * * "webstoreRequestError": Failed to retrieve extension metadata from the Web Store.
+ * * * "invalidWebstoreResponse": The extension metadata retrieved from the Web Store was invalid.
+ * * * "invalidManifest": An error occurred while parsing the extension manifest retrieved from the Web Store.
+ * * * "iconError": Failed to retrieve the extension's icon from the Web Store, or the icon was invalid.
+ * * * "userCanceled": The user canceled the operation.
+ * * * "blacklisted": The extension is blacklisted.
+ * * * "missingDependencies": Unsatisfied dependencies, such as shared modules.
+ * * * "requirementViolations": Unsatisfied requirements, such as webgl.
+ * * * "blockedByPolicy": The extension is blocked by management policies.
+ * * * "launchFeatureDisabled": The launch feature is not available.
+ * * * "launchUnsupportedExtensionType": The launch feature is not supported for the extension type.
+ * * * "launchInProgress": A launch of the same extension is in progress.
*/
export function install(successCallback: Function, failureCallback?: (error: string, errorCode?: string) => void): void;
/**
- * @param failureCallback Optional. This function is invoked when inline installation does not successfully complete. Possible reasons for this include the user canceling the dialog, the linked item not being found in the store, or the install being initiated from a non-verified site.
+ * @param failureCallback Optional. This function is invoked when inline installation does not successfully complete. Possible reasons for this include the user canceling the dialog, the linked item not being found in the store, or the install being initiated from a non-verified site.
* Parameter error: The failure detail. You may wish to inspect or log this for debugging purposes, but you should not rely on specific strings being passed back.
- * Optional parameter errorCode: The error code from the stable set of possible errors.
+ * Optional parameter errorCode: The error code from the stable set of possible errors.
* * Enum of the possible install results, including error codes sent back in the event that an inline installation has failed.
- * * * "otherError": An uncommon, unrecognized, or unexpected error. In some cases, the readable error string can provide more information.
- * * * "aborted": The operation was aborted as the requestor is no longer alive.
- * * * "installInProgress": An installation of the same extension is in progress.
- * * * "notPermitted": The installation is not permitted.
- * * * "invalidId": Invalid Chrome Web Store item ID.
- * * * "webstoreRequestError": Failed to retrieve extension metadata from the Web Store.
- * * * "invalidWebstoreResponse": The extension metadata retrieved from the Web Store was invalid.
- * * * "invalidManifest": An error occurred while parsing the extension manifest retrieved from the Web Store.
- * * * "iconError": Failed to retrieve the extension's icon from the Web Store, or the icon was invalid.
- * * * "userCanceled": The user canceled the operation.
- * * * "blacklisted": The extension is blacklisted.
- * * * "missingDependencies": Unsatisfied dependencies, such as shared modules.
- * * * "requirementViolations": Unsatisfied requirements, such as webgl.
- * * * "blockedByPolicy": The extension is blocked by management policies.
- * * * "launchFeatureDisabled": The launch feature is not available.
- * * * "launchUnsupportedExtensionType": The launch feature is not supported for the extension type.
- * * * "launchInProgress": A launch of the same extension is in progress.
+ * * * "otherError": An uncommon, unrecognized, or unexpected error. In some cases, the readable error string can provide more information.
+ * * * "aborted": The operation was aborted as the requestor is no longer alive.
+ * * * "installInProgress": An installation of the same extension is in progress.
+ * * * "notPermitted": The installation is not permitted.
+ * * * "invalidId": Invalid Chrome Web Store item ID.
+ * * * "webstoreRequestError": Failed to retrieve extension metadata from the Web Store.
+ * * * "invalidWebstoreResponse": The extension metadata retrieved from the Web Store was invalid.
+ * * * "invalidManifest": An error occurred while parsing the extension manifest retrieved from the Web Store.
+ * * * "iconError": Failed to retrieve the extension's icon from the Web Store, or the icon was invalid.
+ * * * "userCanceled": The user canceled the operation.
+ * * * "blacklisted": The extension is blacklisted.
+ * * * "missingDependencies": Unsatisfied dependencies, such as shared modules.
+ * * * "requirementViolations": Unsatisfied requirements, such as webgl.
+ * * * "blockedByPolicy": The extension is blocked by management policies.
+ * * * "launchFeatureDisabled": The launch feature is not available.
+ * * * "launchUnsupportedExtensionType": The launch feature is not supported for the extension type.
+ * * * "launchInProgress": A launch of the same extension is in progress.
*/
export function install(failureCallback?: (error: string, errorCode?: string) => void): void;
- interface InstallationStageEvent extends chrome.events.Event {
- /**
- * @param callback
- * Parameter stage: The InstallStage that just began.
- * * One of: "installing", or "downloading"
- */
- addListener(callback: (stage: string) => void): void;
- }
+ interface InstallationStageEvent extends chrome.events.Event<(stage: string) => void> {}
+
+ interface DownloadProgressEvent extends chrome.events.Event<(percentDownloaded: number) => void> {}
- interface DownloadProgressEvent extends chrome.events.Event {
- /**
- * @param callback
- * Parameter percentDownloaded: The progress of the download, between 0 and 1. 0 indicates no progress; 1.0 indicates complete.
- */
- addListener(callback: (percentDownloaded: number) => void): void;
- }
-
/**
- * Fired when an inline installation enters a new InstallStage. In order to receive notifications about this event, listeners must be registered before the inline installation begins.
+ * Fired when an inline installation enters a new InstallStage. In order to receive notifications about this event, listeners must be registered before the inline installation begins.
* @since Chrome 35.
*/
var onInstallStageChanged: InstallationStageEvent;
/**
- * Fired periodically with the download progress of an inline install. In order to receive notifications about this event, listeners must be registered before the inline installation begins.
+ * Fired periodically with the download progress of an inline install. In order to receive notifications about this event, listeners must be registered before the inline installation begins.
* @since Chrome 35.
*/
var onDownloadProgress: DownloadProgressEvent;
@@ -7997,10 +7475,10 @@ declare module chrome.webstore {
////////////////////
/**
* Use the chrome.windows API to interact with browser windows. You can use this API to create, modify, and rearrange windows in the browser.
- * Permissions: The chrome.windows API can be used without declaring any permission. However, the "tabs" permission is required in order to populate the url, title, and favIconUrl properties of Tab objects.
+ * Permissions: The chrome.windows API can be used without declaring any permission. However, the "tabs" permission is required in order to populate the url, title, and favIconUrl properties of Tab objects.
* @since Chrome 5.
*/
-declare module chrome.windows {
+declare namespace chrome.windows {
interface Window {
/** Array of tabs.Tab objects representing the current tabs in the window. */
tabs?: chrome.tabs.Tab[];
@@ -8011,23 +7489,23 @@ declare module chrome.windows {
/** Optional. The width of the window, including the frame, in pixels. Under some circumstances a Window may not be assigned width property, for example when querying closed windows from the sessions API. */
width?: number;
/**
- * The state of this browser window.
- * One of: "normal", "minimized", "maximized", "fullscreen", or "docked"
+ * The state of this browser window.
+ * One of: "normal", "minimized", "maximized", "fullscreen", or "docked"
* @since Chrome 17.
*/
state: string;
/** Whether the window is currently the focused window. */
focused: boolean;
/**
- * Whether the window is set to be always on top.
+ * Whether the window is set to be always on top.
* @since Chrome 19.
*/
alwaysOnTop: boolean;
/** Whether the window is incognito. */
incognito: boolean;
/**
- * The type of browser window this is.
- * One of: "normal", "popup", "panel", "app", or "devtools"
+ * The type of browser window this is.
+ * One of: "normal", "popup", "panel", "app", or "devtools"
*/
type: string;
/** Optional. The ID of the window. Window IDs are unique within a browser session. Under some circumstances a Window may not be assigned an ID, for example when querying windows using the sessions API, in which case a session ID may be present. */
@@ -8035,7 +7513,7 @@ declare module chrome.windows {
/** Optional. The offset of the window from the left edge of the screen in pixels. Under some circumstances a Window may not be assigned left property, for example when querying closed windows from the sessions API. */
left?: number;
/**
- * The session ID used to uniquely identify a Window obtained from the sessions API.
+ * The session ID used to uniquely identify a Window obtained from the sessions API.
* @since Chrome 31.
*/
sessionId?: string;
@@ -8044,12 +7522,12 @@ declare module chrome.windows {
interface GetInfo {
/**
* Optional.
- * If true, the windows.Window object will have a tabs property that contains a list of the tabs.Tab objects. The Tab objects only contain the url, title and favIconUrl properties if the extension's manifest file includes the "tabs" permission.
+ * If true, the windows.Window object will have a tabs property that contains a list of the tabs.Tab objects. The Tab objects only contain the url, title and favIconUrl properties if the extension's manifest file includes the "tabs" permission.
*/
populate?: boolean;
/**
- * If set, the windows.Window returned will be filtered based on its type. If unset the default filter is set to ['app', 'normal', 'panel', 'popup'], with 'app' and 'panel' window types limited to the extension's own windows.
- * Each one of: "normal", "popup", "panel", "app", or "devtools"
+ * If set, the windows.Window returned will be filtered based on its type. If unset the default filter is set to ['app', 'normal', 'panel', 'popup'], with 'app' and 'panel' window types limited to the extension's own windows.
+ * Each one of: "normal", "popup", "panel", "app", or "devtools"
* @since Chrome 46. Warning: this is the current Beta channel.
*/
windowTypes?: string[];
@@ -8057,50 +7535,50 @@ declare module chrome.windows {
interface CreateData {
/**
- * Optional. The id of the tab for which you want to adopt to the new window.
+ * Optional. The id of the tab for which you want to adopt to the new window.
* @since Chrome 10.
*/
tabId?: number;
/**
* Optional.
- * A URL or array of URLs to open as tabs in the window. Fully-qualified URLs must include a scheme (i.e. 'http://www.google.com', not 'www.google.com'). Relative URLs will be relative to the current page within the extension. Defaults to the New Tab Page.
+ * A URL or array of URLs to open as tabs in the window. Fully-qualified URLs must include a scheme (i.e. 'http://www.google.com', not 'www.google.com'). Relative URLs will be relative to the current page within the extension. Defaults to the New Tab Page.
*/
url?: string | string[];
/**
* Optional.
- * The number of pixels to position the new window from the top edge of the screen. If not specified, the new window is offset naturally from the last focused window. This value is ignored for panels.
+ * The number of pixels to position the new window from the top edge of the screen. If not specified, the new window is offset naturally from the last focused window. This value is ignored for panels.
*/
top?: number;
/**
* Optional.
- * The height in pixels of the new window, including the frame. If not specified defaults to a natural height.
+ * The height in pixels of the new window, including the frame. If not specified defaults to a natural height.
*/
height?: number;
/**
* Optional.
- * The width in pixels of the new window, including the frame. If not specified defaults to a natural width.
+ * The width in pixels of the new window, including the frame. If not specified defaults to a natural width.
*/
width?: number;
/**
- * Optional. If true, opens an active window. If false, opens an inactive window.
+ * Optional. If true, opens an active window. If false, opens an inactive window.
* @since Chrome 12.
*/
focused?: boolean;
/** Optional. Whether the new window should be an incognito window. */
incognito?: boolean;
/**
- * Optional. Specifies what type of browser window to create. The 'panel' and 'detached_panel' types create a popup unless the '--enable-panels' flag is set.
- * One of: "normal", "popup", "panel", or "detached_panel"
+ * Optional. Specifies what type of browser window to create. The 'panel' and 'detached_panel' types create a popup unless the '--enable-panels' flag is set.
+ * One of: "normal", "popup", "panel", or "detached_panel"
*/
type?: string;
/**
* Optional.
- * The number of pixels to position the new window from the left edge of the screen. If not specified, the new window is offset naturally from the last focused window. This value is ignored for panels.
+ * The number of pixels to position the new window from the left edge of the screen. If not specified, the new window is offset naturally from the last focused window. This value is ignored for panels.
*/
left?: number;
/**
- * Optional. The initial state of the window. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'.
- * One of: "normal", "minimized", "maximized", "fullscreen", or "docked"
+ * Optional. The initial state of the window. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'.
+ * One of: "normal", "minimized", "maximized", "fullscreen", or "docked"
* @since Chrome 44.
*/
state?: string;
@@ -8110,7 +7588,7 @@ declare module chrome.windows {
/** Optional. The offset from the top edge of the screen to move the window to in pixels. This value is ignored for panels. */
top?: number;
/**
- * Optional. If true, causes the window to be displayed in a manner that draws the user's attention to the window, without changing the focused window. The effect lasts until the user changes focus to the window. This option has no effect if the window already has focus. Set to false to cancel a previous draw attention request.
+ * Optional. If true, causes the window to be displayed in a manner that draws the user's attention to the window, without changing the focused window. The effect lasts until the user changes focus to the window. This option has no effect if the window already has focus. Set to false to cancel a previous draw attention request.
* @since Chrome 14.
*/
drawAttention?: boolean;
@@ -8119,13 +7597,13 @@ declare module chrome.windows {
/** Optional. The width to resize the window to in pixels. This value is ignored for panels. */
width?: number;
/**
- * Optional. The new state of the window. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'.
- * One of: "normal", "minimized", "maximized", "fullscreen", or "docked"
+ * Optional. The new state of the window. The 'minimized', 'maximized' and 'fullscreen' states cannot be combined with 'left', 'top', 'width' or 'height'.
+ * One of: "normal", "minimized", "maximized", "fullscreen", or "docked"
* @since Chrome 17.
*/
state?: string;
/**
- * Optional. If true, brings the window to the front. If false, brings the next window in the z-order to the front.
+ * Optional. If true, brings the window to the front. If false, brings the next window in the z-order to the front.
* @since Chrome 8.
*/
focused?: boolean;
@@ -8135,65 +7613,53 @@ declare module chrome.windows {
interface WindowEventFilter {
/**
- * Conditions that the window's type being created must satisfy. By default it will satisfy ['app', 'normal', 'panel', 'popup'], with 'app' and 'panel' window types limited to the extension's own windows.
- * Each one of: "normal", "popup", "panel", "app", or "devtools"
+ * Conditions that the window's type being created must satisfy. By default it will satisfy ['app', 'normal', 'panel', 'popup'], with 'app' and 'panel' window types limited to the extension's own windows.
+ * Each one of: "normal", "popup", "panel", "app", or "devtools"
*/
windowTypes: string[];
}
- interface WindowIdEvent extends chrome.events.Event {
- /**
- * @param callback
- * Parameter windowId: The id of the window associated with this event.
- */
- addListener(callback: (windowId: number, filters?: WindowEventFilter) => void): void;
- }
+ interface WindowIdEvent extends chrome.events.Event<(windowId: number, filters?: WindowEventFilter) => void> {}
- interface WindowReferenceEvent extends chrome.events.Event {
- /**
- * @param callback
- * Parameter window: The window object associated with this event.
- */
- addListener(callback: (window: Window, filters?: WindowEventFilter) => void): void;
- }
+ interface WindowReferenceEvent extends chrome.events.Event<(window: Window, filters?: WindowEventFilter) => void> {}
/**
- * The windowId value that represents the current window.
+ * The windowId value that represents the current window.
* @since Chrome 18.
*/
var WINDOW_ID_CURRENT: number;
/**
- * The windowId value that represents the absence of a chrome browser window.
+ * The windowId value that represents the absence of a chrome browser window.
* @since Chrome 6.
*/
var WINDOW_ID_NONE: number;
/** Gets details about a window. */
export function get(windowId: number, callback: (window: chrome.windows.Window) => void): void;
- /**
- * Gets details about a window.
+ /**
+ * Gets details about a window.
* @since Chrome 18.
*/
export function get(windowId: number, getInfo: GetInfo, callback: (window: chrome.windows.Window) => void): void;
/**
- * Gets the current window.
+ * Gets the current window.
*/
export function getCurrent(callback: (window: chrome.windows.Window) => void): void;
/**
- * Gets the current window.
+ * Gets the current window.
* @since Chrome 18.
*/
export function getCurrent(getInfo: GetInfo, callback: (window: chrome.windows.Window) => void): void;
/**
- * Creates (opens) a new browser with any optional sizing, position or default URL provided.
+ * Creates (opens) a new browser with any optional sizing, position or default URL provided.
* @param callback
- * Optional parameter window: Contains details about the created window.
+ * Optional parameter window: Contains details about the created window.
*/
export function create(callback?: (window?: chrome.windows.Window) => void): void;
/**
* Creates (opens) a new browser with any optional sizing, position or default URL provided.
* @param callback
- * Optional parameter window: Contains details about the created window.
+ * Optional parameter window: Contains details about the created window.
*/
export function create(createData: CreateData, callback?: (window?: chrome.windows.Window) => void): void;
/**
@@ -8210,11 +7676,11 @@ declare module chrome.windows {
/** Removes (closes) a window, and all the tabs inside it. */
export function remove(windowId: number, callback?: Function): void;
/**
- * Gets the window that was most recently focused — typically the window 'on top'.
+ * Gets the window that was most recently focused — typically the window 'on top'.
*/
export function getLastFocused(callback: (window: chrome.windows.Window) => void): void;
/**
- * Gets the window that was most recently focused — typically the window 'on top'.
+ * Gets the window that was most recently focused — typically the window 'on top'.
* @since Chrome 18.
*/
export function getLastFocused(getInfo: GetInfo, callback: (window: chrome.windows.Window) => void): void;
@@ -8223,9 +7689,9 @@ declare module chrome.windows {
var onRemoved: WindowIdEvent;
/** Fired when a window is created. */
var onCreated: WindowReferenceEvent;
- /**
- * Fired when the currently focused window changes. Will be chrome.windows.WINDOW_ID_NONE if all chrome windows have lost focus.
- * Note: On some Linux window managers, WINDOW_ID_NONE will always be sent immediately preceding a switch from one chrome window to another.
+ /**
+ * Fired when the currently focused window changes. Will be chrome.windows.WINDOW_ID_NONE if all chrome windows have lost focus.
+ * Note: On some Linux window managers, WINDOW_ID_NONE will always be sent immediately preceding a switch from one chrome window to another.
*/
var onFocusChanged: WindowIdEvent;
}
diff --git a/lib/decl/lib.es6.d.ts b/lib/decl/lib.es6.d.ts
index ef3399ba8..084ed4e8a 100644
--- a/lib/decl/lib.es6.d.ts
+++ b/lib/decl/lib.es6.d.ts
@@ -13,1350 +13,16 @@ See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
-declare type PropertyKey = string | number | symbol;
-
-interface Symbol {
- /** Returns a string representation of an object. */
- toString(): string;
-
- /** Returns the primitive value of the specified object. */
- valueOf(): Object;
-
- [Symbol.toStringTag]: "Symbol";
-}
-
-interface SymbolConstructor {
- /**
- * A reference to the prototype.
- */
- prototype: Symbol;
-
- /**
- * Returns a new unique Symbol value.
- * @param description Description of the new Symbol object.
- */
- (description?: string|number): symbol;
-
- /**
- * Returns a Symbol object from the global symbol registry matching the given key if found.
- * Otherwise, returns a new symbol with this key.
- * @param key key to search for.
- */
- for(key: string): symbol;
-
- /**
- * Returns a key from the global symbol registry matching the given Symbol if found.
- * Otherwise, returns a undefined.
- * @param sym Symbol to find the key for.
- */
- keyFor(sym: symbol): string;
-
- // Well-known Symbols
-
- /**
- * A method that determines if a constructor object recognizes an object as one of the
- * constructor’s instances. Called by the semantics of the instanceof operator.
- */
- hasInstance: symbol;
-
- /**
- * A Boolean value that if true indicates that an object should flatten to its array elements
- * by Array.prototype.concat.
- */
- isConcatSpreadable: symbol;
-
- /**
- * A method that returns the default iterator for an object. Called by the semantics of the
- * for-of statement.
- */
- iterator: symbol;
-
- /**
- * A regular expression method that matches the regular expression against a string. Called
- * by the String.prototype.match method.
- */
- match: symbol;
-
- /**
- * A regular expression method that replaces matched substrings of a string. Called by the
- * String.prototype.replace method.
- */
- replace: symbol;
-
- /**
- * A regular expression method that returns the index within a string that matches the
- * regular expression. Called by the String.prototype.search method.
- */
- search: symbol;
-
- /**
- * A function valued property that is the constructor function that is used to create
- * derived objects.
- */
- species: symbol;
-
- /**
- * A regular expression method that splits a string at the indices that match the regular
- * expression. Called by the String.prototype.split method.
- */
- split: symbol;
-
- /**
- * A method that converts an object to a corresponding primitive value.
- * Called by the ToPrimitive abstract operation.
- */
- toPrimitive: symbol;
-
- /**
- * A String value that is used in the creation of the default string description of an object.
- * Called by the built-in method Object.prototype.toString.
- */
- toStringTag: symbol;
-
- /**
- * An Object whose own property names are property names that are excluded from the 'with'
- * environment bindings of the associated objects.
- */
- unscopables: symbol;
-}
-declare var Symbol: SymbolConstructor;
-
-interface Object {
- /**
- * Determines whether an object has a property with the specified name.
- * @param v A property name.
- */
- hasOwnProperty(v: PropertyKey): boolean;
-
- /**
- * Determines whether a specified property is enumerable.
- * @param v A property name.
- */
- propertyIsEnumerable(v: PropertyKey): boolean;
-}
-
-interface ObjectConstructor {
- /**
- * Copy the values of all of the enumerable own properties from one or more source objects to a
- * target object. Returns the target object.
- * @param target The target object to copy to.
- * @param source The source object from which to copy properties.
- */
- assign<T, U>(target: T, source: U): T & U;
-
- /**
- * Copy the values of all of the enumerable own properties from one or more source objects to a
- * target object. Returns the target object.
- * @param target The target object to copy to.
- * @param source1 The first source object from which to copy properties.
- * @param source2 The second source object from which to copy properties.
- */
- assign<T, U, V>(target: T, source1: U, source2: V): T & U & V;
-
- /**
- * Copy the values of all of the enumerable own properties from one or more source objects to a
- * target object. Returns the target object.
- * @param target The target object to copy to.
- * @param source1 The first source object from which to copy properties.
- * @param source2 The second source object from which to copy properties.
- * @param source3 The third source object from which to copy properties.
- */
- assign<T, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
-
- /**
- * Copy the values of all of the enumerable own properties from one or more source objects to a
- * target object. Returns the target object.
- * @param target The target object to copy to.
- * @param sources One or more source objects from which to copy properties
- */
- assign(target: any, ...sources: any[]): any;
-
- /**
- * Returns an array of all symbol properties found directly on object o.
- * @param o Object to retrieve the symbols from.
- */
- getOwnPropertySymbols(o: any): symbol[];
-
- /**
- * Returns true if the values are the same value, false otherwise.
- * @param value1 The first value.
- * @param value2 The second value.
- */
- is(value1: any, value2: any): boolean;
-
- /**
- * Sets the prototype of a specified object o to object proto or null. Returns the object o.
- * @param o The object to change its prototype.
- * @param proto The value of the new prototype or null.
- */
- setPrototypeOf(o: any, proto: any): any;
-
- /**
- * Gets the own property descriptor of the specified object.
- * An own property descriptor is one that is defined directly on the object and is not
- * inherited from the object's prototype.
- * @param o Object that contains the property.
- * @param p Name of the property.
- */
- getOwnPropertyDescriptor(o: any, propertyKey: PropertyKey): PropertyDescriptor;
-
- /**
- * Adds a property to an object, or modifies attributes of an existing property.
- * @param o Object on which to add or modify the property. This can be a native JavaScript
- * object (that is, a user-defined object or a built in object) or a DOM object.
- * @param p The property name.
- * @param attributes Descriptor for the property. It can be for a data property or an accessor
- * property.
- */
- defineProperty(o: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): any;
-}
-
-interface Function {
- /**
- * Returns the name of the function. Function names are read-only and can not be changed.
- */
- name: string;
-
- /**
- * Determines whether the given value inherits from this function if this function was used
- * as a constructor function.
- *
- * A constructor function can control which objects are recognized as its instances by
- * 'instanceof' by overriding this method.
- */
- [Symbol.hasInstance](value: any): boolean;
-}
-
-interface NumberConstructor {
- /**
- * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1
- * that is representable as a Number value, which is approximately:
- * 2.2204460492503130808472633361816 x 10‍−‍16.
- */
- EPSILON: number;
-
- /**
- * Returns true if passed value is finite.
- * Unlike the global isFininte, Number.isFinite doesn't forcibly convert the parameter to a
- * number. Only finite values of the type number, result in true.
- * @param number A numeric value.
- */
- isFinite(number: number): boolean;
-
- /**
- * Returns true if the value passed is an integer, false otherwise.
- * @param number A numeric value.
- */
- isInteger(number: number): boolean;
-
- /**
- * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a
- * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter
- * to a number. Only values of the type number, that are also NaN, result in true.
- * @param number A numeric value.
- */
- isNaN(number: number): boolean;
-
- /**
- * Returns true if the value passed is a safe integer.
- * @param number A numeric value.
- */
- isSafeInteger(number: number): boolean;
-
- /**
- * The value of the largest integer n such that n and n + 1 are both exactly representable as
- * a Number value.
- * The value of Number.MIN_SAFE_INTEGER is 9007199254740991 2^53 − 1.
- */
- MAX_SAFE_INTEGER: number;
-
- /**
- * The value of the smallest integer n such that n and n − 1 are both exactly representable as
- * a Number value.
- * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)).
- */
- MIN_SAFE_INTEGER: number;
-
- /**
- * Converts a string to a floating-point number.
- * @param string A string that contains a floating-point number.
- */
- parseFloat(string: string): number;
-
- /**
- * Converts A string to an integer.
- * @param s A string to convert into a number.
- * @param radix A value between 2 and 36 that specifies the base of the number in numString.
- * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
- * All other strings are considered decimal.
- */
- parseInt(string: string, radix?: number): number;
-}
-
-interface Array<T> {
- /** Iterator */
- [Symbol.iterator](): IterableIterator<T>;
-
- /**
- * Returns an object whose properties have the value 'true'
- * when they will be absent when used in a 'with' statement.
- */
- [Symbol.unscopables](): {
- copyWithin: boolean;
- entries: boolean;
- fill: boolean;
- find: boolean;
- findIndex: boolean;
- keys: boolean;
- values: boolean;
- };
-
- /**
- * Returns an array of key, value pairs for every entry in the array
- */
- entries(): IterableIterator<[number, T]>;
-
- /**
- * Returns an list of keys in the array
- */
- keys(): IterableIterator<number>;
-
- /**
- * Returns an list of values in the array
- */
- values(): IterableIterator<T>;
-
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- find(predicate: (value: T, index: number, obj: Array<T>) => boolean, thisArg?: any): T;
-
- /**
- * Returns the index of the first element in the array where predicate is true, and undefined
- * otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
- * predicate. If it is not provided, undefined is used instead.
- */
- findIndex(predicate: (value: T) => boolean, thisArg?: any): number;
-
- /**
- * Returns the this object after filling the section identified by start and end with value
- * @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
- * length+end.
- */
- fill(value: T, start?: number, end?: number): T[];
-
- /**
- * Returns the this object after copying a section of the array identified by start and end
- * to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
- * is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
- */
- copyWithin(target: number, start: number, end?: number): T[];
-}
-
-interface IArguments {
- /** Iterator */
- [Symbol.iterator](): IterableIterator<any>;
-}
-
-interface ArrayConstructor {
- /**
- * Creates an array from an array-like object.
- * @param arrayLike An array-like object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): Array<U>;
-
- /**
- * Creates an array from an iterable object.
- * @param iterable An iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from<T, U>(iterable: Iterable<T>, mapfn: (v: T, k: number) => U, thisArg?: any): Array<U>;
-
- /**
- * Creates an array from an array-like object.
- * @param arrayLike An array-like object to convert to an array.
- */
- from<T>(arrayLike: ArrayLike<T>): Array<T>;
-
- /**
- * Creates an array from an iterable object.
- * @param iterable An iterable object to convert to an array.
- */
- from<T>(iterable: Iterable<T>): Array<T>;
-
- /**
- * Returns a new array from a set of elements.
- * @param items A set of elements to include in the new array object.
- */
- of<T>(...items: T[]): Array<T>;
-}
-
-interface String {
- /** Iterator */
- [Symbol.iterator](): IterableIterator<string>;
-
- /**
- * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
- * value of the UTF-16 encoded code point starting at the string element at position pos in
- * the String resulting from converting this object to a String.
- * If there is no element at that position, the result is undefined.
- * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.
- */
- codePointAt(pos: number): number;
-
- /**
- * Returns true if searchString appears as a substring of the result of converting this
- * object to a String, at one or more positions that are
- * greater than or equal to position; otherwise, returns false.
- * @param searchString search string
- * @param position If position is undefined, 0 is assumed, so as to search all of the String.
- */
- includes(searchString: string, position?: number): boolean;
-
- /**
- * Returns true if the sequence of elements of searchString converted to a String is the
- * same as the corresponding elements of this object (converted to a String) starting at
- * endPosition – length(this). Otherwise returns false.
- */
- endsWith(searchString: string, endPosition?: number): boolean;
-
- /**
- * Returns the String value result of normalizing the string into the normalization form
- * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.
- * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default
- * is "NFC"
- */
- normalize(form?: string): string;
-
- /**
- * Returns a String value that is made from count copies appended together. If count is 0,
- * T is the empty String is returned.
- * @param count number of copies to append
- */
- repeat(count: number): string;
-
- /**
- * Returns true if the sequence of elements of searchString converted to a String is the
- * same as the corresponding elements of this object (converted to a String) starting at
- * position. Otherwise returns false.
- */
- startsWith(searchString: string, position?: number): boolean;
-
- // Overloads for objects with methods of well-known symbols.
-
- /**
- * Matches a string an object that supports being matched against, and returns an array containing the results of that search.
- * @param matcher An object that supports being matched against.
- */
- match(matcher: { [Symbol.match](string: string): RegExpMatchArray; }): RegExpMatchArray;
-
- /**
- * Replaces text in a string, using an object that supports replacement within a string.
- * @param searchValue A object can search for and replace matches within a string.
- * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
- */
- replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string;
-
- /**
- * Replaces text in a string, using an object that supports replacement within a string.
- * @param searchValue A object can search for and replace matches within a string.
- * @param replacer A function that returns the replacement text.
- */
- replace(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string;
-
- /**
- * Finds the first substring match in a regular expression search.
- * @param searcher An object which supports searching within a string.
- */
- search(searcher: { [Symbol.search](string: string): number; }): number;
-
- /**
- * Split a string into substrings using the specified separator and return them as an array.
- * @param splitter An object that can split a string.
- * @param limit A value used to limit the number of elements returned in the array.
- */
- split(splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[];
-
- /**
- * Returns an <a> HTML anchor element and sets the name attribute to the text value
- * @param name
- */
- anchor(name: string): string;
-
- /** Returns a <big> HTML element */
- big(): string;
-
- /** Returns a <blink> HTML element */
- blink(): string;
-
- /** Returns a <b> HTML element */
- bold(): string;
-
- /** Returns a <tt> HTML element */
- fixed(): string
-
- /** Returns a <font> HTML element and sets the color attribute value */
- fontcolor(color: string): string
-
- /** Returns a <font> HTML element and sets the size attribute value */
- fontsize(size: number): string;
-
- /** Returns a <font> HTML element and sets the size attribute value */
- fontsize(size: string): string;
-
- /** Returns an <i> HTML element */
- italics(): string;
-
- /** Returns an <a> HTML element and sets the href attribute value */
- link(url: string): string;
-
- /** Returns a <small> HTML element */
- small(): string;
-
- /** Returns a <strike> HTML element */
- strike(): string;
-
- /** Returns a <sub> HTML element */
- sub(): string;
-
- /** Returns a <sup> HTML element */
- sup(): string;
-}
-
-interface StringConstructor {
- /**
- * Return the String value whose elements are, in order, the elements in the List elements.
- * If length is 0, the empty string is returned.
- */
- fromCodePoint(...codePoints: number[]): string;
-
- /**
- * String.raw is intended for use as a tag function of a Tagged Template String. When called
- * as such the first argument will be a well formed template call site object and the rest
- * parameter will contain the substitution values.
- * @param template A well-formed template string call site representation.
- * @param substitutions A set of substitution values.
- */
- raw(template: TemplateStringsArray, ...substitutions: any[]): string;
-}
-
-interface IteratorResult<T> {
- done: boolean;
- value?: T;
-}
-
-interface Iterator<T> {
- next(value?: any): IteratorResult<T>;
- return?(value?: any): IteratorResult<T>;
- throw?(e?: any): IteratorResult<T>;
-}
-
-interface Iterable<T> {
- [Symbol.iterator](): Iterator<T>;
-}
-
-interface IterableIterator<T> extends Iterator<T> {
- [Symbol.iterator](): IterableIterator<T>;
-}
-
-interface GeneratorFunction extends Function {
- [Symbol.toStringTag]: "GeneratorFunction";
-}
-
-interface GeneratorFunctionConstructor {
- /**
- * Creates a new Generator function.
- * @param args A list of arguments the function accepts.
- */
- new (...args: string[]): GeneratorFunction;
- (...args: string[]): GeneratorFunction;
- prototype: GeneratorFunction;
-}
-declare var GeneratorFunction: GeneratorFunctionConstructor;
-
-interface Math {
- /**
- * Returns the number of leading zero bits in the 32-bit binary representation of a number.
- * @param x A numeric expression.
- */
- clz32(x: number): number;
-
- /**
- * Returns the result of 32-bit multiplication of two numbers.
- * @param x First number
- * @param y Second number
- */
- imul(x: number, y: number): number;
-
- /**
- * Returns the sign of the x, indicating whether x is positive, negative or zero.
- * @param x The numeric expression to test
- */
- sign(x: number): number;
-
- /**
- * Returns the base 10 logarithm of a number.
- * @param x A numeric expression.
- */
- log10(x: number): number;
-
- /**
- * Returns the base 2 logarithm of a number.
- * @param x A numeric expression.
- */
- log2(x: number): number;
-
- /**
- * Returns the natural logarithm of 1 + x.
- * @param x A numeric expression.
- */
- log1p(x: number): number;
-
- /**
- * Returns the result of (e^x - 1) of x (e raised to the power of x, where e is the base of
- * the natural logarithms).
- * @param x A numeric expression.
- */
- expm1(x: number): number;
-
- /**
- * Returns the hyperbolic cosine of a number.
- * @param x A numeric expression that contains an angle measured in radians.
- */
- cosh(x: number): number;
-
- /**
- * Returns the hyperbolic sine of a number.
- * @param x A numeric expression that contains an angle measured in radians.
- */
- sinh(x: number): number;
-
- /**
- * Returns the hyperbolic tangent of a number.
- * @param x A numeric expression that contains an angle measured in radians.
- */
- tanh(x: number): number;
-
- /**
- * Returns the inverse hyperbolic cosine of a number.
- * @param x A numeric expression that contains an angle measured in radians.
- */
- acosh(x: number): number;
-
- /**
- * Returns the inverse hyperbolic sine of a number.
- * @param x A numeric expression that contains an angle measured in radians.
- */
- asinh(x: number): number;
-
- /**
- * Returns the inverse hyperbolic tangent of a number.
- * @param x A numeric expression that contains an angle measured in radians.
- */
- atanh(x: number): number;
-
- /**
- * Returns the square root of the sum of squares of its arguments.
- * @param values Values to compute the square root for.
- * If no arguments are passed, the result is +0.
- * If there is only one argument, the result is the absolute value.
- * If any argument is +Infinity or -Infinity, the result is +Infinity.
- * If any argument is NaN, the result is NaN.
- * If all arguments are either +0 or −0, the result is +0.
- */
- hypot(...values: number[] ): number;
-
- /**
- * Returns the integral part of the a numeric expression, x, removing any fractional digits.
- * If x is already an integer, the result is x.
- * @param x A numeric expression.
- */
- trunc(x: number): number;
-
- /**
- * Returns the nearest single precision float representation of a number.
- * @param x A numeric expression.
- */
- fround(x: number): number;
-
- /**
- * Returns an implementation-dependent approximation to the cube root of number.
- * @param x A numeric expression.
- */
- cbrt(x: number): number;
-
- [Symbol.toStringTag]: "Math";
-}
-
-interface Date {
- /**
- * Converts a Date object to a string.
- */
- [Symbol.toPrimitive](hint: "default"): string;
- /**
- * Converts a Date object to a string.
- */
- [Symbol.toPrimitive](hint: "string"): string;
- /**
- * Converts a Date object to a number.
- */
- [Symbol.toPrimitive](hint: "number"): number;
- /**
- * Converts a Date object to a string or number.
- *
- * @param hint The strings "number", "string", or "default" to specify what primitive to return.
- *
- * @throws {TypeError} If 'hint' was given something other than "number", "string", or "default".
- * @returns A number if 'hint' was "number", a string if 'hint' was "string" or "default".
- */
- [Symbol.toPrimitive](hint: string): string | number;
-}
-
-interface RegExp {
- /**
- * Matches a string with this regular expression, and returns an array containing the results of
- * that search.
- * @param string A string to search within.
- */
- [Symbol.match](string: string): RegExpMatchArray;
-
- /**
- * Replaces text in a string, using this regular expression.
- * @param string A String object or string literal whose contents matching against
- * this regular expression will be replaced
- * @param replaceValue A String object or string literal containing the text to replace for every
- * successful match of this regular expression.
- */
- [Symbol.replace](string: string, replaceValue: string): string;
-
- /**
- * Replaces text in a string, using this regular expression.
- * @param string A String object or string literal whose contents matching against
- * this regular expression will be replaced
- * @param replacer A function that returns the replacement text.
- */
- [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string;
-
- /**
- * Finds the position beginning first substring match in a regular expression search
- * using this regular expression.
- *
- * @param string The string to search within.
- */
- [Symbol.search](string: string): number;
-
- /**
- * Returns an array of substrings that were delimited by strings in the original input that
- * match against this regular expression.
- *
- * If the regular expression contains capturing parentheses, then each time this
- * regular expression matches, the results (including any undefined results) of the
- * capturing parentheses are spliced.
- *
- * @param string string value to split
- * @param limit if not undefined, the output array is truncated so that it contains no more
- * than 'limit' elements.
- */
- [Symbol.split](string: string, limit?: number): string[];
-
- /**
- * Returns a string indicating the flags of the regular expression in question. This field is read-only.
- * The characters in this string are sequenced and concatenated in the following order:
- *
- * - "g" for global
- * - "i" for ignoreCase
- * - "m" for multiline
- * - "u" for unicode
- * - "y" for sticky
- *
- * If no flags are set, the value is the empty string.
- */
- flags: string;
-
- /**
- * Returns a Boolean value indicating the state of the sticky flag (y) used with a regular
- * expression. Default is false. Read-only.
- */
- sticky: boolean;
-
- /**
- * Returns a Boolean value indicating the state of the Unicode flag (u) used with a regular
- * expression. Default is false. Read-only.
- */
- unicode: boolean;
-}
-
-interface RegExpConstructor {
- [Symbol.species](): RegExpConstructor;
-}
-
-interface Map<K, V> {
- clear(): void;
- delete(key: K): boolean;
- entries(): IterableIterator<[K, V]>;
- forEach(callbackfn: (value: V, index: K, map: Map<K, V>) => void, thisArg?: any): void;
- get(key: K): V;
- has(key: K): boolean;
- keys(): IterableIterator<K>;
- set(key: K, value?: V): Map<K, V>;
- size: number;
- values(): IterableIterator<V>;
- [Symbol.iterator]():IterableIterator<[K,V]>;
- [Symbol.toStringTag]: "Map";
-}
-
-interface MapConstructor {
- new (): Map<any, any>;
- new <K, V>(): Map<K, V>;
- new <K, V>(iterable: Iterable<[K, V]>): Map<K, V>;
- prototype: Map<any, any>;
-}
-declare var Map: MapConstructor;
-
-interface WeakMap<K, V> {
- clear(): void;
- delete(key: K): boolean;
- get(key: K): V;
- has(key: K): boolean;
- set(key: K, value?: V): WeakMap<K, V>;
- [Symbol.toStringTag]: "WeakMap";
-}
-
-interface WeakMapConstructor {
- new (): WeakMap<any, any>;
- new <K, V>(): WeakMap<K, V>;
- new <K, V>(iterable: Iterable<[K, V]>): WeakMap<K, V>;
- prototype: WeakMap<any, any>;
-}
-declare var WeakMap: WeakMapConstructor;
-
-interface Set<T> {
- add(value: T): Set<T>;
- clear(): void;
- delete(value: T): boolean;
- entries(): IterableIterator<[T, T]>;
- forEach(callbackfn: (value: T, index: T, set: Set<T>) => void, thisArg?: any): void;
- has(value: T): boolean;
- keys(): IterableIterator<T>;
- size: number;
- values(): IterableIterator<T>;
- [Symbol.iterator]():IterableIterator<T>;
- [Symbol.toStringTag]: "Set";
-}
-
-interface SetConstructor {
- new (): Set<any>;
- new <T>(): Set<T>;
- new <T>(iterable: Iterable<T>): Set<T>;
- prototype: Set<any>;
-}
-declare var Set: SetConstructor;
-
-interface WeakSet<T> {
- add(value: T): WeakSet<T>;
- clear(): void;
- delete(value: T): boolean;
- has(value: T): boolean;
- [Symbol.toStringTag]: "WeakSet";
-}
-
-interface WeakSetConstructor {
- new (): WeakSet<any>;
- new <T>(): WeakSet<T>;
- new <T>(iterable: Iterable<T>): WeakSet<T>;
- prototype: WeakSet<any>;
-}
-declare var WeakSet: WeakSetConstructor;
-
-interface JSON {
- [Symbol.toStringTag]: "JSON";
-}
-
-/**
- * Represents a raw buffer of binary data, which is used to store data for the
- * different typed arrays. ArrayBuffers cannot be read from or written to directly,
- * but can be passed to a typed array or DataView Object to interpret the raw
- * buffer as needed.
- */
-interface ArrayBuffer {
- [Symbol.toStringTag]: "ArrayBuffer";
-}
-
-interface DataView {
- [Symbol.toStringTag]: "DataView";
-}
-
-/**
- * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested
- * number of bytes could not be allocated an exception is raised.
- */
-interface Int8Array {
- /**
- * Returns an array of key, value pairs for every entry in the array
- */
- entries(): IterableIterator<[number, number]>;
- /**
- * Returns an list of keys in the array
- */
- keys(): IterableIterator<number>;
- /**
- * Returns an list of values in the array
- */
- values(): IterableIterator<number>;
- [Symbol.iterator](): IterableIterator<number>;
- [Symbol.toStringTag]: "Int8Array";
-}
-
-interface Int8ArrayConstructor {
- new (elements: Iterable<number>): Int8Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array;
-}
-
-/**
- * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Uint8Array {
- /**
- * Returns an array of key, value pairs for every entry in the array
- */
- entries(): IterableIterator<[number, number]>;
- /**
- * Returns an list of keys in the array
- */
- keys(): IterableIterator<number>;
- /**
- * Returns an list of values in the array
- */
- values(): IterableIterator<number>;
- [Symbol.iterator](): IterableIterator<number>;
- [Symbol.toStringTag]: "UInt8Array";
-}
-
-interface Uint8ArrayConstructor {
- new (elements: Iterable<number>): Uint8Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array;
-}
-
-/**
- * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.
- * If the requested number of bytes could not be allocated an exception is raised.
- */
-interface Uint8ClampedArray {
- /**
- * Returns an array of key, value pairs for every entry in the array
- */
- entries(): IterableIterator<[number, number]>;
-
- /**
- * Returns an list of keys in the array
- */
- keys(): IterableIterator<number>;
-
- /**
- * Returns an list of values in the array
- */
- values(): IterableIterator<number>;
-
- [Symbol.iterator](): IterableIterator<number>;
- [Symbol.toStringTag]: "Uint8ClampedArray";
-}
-
-interface Uint8ClampedArrayConstructor {
- new (elements: Iterable<number>): Uint8ClampedArray;
-
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray;
-}
-
-/**
- * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Int16Array {
- /**
- * Returns an array of key, value pairs for every entry in the array
- */
- entries(): IterableIterator<[number, number]>;
-
- /**
- * Returns an list of keys in the array
- */
- keys(): IterableIterator<number>;
-
- /**
- * Returns an list of values in the array
- */
- values(): IterableIterator<number>;
-
-
- [Symbol.iterator](): IterableIterator<number>;
- [Symbol.toStringTag]: "Int16Array";
-}
-
-interface Int16ArrayConstructor {
- new (elements: Iterable<number>): Int16Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array;
-}
-
-/**
- * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Uint16Array {
- /**
- * Returns an array of key, value pairs for every entry in the array
- */
- entries(): IterableIterator<[number, number]>;
- /**
- * Returns an list of keys in the array
- */
- keys(): IterableIterator<number>;
- /**
- * Returns an list of values in the array
- */
- values(): IterableIterator<number>;
- [Symbol.iterator](): IterableIterator<number>;
- [Symbol.toStringTag]: "Uint16Array";
-}
-
-interface Uint16ArrayConstructor {
- new (elements: Iterable<number>): Uint16Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array;
-}
-
-/**
- * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Int32Array {
- /**
- * Returns an array of key, value pairs for every entry in the array
- */
- entries(): IterableIterator<[number, number]>;
- /**
- * Returns an list of keys in the array
- */
- keys(): IterableIterator<number>;
- /**
- * Returns an list of values in the array
- */
- values(): IterableIterator<number>;
- [Symbol.iterator](): IterableIterator<number>;
- [Symbol.toStringTag]: "Int32Array";
-}
-
-interface Int32ArrayConstructor {
- new (elements: Iterable<number>): Int32Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array;
-}
-
-/**
- * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the
- * requested number of bytes could not be allocated an exception is raised.
- */
-interface Uint32Array {
- /**
- * Returns an array of key, value pairs for every entry in the array
- */
- entries(): IterableIterator<[number, number]>;
- /**
- * Returns an list of keys in the array
- */
- keys(): IterableIterator<number>;
- /**
- * Returns an list of values in the array
- */
- values(): IterableIterator<number>;
- [Symbol.iterator](): IterableIterator<number>;
- [Symbol.toStringTag]: "Uint32Array";
-}
-
-interface Uint32ArrayConstructor {
- new (elements: Iterable<number>): Uint32Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array;
-}
-
-/**
- * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number
- * of bytes could not be allocated an exception is raised.
- */
-interface Float32Array {
- /**
- * Returns an array of key, value pairs for every entry in the array
- */
- entries(): IterableIterator<[number, number]>;
- /**
- * Returns an list of keys in the array
- */
- keys(): IterableIterator<number>;
- /**
- * Returns an list of values in the array
- */
- values(): IterableIterator<number>;
- [Symbol.iterator](): IterableIterator<number>;
- [Symbol.toStringTag]: "Float32Array";
-}
-
-interface Float32ArrayConstructor {
- new (elements: Iterable<number>): Float32Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array;
-}
-
-/**
- * A typed array of 64-bit float values. The contents are initialized to 0. If the requested
- * number of bytes could not be allocated an exception is raised.
- */
-interface Float64Array {
- /**
- * Returns an array of key, value pairs for every entry in the array
- */
- entries(): IterableIterator<[number, number]>;
- /**
- * Returns an list of keys in the array
- */
- keys(): IterableIterator<number>;
- /**
- * Returns an list of values in the array
- */
- values(): IterableIterator<number>;
- [Symbol.iterator](): IterableIterator<number>;
- [Symbol.toStringTag]: "Float64Array";
-}
-
-interface Float64ArrayConstructor {
- new (elements: Iterable<number>): Float64Array;
-
- /**
- * Creates an array from an array-like or iterable object.
- * @param arrayLike An array-like or iterable object to convert to an array.
- * @param mapfn A mapping function to call on every element of the array.
- * @param thisArg Value of 'this' used to invoke the mapfn.
- */
- from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array;
-}
-
-interface ProxyHandler<T> {
- getPrototypeOf? (target: T): any;
- setPrototypeOf? (target: T, v: any): boolean;
- isExtensible? (target: T): boolean;
- preventExtensions? (target: T): boolean;
- getOwnPropertyDescriptor? (target: T, p: PropertyKey): PropertyDescriptor;
- has? (target: T, p: PropertyKey): boolean;
- get? (target: T, p: PropertyKey, receiver: any): any;
- set? (target: T, p: PropertyKey, value: any, receiver: any): boolean;
- deleteProperty? (target: T, p: PropertyKey): boolean;
- defineProperty? (target: T, p: PropertyKey, attributes: PropertyDescriptor): boolean;
- enumerate? (target: T): PropertyKey[];
- ownKeys? (target: T): PropertyKey[];
- apply? (target: T, thisArg: any, argArray?: any): any;
- construct? (target: T, thisArg: any, argArray?: any): any;
-}
-
-interface ProxyConstructor {
- revocable<T>(target: T, handler: ProxyHandler<T>): { proxy: T; revoke: () => void; };
- new <T>(target: T, handler: ProxyHandler<T>): T
-}
-declare var Proxy: ProxyConstructor;
-
-declare namespace Reflect {
- function apply(target: Function, thisArgument: any, argumentsList: ArrayLike<any>): any;
- function construct(target: Function, argumentsList: ArrayLike<any>, newTarget?: any): any;
- function defineProperty(target: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean;
- function deleteProperty(target: any, propertyKey: PropertyKey): boolean;
- function enumerate(target: any): IterableIterator<any>;
- function get(target: any, propertyKey: PropertyKey, receiver?: any): any;
- function getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor;
- function getPrototypeOf(target: any): any;
- function has(target: any, propertyKey: string): boolean;
- function has(target: any, propertyKey: symbol): boolean;
- function isExtensible(target: any): boolean;
- function ownKeys(target: any): Array<PropertyKey>;
- function preventExtensions(target: any): boolean;
- function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean;
- function setPrototypeOf(target: any, proto: any): boolean;
-}
-
-/**
- * Represents the completion of an asynchronous operation
- */
-interface Promise<T> {
- /**
- * Attaches callbacks for the resolution and/or rejection of the Promise.
- * @param onfulfilled The callback to execute when the Promise is resolved.
- * @param onrejected The callback to execute when the Promise is rejected.
- * @returns A Promise for the completion of which ever callback is executed.
- */
- then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<TResult>;
- then<TResult>(onfulfilled?: (value: T) => TResult | PromiseLike<TResult>, onrejected?: (reason: any) => void): Promise<TResult>;
-
- /**
- * Attaches a callback for only the rejection of the Promise.
- * @param onrejected The callback to execute when the Promise is rejected.
- * @returns A Promise for the completion of the callback.
- */
- catch(onrejected?: (reason: any) => T | PromiseLike<T>): Promise<T>;
- catch(onrejected?: (reason: any) => void): Promise<T>;
-
- [Symbol.toStringTag]: "Promise";
-}
-
-interface PromiseConstructor {
- /**
- * A reference to the prototype.
- */
- prototype: Promise<any>;
-
- /**
- * Creates a new Promise.
- * @param executor A callback used to initialize the promise. This callback is passed two arguments:
- * a resolve callback used resolve the promise with a value or the result of another promise,
- * and a reject callback used to reject the promise with a provided reason or error.
- */
- new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
-
- /**
- * Creates a Promise that is resolved with an array of results when all of the provided Promises
- * resolve, or rejected when any Promise is rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- all<T1, T2>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<[T1, T2]>;
- all<T1, T2, T3>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<[T1, T2, T3]>;
- all<T1, T2, T3, T4>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>]): Promise<[T1, T2, T3, T4]>;
- all<T1, T2, T3, T4, T5>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>]): Promise<[T1, T2, T3, T4, T5]>;
- all<T1, T2, T3, T4, T5, T6>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>]): Promise<[T1, T2, T3, T4, T5, T6]>;
- all<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>]): Promise<[T1, T2, T3, T4, T5, T6, T7]>;
- all<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>;
- all<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
- all<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>, T10 | PromiseLike<T10>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;
- all<TAll>(values: Iterable<TAll | PromiseLike<TAll>>): Promise<TAll[]>;
-
- /**
- * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
- * or rejected.
- * @param values An array of Promises.
- * @returns A new Promise.
- */
- race<T>(values: Iterable<T | PromiseLike<T>>): Promise<T>;
-
- /**
- * Creates a new rejected promise for the provided reason.
- * @param reason The reason the promise was rejected.
- * @returns A new rejected Promise.
- */
- reject(reason: any): Promise<void>;
-
- /**
- * Creates a new rejected promise for the provided reason.
- * @param reason The reason the promise was rejected.
- * @returns A new rejected Promise.
- */
- reject<T>(reason: any): Promise<T>;
-
- /**
- * Creates a new resolved promise for the provided value.
- * @param value A promise.
- * @returns A promise whose internal state matches the provided promise.
- */
- resolve<T>(value: T | PromiseLike<T>): Promise<T>;
-
- /**
- * Creates a new resolved promise .
- * @returns A resolved promise.
- */
- resolve(): Promise<void>;
-
- [Symbol.species]: Function;
-}
-
-declare var Promise: PromiseConstructor;
/// <reference no-default-lib="true"/>
-
/////////////////////////////
/// ECMAScript APIs
/////////////////////////////
-declare var NaN: number;
-declare var Infinity: number;
+declare const NaN: number;
+declare const Infinity: number;
/**
- * Evaluates JavaScript code and executes it.
+ * Evaluates JavaScript code and executes it.
* @param x A String value that contains valid JavaScript code.
*/
declare function eval(x: string): any;
@@ -1364,25 +30,25 @@ declare function eval(x: string): any;
/**
* Converts A string to an integer.
* @param s A string to convert into a number.
- * @param radix A value between 2 and 36 that specifies the base of the number in numString.
+ * @param radix A value between 2 and 36 that specifies the base of the number in numString.
* If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
* All other strings are considered decimal.
*/
declare function parseInt(s: string, radix?: number): number;
/**
- * Converts a string to a floating-point number.
- * @param string A string that contains a floating-point number.
+ * Converts a string to a floating-point number.
+ * @param string A string that contains a floating-point number.
*/
declare function parseFloat(string: string): number;
/**
- * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number).
+ * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number).
* @param number A numeric value.
*/
declare function isNaN(number: number): boolean;
-/**
+/**
* Determines whether a supplied number is finite.
* @param number Any numeric value.
*/
@@ -1400,7 +66,7 @@ declare function decodeURI(encodedURI: string): string;
*/
declare function decodeURIComponent(encodedURIComponent: string): string;
-/**
+/**
* Encodes a text string as a valid Uniform Resource Identifier (URI)
* @param uri A value representing an encoded URI.
*/
@@ -1439,18 +105,18 @@ interface Object {
valueOf(): Object;
/**
- * Determines whether an object has a property with the specified name.
+ * Determines whether an object has a property with the specified name.
* @param v A property name.
*/
hasOwnProperty(v: string): boolean;
/**
- * Determines whether an object exists in another object's prototype chain.
+ * Determines whether an object exists in another object's prototype chain.
* @param v Another object whose prototype chain is to be checked.
*/
isPrototypeOf(v: Object): boolean;
- /**
+ /**
* Determines whether a specified property is enumerable.
* @param v A property name.
*/
@@ -1463,38 +129,50 @@ interface ObjectConstructor {
(value: any): any;
/** A reference to the prototype for a class of objects. */
- prototype: Object;
+ readonly prototype: Object;
- /**
- * Returns the prototype of an object.
+ /**
+ * Returns the prototype of an object.
* @param o The object that references the prototype.
*/
getPrototypeOf(o: any): any;
/**
- * Gets the own property descriptor of the specified object.
- * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
+ * Gets the own property descriptor of the specified object.
+ * An own property descriptor is one that is defined directly on the object and is not inherited from the object's prototype.
* @param o Object that contains the property.
* @param p Name of the property.
*/
getOwnPropertyDescriptor(o: any, p: string): PropertyDescriptor;
- /**
- * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly
+ /**
+ * Returns the names of the own properties of an object. The own properties of an object are those that are defined directly
* on that object, and are not inherited from the object's prototype. The properties of an object include both fields (objects) and functions.
* @param o Object that contains the own properties.
*/
getOwnPropertyNames(o: any): string[];
- /**
+ /**
+ * Creates an object that has null prototype.
+ * @param o Object to use as a prototype. May be null
+ */
+ create(o: null): any;
+
+ /**
* Creates an object that has the specified prototype, and that optionally contains specified properties.
* @param o Object to use as a prototype. May be null
- * @param properties JavaScript object that contains one or more property descriptors.
*/
- create(o: any, properties?: PropertyDescriptorMap): any;
+ create<T>(o: T): T;
/**
- * Adds a property to an object, or modifies attributes of an existing property.
+ * Creates an object that has the specified prototype, and that optionally contains specified properties.
+ * @param o Object to use as a prototype. May be null
+ * @param properties JavaScript object that contains one or more property descriptors.
+ */
+ create(o: any, properties: PropertyDescriptorMap): any;
+
+ /**
+ * Adds a property to an object, or modifies attributes of an existing property.
* @param o Object on which to add or modify the property. This can be a native JavaScript object (that is, a user-defined object or a built in object) or a DOM object.
* @param p The property name.
* @param attributes Descriptor for the property. It can be for a data property or an accessor property.
@@ -1502,7 +180,7 @@ interface ObjectConstructor {
defineProperty(o: any, p: string, attributes: PropertyDescriptor): any;
/**
- * Adds one or more properties to an object, and/or modifies attributes of existing properties.
+ * Adds one or more properties to an object, and/or modifies attributes of existing properties.
* @param o Object on which to add or modify the properties. This can be a native JavaScript object or a DOM object.
* @param properties JavaScript object that contains one or more descriptor objects. Each descriptor object describes a data property or an accessor property.
*/
@@ -1510,7 +188,7 @@ interface ObjectConstructor {
/**
* Prevents the modification of attributes of existing properties, and prevents the addition of new properties.
- * @param o Object on which to lock the attributes.
+ * @param o Object on which to lock the attributes.
*/
seal<T>(o: T): T;
@@ -1522,25 +200,25 @@ interface ObjectConstructor {
/**
* Prevents the addition of new properties to an object.
- * @param o Object to make non-extensible.
+ * @param o Object to make non-extensible.
*/
preventExtensions<T>(o: T): T;
/**
* Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object.
- * @param o Object to test.
+ * @param o Object to test.
*/
isSealed(o: any): boolean;
/**
* Returns true if existing property attributes and values cannot be modified in an object, and new properties cannot be added to the object.
- * @param o Object to test.
+ * @param o Object to test.
*/
isFrozen(o: any): boolean;
/**
* Returns a value that indicates whether new properties can be added to an object.
- * @param o Object to test.
+ * @param o Object to test.
*/
isExtensible(o: any): boolean;
@@ -1554,7 +232,7 @@ interface ObjectConstructor {
/**
* Provides functionality common to all JavaScript objects.
*/
-declare var Object: ObjectConstructor;
+declare const Object: ObjectConstructor;
/**
* Creates a new function.
@@ -1565,25 +243,25 @@ interface Function {
* @param thisArg The object to be used as the this object.
* @param argArray A set of arguments to be passed to the function.
*/
- apply(thisArg: any, argArray?: any): any;
+ apply(this: Function, thisArg: any, argArray?: any): any;
/**
* Calls a method of an object, substituting another object for the current object.
* @param thisArg The object to be used as the current object.
* @param argArray A list of arguments to be passed to the method.
*/
- call(thisArg: any, ...argArray: any[]): any;
+ call(this: Function, thisArg: any, ...argArray: any[]): any;
/**
- * For a given function, creates a bound function that has the same body as the original function.
+ * For a given function, creates a bound function that has the same body as the original function.
* The this object of the bound function is associated with the specified object, and has the specified initial parameters.
* @param thisArg An object to which the this keyword can refer inside the new function.
* @param argArray A list of arguments to be passed to the new function.
*/
- bind(thisArg: any, ...argArray: any[]): any;
+ bind(this: Function, thisArg: any, ...argArray: any[]): any;
prototype: any;
- length: number;
+ readonly length: number;
// Non-standard extensions
arguments: any;
@@ -1597,10 +275,10 @@ interface FunctionConstructor {
*/
new (...args: string[]): Function;
(...args: string[]): Function;
- prototype: Function;
+ readonly prototype: Function;
}
-declare var Function: FunctionConstructor;
+declare const Function: FunctionConstructor;
interface IArguments {
[index: number]: any;
@@ -1618,7 +296,7 @@ interface String {
*/
charAt(pos: number): string;
- /**
+ /**
* Returns the Unicode value of the character at the specified location.
* @param index The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.
*/
@@ -1626,12 +304,12 @@ interface String {
/**
* Returns a string that contains the concatenation of two or more strings.
- * @param strings The strings to append to the end of the string.
+ * @param strings The strings to append to the end of the string.
*/
concat(...strings: string[]): string;
/**
- * Returns the position of the first occurrence of a substring.
+ * Returns the position of the first occurrence of a substring.
* @param searchString The substring to search for in the string
* @param position The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.
*/
@@ -1650,17 +328,17 @@ interface String {
*/
localeCompare(that: string): number;
- /**
+ /**
* Matches a string with a regular expression, and returns an array containing the results of that search.
* @param regexp A variable name or string literal containing the regular expression pattern and flags.
*/
- match(regexp: string): RegExpMatchArray;
+ match(regexp: string): RegExpMatchArray | null;
- /**
+ /**
* Matches a string with a regular expression, and returns an array containing the results of that search.
- * @param regexp A regular expression object that contains the regular expression pattern and applicable flags.
+ * @param regexp A regular expression object that contains the regular expression pattern and applicable flags.
*/
- match(regexp: RegExp): RegExpMatchArray;
+ match(regexp: RegExp): RegExpMatchArray | null;
/**
* Replaces text in a string, using a regular expression or search string.
@@ -1692,40 +370,40 @@ interface String {
/**
* Finds the first substring match in a regular expression search.
- * @param regexp The regular expression pattern and applicable flags.
+ * @param regexp The regular expression pattern and applicable flags.
*/
search(regexp: string): number;
/**
* Finds the first substring match in a regular expression search.
- * @param regexp The regular expression pattern and applicable flags.
+ * @param regexp The regular expression pattern and applicable flags.
*/
search(regexp: RegExp): number;
/**
* Returns a section of a string.
- * @param start The index to the beginning of the specified portion of stringObj.
- * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end.
+ * @param start The index to the beginning of the specified portion of stringObj.
+ * @param end The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end.
* If this value is not specified, the substring continues to the end of stringObj.
*/
slice(start?: number, end?: number): string;
/**
* Split a string into substrings using the specified separator and return them as an array.
- * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.
+ * @param separator A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.
* @param limit A value used to limit the number of elements returned in the array.
*/
split(separator: string, limit?: number): string[];
/**
* Split a string into substrings using the specified separator and return them as an array.
- * @param separator A Regular Express that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.
+ * @param separator A Regular Express that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.
* @param limit A value used to limit the number of elements returned in the array.
*/
split(separator: RegExp, limit?: number): string[];
/**
- * Returns the substring at the specified location within a String object.
+ * Returns the substring at the specified location within a String object.
* @param start The zero-based index number indicating the beginning of the substring.
* @param end Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end.
* If end is omitted, the characters from start through the end of the original string are returned.
@@ -1748,7 +426,7 @@ interface String {
trim(): string;
/** Returns the length of a String object. */
- length: number;
+ readonly length: number;
// IE extensions
/**
@@ -1761,20 +439,20 @@ interface String {
/** Returns the primitive value of the specified object. */
valueOf(): string;
- [index: number]: string;
+ readonly [index: number]: string;
}
interface StringConstructor {
new (value?: any): String;
(value?: any): string;
- prototype: String;
+ readonly prototype: String;
fromCharCode(...codes: number[]): string;
}
-/**
- * Allows manipulation and formatting of text strings and determination and location of substrings within strings.
+/**
+ * Allows manipulation and formatting of text strings and determination and location of substrings within strings.
*/
-declare var String: StringConstructor;
+declare const String: StringConstructor;
interface Boolean {
/** Returns the primitive value of the specified object. */
@@ -1784,10 +462,10 @@ interface Boolean {
interface BooleanConstructor {
new (value?: any): Boolean;
(value?: any): boolean;
- prototype: Boolean;
+ readonly prototype: Boolean;
}
-declare var Boolean: BooleanConstructor;
+declare const Boolean: BooleanConstructor;
interface Number {
/**
@@ -1796,7 +474,7 @@ interface Number {
*/
toString(radix?: number): string;
- /**
+ /**
* Returns a string representing a number in fixed-point notation.
* @param fractionDigits Number of digits after the decimal point. Must be in the range 0 - 20, inclusive.
*/
@@ -1821,75 +499,75 @@ interface Number {
interface NumberConstructor {
new (value?: any): Number;
(value?: any): number;
- prototype: Number;
+ readonly prototype: Number;
/** The largest number that can be represented in JavaScript. Equal to approximately 1.79E+308. */
- MAX_VALUE: number;
+ readonly MAX_VALUE: number;
/** The closest number to zero that can be represented in JavaScript. Equal to approximately 5.00E-324. */
- MIN_VALUE: number;
+ readonly MIN_VALUE: number;
- /**
+ /**
* A value that is not a number.
* In equality comparisons, NaN does not equal any value, including itself. To test whether a value is equivalent to NaN, use the isNaN function.
*/
- NaN: number;
+ readonly NaN: number;
- /**
+ /**
* A value that is less than the largest negative number that can be represented in JavaScript.
- * JavaScript displays NEGATIVE_INFINITY values as -infinity.
+ * JavaScript displays NEGATIVE_INFINITY values as -infinity.
*/
- NEGATIVE_INFINITY: number;
+ readonly NEGATIVE_INFINITY: number;
/**
- * A value greater than the largest number that can be represented in JavaScript.
- * JavaScript displays POSITIVE_INFINITY values as infinity.
+ * A value greater than the largest number that can be represented in JavaScript.
+ * JavaScript displays POSITIVE_INFINITY values as infinity.
*/
- POSITIVE_INFINITY: number;
+ readonly POSITIVE_INFINITY: number;
}
/** An object that represents a number of any kind. All JavaScript numbers are 64-bit floating-point numbers. */
-declare var Number: NumberConstructor;
+declare const Number: NumberConstructor;
-interface TemplateStringsArray extends Array<string> {
- raw: string[];
+interface TemplateStringsArray extends ReadonlyArray<string> {
+ readonly raw: ReadonlyArray<string>
}
interface Math {
/** The mathematical constant e. This is Euler's number, the base of natural logarithms. */
- E: number;
+ readonly E: number;
/** The natural logarithm of 10. */
- LN10: number;
+ readonly LN10: number;
/** The natural logarithm of 2. */
- LN2: number;
+ readonly LN2: number;
/** The base-2 logarithm of e. */
- LOG2E: number;
+ readonly LOG2E: number;
/** The base-10 logarithm of e. */
- LOG10E: number;
+ readonly LOG10E: number;
/** Pi. This is the ratio of the circumference of a circle to its diameter. */
- PI: number;
+ readonly PI: number;
/** The square root of 0.5, or, equivalently, one divided by the square root of 2. */
- SQRT1_2: number;
+ readonly SQRT1_2: number;
/** The square root of 2. */
- SQRT2: number;
+ readonly SQRT2: number;
/**
- * Returns the absolute value of a number (the value without regard to whether it is positive or negative).
+ * Returns the absolute value of a number (the value without regard to whether it is positive or negative).
* For example, the absolute value of -5 is the same as the absolute value of 5.
* @param x A numeric expression for which the absolute value is needed.
*/
abs(x: number): number;
/**
- * Returns the arc cosine (or inverse cosine) of a number.
+ * Returns the arc cosine (or inverse cosine) of a number.
* @param x A numeric expression.
*/
acos(x: number): number;
- /**
- * Returns the arcsine of a number.
+ /**
+ * Returns the arcsine of a number.
* @param x A numeric expression.
*/
asin(x: number): number;
/**
- * Returns the arctangent of a number.
+ * Returns the arctangent of a number.
* @param x A numeric expression for which the arctangent is needed.
*/
atan(x: number): number;
@@ -1900,49 +578,49 @@ interface Math {
*/
atan2(y: number, x: number): number;
/**
- * Returns the smallest number greater than or equal to its numeric argument.
+ * Returns the smallest number greater than or equal to its numeric argument.
* @param x A numeric expression.
*/
ceil(x: number): number;
/**
- * Returns the cosine of a number.
+ * Returns the cosine of a number.
* @param x A numeric expression that contains an angle measured in radians.
*/
cos(x: number): number;
/**
- * Returns e (the base of natural logarithms) raised to a power.
+ * Returns e (the base of natural logarithms) raised to a power.
* @param x A numeric expression representing the power of e.
*/
exp(x: number): number;
/**
- * Returns the greatest number less than or equal to its numeric argument.
+ * Returns the greatest number less than or equal to its numeric argument.
* @param x A numeric expression.
*/
floor(x: number): number;
/**
- * Returns the natural logarithm (base e) of a number.
+ * Returns the natural logarithm (base e) of a number.
* @param x A numeric expression.
*/
log(x: number): number;
/**
- * Returns the larger of a set of supplied numeric expressions.
+ * Returns the larger of a set of supplied numeric expressions.
* @param values Numeric expressions to be evaluated.
*/
max(...values: number[]): number;
/**
- * Returns the smaller of a set of supplied numeric expressions.
+ * Returns the smaller of a set of supplied numeric expressions.
* @param values Numeric expressions to be evaluated.
*/
min(...values: number[]): number;
/**
- * Returns the value of a base expression taken to a specified power.
+ * Returns the value of a base expression taken to a specified power.
* @param x The base value of the expression.
* @param y The exponent value of the expression.
*/
pow(x: number, y: number): number;
/** Returns a pseudorandom number between 0 and 1. */
random(): number;
- /**
+ /**
* Returns a supplied numeric expression rounded to the nearest number.
* @param x The value to be rounded to the nearest number.
*/
@@ -1964,7 +642,7 @@ interface Math {
tan(x: number): number;
}
/** An intrinsic object that provides basic mathematics functionality and constants. */
-declare var Math: Math;
+declare const Math: Math;
/** Enables basic storage and retrieval of dates and times. */
interface Date {
@@ -2018,24 +696,24 @@ interface Date {
getUTCMilliseconds(): number;
/** Gets the difference in minutes between the time on the local computer and Universal Coordinated Time (UTC). */
getTimezoneOffset(): number;
- /**
+ /**
* Sets the date and time value in the Date object.
- * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.
+ * @param time A numeric value representing the number of elapsed milliseconds since midnight, January 1, 1970 GMT.
*/
setTime(time: number): number;
/**
- * Sets the milliseconds value in the Date object using local time.
+ * Sets the milliseconds value in the Date object using local time.
* @param ms A numeric value equal to the millisecond value.
*/
setMilliseconds(ms: number): number;
- /**
+ /**
* Sets the milliseconds value in the Date object using Universal Coordinated Time (UTC).
- * @param ms A numeric value equal to the millisecond value.
+ * @param ms A numeric value equal to the millisecond value.
*/
setUTCMilliseconds(ms: number): number;
/**
- * Sets the seconds value in the Date object using local time.
+ * Sets the seconds value in the Date object using local time.
* @param sec A numeric value equal to the seconds value.
* @param ms A numeric value equal to the milliseconds value.
*/
@@ -2047,16 +725,16 @@ interface Date {
*/
setUTCSeconds(sec: number, ms?: number): number;
/**
- * Sets the minutes value in the Date object using local time.
- * @param min A numeric value equal to the minutes value.
- * @param sec A numeric value equal to the seconds value.
+ * Sets the minutes value in the Date object using local time.
+ * @param min A numeric value equal to the minutes value.
+ * @param sec A numeric value equal to the seconds value.
* @param ms A numeric value equal to the milliseconds value.
*/
setMinutes(min: number, sec?: number, ms?: number): number;
/**
* Sets the minutes value in the Date object using Universal Coordinated Time (UTC).
- * @param min A numeric value equal to the minutes value.
- * @param sec A numeric value equal to the seconds value.
+ * @param min A numeric value equal to the minutes value.
+ * @param sec A numeric value equal to the seconds value.
* @param ms A numeric value equal to the milliseconds value.
*/
setUTCMinutes(min: number, sec?: number, ms?: number): number;
@@ -2064,7 +742,7 @@ interface Date {
* Sets the hour value in the Date object using local time.
* @param hours A numeric value equal to the hours value.
* @param min A numeric value equal to the minutes value.
- * @param sec A numeric value equal to the seconds value.
+ * @param sec A numeric value equal to the seconds value.
* @param ms A numeric value equal to the milliseconds value.
*/
setHours(hours: number, min?: number, sec?: number, ms?: number): number;
@@ -2072,23 +750,23 @@ interface Date {
* Sets the hours value in the Date object using Universal Coordinated Time (UTC).
* @param hours A numeric value equal to the hours value.
* @param min A numeric value equal to the minutes value.
- * @param sec A numeric value equal to the seconds value.
+ * @param sec A numeric value equal to the seconds value.
* @param ms A numeric value equal to the milliseconds value.
*/
setUTCHours(hours: number, min?: number, sec?: number, ms?: number): number;
/**
- * Sets the numeric day-of-the-month value of the Date object using local time.
+ * Sets the numeric day-of-the-month value of the Date object using local time.
* @param date A numeric value equal to the day of the month.
*/
setDate(date: number): number;
- /**
+ /**
* Sets the numeric day of the month in the Date object using Universal Coordinated Time (UTC).
- * @param date A numeric value equal to the day of the month.
+ * @param date A numeric value equal to the day of the month.
*/
setUTCDate(date: number): number;
- /**
- * Sets the month value in the Date object using local time.
- * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
+ /**
+ * Sets the month value in the Date object using local time.
+ * @param month A numeric value equal to the month. The value for January is 0, and other month values follow consecutively.
* @param date A numeric value representing the day of the month. If this value is not supplied, the value from a call to the getDate method is used.
*/
setMonth(month: number, date?: number): number;
@@ -2126,14 +804,14 @@ interface DateConstructor {
new (value: string): Date;
new (year: number, month: number, date?: number, hours?: number, minutes?: number, seconds?: number, ms?: number): Date;
(): string;
- prototype: Date;
+ readonly prototype: Date;
/**
* Parses a string containing a date, and returns the number of milliseconds between that date and midnight, January 1, 1970.
* @param s A date string
*/
parse(s: string): number;
/**
- * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.
+ * Returns the number of milliseconds between midnight, January 1, 1970 Universal Coordinated Time (UTC) (or GMT) and the specified date.
* @param year The full year designation is required for cross-century date accuracy. If year is between 0 and 99 is used, then year is assumed to be 1900 + year.
* @param month The month as an number between 0 and 11 (January to December).
* @param date The date as an number between 1 and 31.
@@ -2146,7 +824,7 @@ interface DateConstructor {
now(): number;
}
-declare var Date: DateConstructor;
+declare const Date: DateConstructor;
interface RegExpMatchArray extends Array<string> {
index?: number;
@@ -2159,40 +837,42 @@ interface RegExpExecArray extends Array<string> {
}
interface RegExp {
- /**
+ /**
* Executes a search on a string using a regular expression pattern, and returns an array containing the results of that search.
* @param string The String object or string literal on which to perform the search.
*/
- exec(string: string): RegExpExecArray;
+ exec(string: string): RegExpExecArray | null;
- /**
+ /**
* Returns a Boolean value that indicates whether or not a pattern exists in a searched string.
* @param string String on which to perform the search.
*/
test(string: string): boolean;
/** Returns a copy of the text of the regular expression pattern. Read-only. The regExp argument is a Regular expression object. It can be a variable name or a literal. */
- source: string;
+ readonly source: string;
/** Returns a Boolean value indicating the state of the global flag (g) used with a regular expression. Default is false. Read-only. */
- global: boolean;
+ readonly global: boolean;
/** Returns a Boolean value indicating the state of the ignoreCase flag (i) used with a regular expression. Default is false. Read-only. */
- ignoreCase: boolean;
+ readonly ignoreCase: boolean;
/** Returns a Boolean value indicating the state of the multiline flag (m) used with a regular expression. Default is false. Read-only. */
- multiline: boolean;
+ readonly multiline: boolean;
lastIndex: number;
// Non-standard extensions
- compile(): RegExp;
+ compile(): this;
}
interface RegExpConstructor {
+ new (pattern: RegExp): RegExp;
new (pattern: string, flags?: string): RegExp;
+ (pattern: RegExp): RegExp;
(pattern: string, flags?: string): RegExp;
- prototype: RegExp;
+ readonly prototype: RegExp;
// Non-standard extensions
$1: string;
@@ -2207,20 +887,21 @@ interface RegExpConstructor {
lastMatch: string;
}
-declare var RegExp: RegExpConstructor;
+declare const RegExp: RegExpConstructor;
interface Error {
name: string;
message: string;
+ stack?: string;
}
interface ErrorConstructor {
new (message?: string): Error;
(message?: string): Error;
- prototype: Error;
+ readonly prototype: Error;
}
-declare var Error: ErrorConstructor;
+declare const Error: ErrorConstructor;
interface EvalError extends Error {
}
@@ -2228,10 +909,10 @@ interface EvalError extends Error {
interface EvalErrorConstructor {
new (message?: string): EvalError;
(message?: string): EvalError;
- prototype: EvalError;
+ readonly prototype: EvalError;
}
-declare var EvalError: EvalErrorConstructor;
+declare const EvalError: EvalErrorConstructor;
interface RangeError extends Error {
}
@@ -2239,10 +920,10 @@ interface RangeError extends Error {
interface RangeErrorConstructor {
new (message?: string): RangeError;
(message?: string): RangeError;
- prototype: RangeError;
+ readonly prototype: RangeError;
}
-declare var RangeError: RangeErrorConstructor;
+declare const RangeError: RangeErrorConstructor;
interface ReferenceError extends Error {
}
@@ -2250,10 +931,10 @@ interface ReferenceError extends Error {
interface ReferenceErrorConstructor {
new (message?: string): ReferenceError;
(message?: string): ReferenceError;
- prototype: ReferenceError;
+ readonly prototype: ReferenceError;
}
-declare var ReferenceError: ReferenceErrorConstructor;
+declare const ReferenceError: ReferenceErrorConstructor;
interface SyntaxError extends Error {
}
@@ -2261,10 +942,10 @@ interface SyntaxError extends Error {
interface SyntaxErrorConstructor {
new (message?: string): SyntaxError;
(message?: string): SyntaxError;
- prototype: SyntaxError;
+ readonly prototype: SyntaxError;
}
-declare var SyntaxError: SyntaxErrorConstructor;
+declare const SyntaxError: SyntaxErrorConstructor;
interface TypeError extends Error {
}
@@ -2272,10 +953,10 @@ interface TypeError extends Error {
interface TypeErrorConstructor {
new (message?: string): TypeError;
(message?: string): TypeError;
- prototype: TypeError;
+ readonly prototype: TypeError;
}
-declare var TypeError: TypeErrorConstructor;
+declare const TypeError: TypeErrorConstructor;
interface URIError extends Error {
}
@@ -2283,61 +964,152 @@ interface URIError extends Error {
interface URIErrorConstructor {
new (message?: string): URIError;
(message?: string): URIError;
- prototype: URIError;
+ readonly prototype: URIError;
}
-declare var URIError: URIErrorConstructor;
+declare const URIError: URIErrorConstructor;
interface JSON {
/**
* Converts a JavaScript Object Notation (JSON) string into an object.
* @param text A valid JSON string.
- * @param reviver A function that transforms the results. This function is called for each member of the object.
- * If a member contains nested objects, the nested objects are transformed before the parent object is.
+ * @param reviver A function that transforms the results. This function is called for each member of the object.
+ * If a member contains nested objects, the nested objects are transformed before the parent object is.
*/
parse(text: string, reviver?: (key: any, value: any) => any): any;
/**
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
* @param value A JavaScript value, usually an object or array, to be converted.
- */
- stringify(value: any): string;
- /**
- * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
- * @param value A JavaScript value, usually an object or array, to be converted.
- * @param replacer A function that transforms the results.
- */
- stringify(value: any, replacer: (key: string, value: any) => any): string;
- /**
- * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
- * @param value A JavaScript value, usually an object or array, to be converted.
- * @param replacer Array that transforms the results.
- */
- stringify(value: any, replacer: any[]): string;
- /**
- * Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
- * @param value A JavaScript value, usually an object or array, to be converted.
* @param replacer A function that transforms the results.
* @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
*/
- stringify(value: any, replacer: (key: string, value: any) => any, space: string | number): string;
+ stringify(value: any, replacer?: (key: string, value: any) => any, space?: string | number): string;
/**
* Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
* @param value A JavaScript value, usually an object or array, to be converted.
- * @param replacer Array that transforms the results.
+ * @param replacer An array of strings and numbers that acts as a approved list for selecting the object properties that will be stringified.
* @param space Adds indentation, white space, and line break characters to the return-value JSON text to make it easier to read.
*/
- stringify(value: any, replacer: any[], space: string | number): string;
+ stringify(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
}
+
/**
* An intrinsic object that provides functions to convert JavaScript values to and from the JavaScript Object Notation (JSON) format.
*/
-declare var JSON: JSON;
+declare const JSON: JSON;
/////////////////////////////
/// ECMAScript Array API (specially handled by compiler)
/////////////////////////////
+interface ReadonlyArray<T> {
+ /**
+ * Gets the length of the array. This is a number one higher than the highest element defined in an array.
+ */
+ readonly length: number;
+ /**
+ * Returns a string representation of an array.
+ */
+ toString(): string;
+ toLocaleString(): string;
+ /**
+ * Combines two or more arrays.
+ * @param items Additional items to add to the end of array1.
+ */
+ concat<U extends ReadonlyArray<T>>(...items: U[]): T[];
+ /**
+ * Combines two or more arrays.
+ * @param items Additional items to add to the end of array1.
+ */
+ concat(...items: T[][]): T[];
+ /**
+ * Combines two or more arrays.
+ * @param items Additional items to add to the end of array1.
+ */
+ concat(...items: (T | T[])[]): T[];
+ /**
+ * Adds all the elements of an array separated by the specified separator string.
+ * @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
+ */
+ join(separator?: string): string;
+ /**
+ * Returns a section of an array.
+ * @param start The beginning of the specified portion of the array.
+ * @param end The end of the specified portion of the array.
+ */
+ slice(start?: number, end?: number): T[];
+ /**
+ * Returns the index of the first occurrence of a value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
+ */
+ indexOf(searchElement: T, fromIndex?: number): number;
+
+ /**
+ * Returns the index of the last occurrence of a specified value in an array.
+ * @param searchElement The value to locate in the array.
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.
+ */
+ lastIndexOf(searchElement: T, fromIndex?: number): number;
+ /**
+ * Determines whether all the members of an array satisfy the specified test.
+ * @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ every(callbackfn: (value: T, index: number, array: ReadonlyArray<T>) => boolean, thisArg?: any): boolean;
+ /**
+ * Determines whether the specified callback function returns true for any element of an array.
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ some(callbackfn: (value: T, index: number, array: ReadonlyArray<T>) => boolean, thisArg?: any): boolean;
+ /**
+ * Performs the specified action for each element in an array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ forEach(callbackfn: (value: T, index: number, array: ReadonlyArray<T>) => void, thisArg?: any): void;
+ /**
+ * Calls a defined callback function on each element of an array, and returns an array that contains the results.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ map<U>(callbackfn: (value: T, index: number, array: ReadonlyArray<T>) => U, thisArg?: any): U[];
+ /**
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
+ */
+ filter(callbackfn: (value: T, index: number, array: ReadonlyArray<T>) => any, thisArg?: any): T[];
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: ReadonlyArray<T>) => T, initialValue?: T): T;
+ /**
+ * Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: ReadonlyArray<T>) => U, initialValue: U): U;
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: ReadonlyArray<T>) => T, initialValue?: T): T;
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
+ */
+ reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: ReadonlyArray<T>) => U, initialValue: U): U;
+
+ readonly [n: number]: T;
+}
+
interface Array<T> {
/**
* Gets or sets the length of the array. This is a number one higher than the highest element defined in an array.
@@ -2356,49 +1128,46 @@ interface Array<T> {
/**
* Removes the last element from an array and returns it.
*/
- pop(): T;
+ pop(): T | undefined;
/**
* Combines two or more arrays.
* @param items Additional items to add to the end of array1.
*/
- concat<U extends T[]>(...items: U[]): T[];
+ concat(...items: T[][]): T[];
/**
* Combines two or more arrays.
* @param items Additional items to add to the end of array1.
*/
- concat(...items: T[]): T[];
+ concat(...items: (T | T[])[]): T[];
/**
* Adds all the elements of an array separated by the specified separator string.
* @param separator A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
*/
join(separator?: string): string;
/**
- * Reverses the elements in an Array.
+ * Reverses the elements in an Array.
*/
reverse(): T[];
/**
* Removes the first element from an array and returns it.
*/
- shift(): T;
- /**
+ shift(): T | undefined;
+ /**
* Returns a section of an array.
* @param start The beginning of the specified portion of the array.
* @param end The end of the specified portion of the array.
*/
slice(start?: number, end?: number): T[];
-
/**
* Sorts an array.
* @param compareFn The name of the function used to determine the order of the elements. If omitted, the elements are sorted in ascending, ASCII character order.
*/
- sort(compareFn?: (a: T, b: T) => number): T[];
-
+ sort(compareFn?: (a: T, b: T) => number): this;
/**
* Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
* @param start The zero-based location in the array from which to start removing elements.
*/
splice(start: number): T[];
-
/**
* Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
* @param start The zero-based location in the array from which to start removing elements.
@@ -2406,62 +1175,53 @@ interface Array<T> {
* @param items Elements to insert into the array in place of the deleted elements.
*/
splice(start: number, deleteCount: number, ...items: T[]): T[];
-
/**
* Inserts new elements at the start of an array.
* @param items Elements to insert at the start of the Array.
*/
unshift(...items: T[]): number;
-
/**
* Returns the index of the first occurrence of a value in an array.
* @param searchElement The value to locate in the array.
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
*/
indexOf(searchElement: T, fromIndex?: number): number;
-
/**
* Returns the index of the last occurrence of a specified value in an array.
* @param searchElement The value to locate in the array.
* @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.
*/
lastIndexOf(searchElement: T, fromIndex?: number): number;
-
/**
* Determines whether all the members of an array satisfy the specified test.
* @param callbackfn A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array.
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
*/
every(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean;
-
/**
* Determines whether the specified callback function returns true for any element of an array.
* @param callbackfn A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array.
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
*/
some(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): boolean;
-
/**
* Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
*/
forEach(callbackfn: (value: T, index: number, array: T[]) => void, thisArg?: any): void;
-
/**
* Calls a defined callback function on each element of an array, and returns an array that contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
*/
map<U>(callbackfn: (value: T, index: number, array: T[]) => U, thisArg?: any): U[];
-
/**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls the callbackfn function one time for each element in the array.
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
*/
- filter(callbackfn: (value: T, index: number, array: T[]) => boolean, thisArg?: any): T[];
-
+ filter(callbackfn: (value: T, index: number, array: T[]) => any, thisArg?: any): T[];
/**
* Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
* @param callbackfn A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
@@ -2474,16 +1234,15 @@ interface Array<T> {
* @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
*/
reduce<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
-
- /**
+ /**
* Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
* @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
*/
reduceRight(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T, initialValue?: T): T;
- /**
+ /**
* Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
* @param initialValue If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
*/
reduceRight<U>(callbackfn: (previousValue: U, currentValue: T, currentIndex: number, array: T[]) => U, initialValue: U): U;
@@ -2499,10 +1258,10 @@ interface ArrayConstructor {
<T>(arrayLength: number): T[];
<T>(...items: T[]): T[];
isArray(arg: any): arg is Array<any>;
- prototype: Array<any>;
+ readonly prototype: Array<any>;
}
-declare var Array: ArrayConstructor;
+declare const Array: ArrayConstructor;
interface TypedPropertyDescriptor<T> {
enumerable?: boolean;
@@ -2532,22 +1291,21 @@ interface PromiseLike<T> {
}
interface ArrayLike<T> {
- length: number;
- [n: number]: T;
+ readonly length: number;
+ readonly [n: number]: T;
}
-
/**
- * Represents a raw buffer of binary data, which is used to store data for the
- * different typed arrays. ArrayBuffers cannot be read from or written to directly,
- * but can be passed to a typed array or DataView Object to interpret the raw
- * buffer as needed.
+ * Represents a raw buffer of binary data, which is used to store data for the
+ * different typed arrays. ArrayBuffers cannot be read from or written to directly,
+ * but can be passed to a typed array or DataView Object to interpret the raw
+ * buffer as needed.
*/
interface ArrayBuffer {
/**
* Read-only. The length of the ArrayBuffer (in bytes).
*/
- byteLength: number;
+ readonly byteLength: number;
/**
* Returns a section of an ArrayBuffer.
@@ -2556,15 +1314,15 @@ interface ArrayBuffer {
}
interface ArrayBufferConstructor {
- prototype: ArrayBuffer;
+ readonly prototype: ArrayBuffer;
new (byteLength: number): ArrayBuffer;
isView(arg: any): arg is ArrayBufferView;
}
-declare var ArrayBuffer: ArrayBufferConstructor;
+declare const ArrayBuffer: ArrayBufferConstructor;
interface ArrayBufferView {
/**
- * The ArrayBuffer instance referenced by the array.
+ * The ArrayBuffer instance referenced by the array.
*/
buffer: ArrayBuffer;
@@ -2580,128 +1338,128 @@ interface ArrayBufferView {
}
interface DataView {
- buffer: ArrayBuffer;
- byteLength: number;
- byteOffset: number;
+ readonly buffer: ArrayBuffer;
+ readonly byteLength: number;
+ readonly byteOffset: number;
/**
- * Gets the Float32 value at the specified byte offset from the start of the view. There is
- * no alignment constraint; multi-byte values may be fetched from any offset.
+ * Gets the Float32 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
* @param byteOffset The place in the buffer at which the value should be retrieved.
*/
getFloat32(byteOffset: number, littleEndian?: boolean): number;
/**
* Gets the Float64 value at the specified byte offset from the start of the view. There is
- * no alignment constraint; multi-byte values may be fetched from any offset.
+ * no alignment constraint; multi-byte values may be fetched from any offset.
* @param byteOffset The place in the buffer at which the value should be retrieved.
*/
getFloat64(byteOffset: number, littleEndian?: boolean): number;
/**
- * Gets the Int8 value at the specified byte offset from the start of the view. There is
- * no alignment constraint; multi-byte values may be fetched from any offset.
+ * Gets the Int8 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
* @param byteOffset The place in the buffer at which the value should be retrieved.
*/
getInt8(byteOffset: number): number;
/**
- * Gets the Int16 value at the specified byte offset from the start of the view. There is
- * no alignment constraint; multi-byte values may be fetched from any offset.
+ * Gets the Int16 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
* @param byteOffset The place in the buffer at which the value should be retrieved.
*/
getInt16(byteOffset: number, littleEndian?: boolean): number;
/**
- * Gets the Int32 value at the specified byte offset from the start of the view. There is
- * no alignment constraint; multi-byte values may be fetched from any offset.
+ * Gets the Int32 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
* @param byteOffset The place in the buffer at which the value should be retrieved.
*/
getInt32(byteOffset: number, littleEndian?: boolean): number;
/**
- * Gets the Uint8 value at the specified byte offset from the start of the view. There is
- * no alignment constraint; multi-byte values may be fetched from any offset.
+ * Gets the Uint8 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
* @param byteOffset The place in the buffer at which the value should be retrieved.
*/
getUint8(byteOffset: number): number;
/**
- * Gets the Uint16 value at the specified byte offset from the start of the view. There is
- * no alignment constraint; multi-byte values may be fetched from any offset.
+ * Gets the Uint16 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
* @param byteOffset The place in the buffer at which the value should be retrieved.
*/
getUint16(byteOffset: number, littleEndian?: boolean): number;
/**
- * Gets the Uint32 value at the specified byte offset from the start of the view. There is
- * no alignment constraint; multi-byte values may be fetched from any offset.
+ * Gets the Uint32 value at the specified byte offset from the start of the view. There is
+ * no alignment constraint; multi-byte values may be fetched from any offset.
* @param byteOffset The place in the buffer at which the value should be retrieved.
*/
getUint32(byteOffset: number, littleEndian?: boolean): number;
/**
- * Stores an Float32 value at the specified byte offset from the start of the view.
+ * Stores an Float32 value at the specified byte offset from the start of the view.
* @param byteOffset The place in the buffer at which the value should be set.
* @param value The value to set.
- * @param littleEndian If false or undefined, a big-endian value should be written,
+ * @param littleEndian If false or undefined, a big-endian value should be written,
* otherwise a little-endian value should be written.
*/
setFloat32(byteOffset: number, value: number, littleEndian?: boolean): void;
/**
- * Stores an Float64 value at the specified byte offset from the start of the view.
+ * Stores an Float64 value at the specified byte offset from the start of the view.
* @param byteOffset The place in the buffer at which the value should be set.
* @param value The value to set.
- * @param littleEndian If false or undefined, a big-endian value should be written,
+ * @param littleEndian If false or undefined, a big-endian value should be written,
* otherwise a little-endian value should be written.
*/
setFloat64(byteOffset: number, value: number, littleEndian?: boolean): void;
/**
- * Stores an Int8 value at the specified byte offset from the start of the view.
+ * Stores an Int8 value at the specified byte offset from the start of the view.
* @param byteOffset The place in the buffer at which the value should be set.
* @param value The value to set.
*/
setInt8(byteOffset: number, value: number): void;
/**
- * Stores an Int16 value at the specified byte offset from the start of the view.
+ * Stores an Int16 value at the specified byte offset from the start of the view.
* @param byteOffset The place in the buffer at which the value should be set.
* @param value The value to set.
- * @param littleEndian If false or undefined, a big-endian value should be written,
+ * @param littleEndian If false or undefined, a big-endian value should be written,
* otherwise a little-endian value should be written.
*/
setInt16(byteOffset: number, value: number, littleEndian?: boolean): void;
/**
- * Stores an Int32 value at the specified byte offset from the start of the view.
+ * Stores an Int32 value at the specified byte offset from the start of the view.
* @param byteOffset The place in the buffer at which the value should be set.
* @param value The value to set.
- * @param littleEndian If false or undefined, a big-endian value should be written,
+ * @param littleEndian If false or undefined, a big-endian value should be written,
* otherwise a little-endian value should be written.
*/
setInt32(byteOffset: number, value: number, littleEndian?: boolean): void;
/**
- * Stores an Uint8 value at the specified byte offset from the start of the view.
+ * Stores an Uint8 value at the specified byte offset from the start of the view.
* @param byteOffset The place in the buffer at which the value should be set.
* @param value The value to set.
*/
setUint8(byteOffset: number, value: number): void;
/**
- * Stores an Uint16 value at the specified byte offset from the start of the view.
+ * Stores an Uint16 value at the specified byte offset from the start of the view.
* @param byteOffset The place in the buffer at which the value should be set.
* @param value The value to set.
- * @param littleEndian If false or undefined, a big-endian value should be written,
+ * @param littleEndian If false or undefined, a big-endian value should be written,
* otherwise a little-endian value should be written.
*/
setUint16(byteOffset: number, value: number, littleEndian?: boolean): void;
/**
- * Stores an Uint32 value at the specified byte offset from the start of the view.
+ * Stores an Uint32 value at the specified byte offset from the start of the view.
* @param byteOffset The place in the buffer at which the value should be set.
* @param value The value to set.
- * @param littleEndian If false or undefined, a big-endian value should be written,
+ * @param littleEndian If false or undefined, a big-endian value should be written,
* otherwise a little-endian value should be written.
*/
setUint32(byteOffset: number, value: number, littleEndian?: boolean): void;
@@ -2710,48 +1468,48 @@ interface DataView {
interface DataViewConstructor {
new (buffer: ArrayBuffer, byteOffset?: number, byteLength?: number): DataView;
}
-declare var DataView: DataViewConstructor;
+declare const DataView: DataViewConstructor;
/**
- * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested
+ * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested
* number of bytes could not be allocated an exception is raised.
*/
interface Int8Array {
/**
- * The size in bytes of each element in the array.
+ * The size in bytes of each element in the array.
*/
- BYTES_PER_ELEMENT: number;
+ readonly BYTES_PER_ELEMENT: number;
/**
- * The ArrayBuffer instance referenced by the array.
+ * The ArrayBuffer instance referenced by the array.
*/
- buffer: ArrayBuffer;
+ readonly buffer: ArrayBuffer;
/**
* The length in bytes of the array.
*/
- byteLength: number;
+ readonly byteLength: number;
/**
* The offset in bytes of the array.
*/
- byteOffset: number;
+ readonly byteOffset: number;
- /**
+ /**
* Returns the this object after copying a section of the array identified by start and end
* to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
+ * @param end If not specified, length of the this object is used as its default value.
*/
- copyWithin(target: number, start: number, end?: number): Int8Array;
+ copyWithin(target: number, start: number, end?: number): this;
/**
* Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
* or until the end of the array.
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
@@ -2761,49 +1519,49 @@ interface Int8Array {
/**
* Returns the this object after filling the section identified by start and end with value
* @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
* length+end.
*/
- fill(value: number, start?: number, end?: number): Int8Array;
+ fill(value: number, start?: number, end?: number): this;
/**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
- filter(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): Int8Array;
+ filter(callbackfn: (value: number, index: number, array: Int8Array) => any, thisArg?: any): Int8Array;
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
* otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
* immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
+ * @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
+ find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
- /**
- * Returns the index of the first element in the array where predicate is true, and undefined
+ /**
+ * Returns the index of the first element in the array where predicate is true, and undefined
* otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
forEach(callbackfn: (value: number, index: number, array: Int8Array) => void, thisArg?: any): void;
@@ -2818,7 +1576,7 @@ interface Int8Array {
/**
* Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
+ * @param separator A string used to separate one element of an array from the next in the
* resulting String. If omitted, the array elements are separated with a comma.
*/
join(separator?: string): string;
@@ -2826,7 +1584,7 @@ interface Int8Array {
/**
* Returns the index of the last occurrence of a value in an array.
* @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
*/
lastIndexOf(searchElement: number, fromIndex?: number): number;
@@ -2834,68 +1592,68 @@ interface Int8Array {
/**
* The length of the array.
*/
- length: number;
+ readonly length: number;
/**
- * Calls a defined callback function on each element of an array, and returns an array that
+ * Calls a defined callback function on each element of an array, and returns an array that
* contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
map(callbackfn: (value: number, index: number, array: Int8Array) => number, thisArg?: any): Int8Array;
/**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
* call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
* callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
* the accumulation. The first call to the callbackfn function provides this value as an argument
* instead of an array value.
*/
reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number;
/**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
* call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
* callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
* instead of an array value.
*/
reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
* argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
* argument instead of an array value.
*/
reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int8Array) => number, initialValue?: number): number;
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
* argument in the next call to the callback function.
* @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
* the accumulation. The first call to the callbackfn function provides this value as an argument
* instead of an array value.
*/
reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int8Array) => U, initialValue: U): U;
/**
- * Reverses the elements in an Array.
+ * Reverses the elements in an Array.
*/
reverse(): Int8Array;
@@ -2913,7 +1671,7 @@ interface Int8Array {
*/
set(array: ArrayLike<number>, offset?: number): void;
- /**
+ /**
* Returns a section of an array.
* @param start The beginning of the specified portion of the array.
* @param end The end of the specified portion of the array.
@@ -2922,31 +1680,31 @@ interface Int8Array {
/**
* Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
* the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
some(callbackfn: (value: number, index: number, array: Int8Array) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
+ * @param compareFn The name of the function used to determine the order of the elements. If
* omitted, the elements are sorted in ascending, ASCII character order.
*/
- sort(compareFn?: (a: number, b: number) => number): Int8Array;
+ sort(compareFn?: (a: number, b: number) => number): this;
/**
* Gets a new Int8Array view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
+ * at begin, inclusive, up to end, exclusive.
* @param begin The index of the beginning of the array.
* @param end The index of the end of the array.
*/
subarray(begin: number, end?: number): Int8Array;
/**
- * Converts a number to a string by using the current locale.
+ * Converts a number to a string by using the current locale.
*/
toLocaleString(): string;
@@ -2958,22 +1716,22 @@ interface Int8Array {
[index: number]: number;
}
interface Int8ArrayConstructor {
- prototype: Int8Array;
+ readonly prototype: Int8Array;
new (length: number): Int8Array;
new (array: ArrayLike<number>): Int8Array;
new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int8Array;
/**
- * The size in bytes of each element in the array.
+ * The size in bytes of each element in the array.
*/
- BYTES_PER_ELEMENT: number;
+ readonly BYTES_PER_ELEMENT: number;
/**
* Returns a new array from a set of elements.
* @param items A set of elements to include in the new array object.
*/
of(...items: number[]): Int8Array;
-
+
/**
* Creates an array from an array-like or iterable object.
* @param arrayLike An array-like or iterable object to convert to an array.
@@ -2983,48 +1741,48 @@ interface Int8ArrayConstructor {
from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array;
}
-declare var Int8Array: Int8ArrayConstructor;
+declare const Int8Array: Int8ArrayConstructor;
/**
- * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
+ * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
* requested number of bytes could not be allocated an exception is raised.
*/
interface Uint8Array {
/**
- * The size in bytes of each element in the array.
+ * The size in bytes of each element in the array.
*/
- BYTES_PER_ELEMENT: number;
+ readonly BYTES_PER_ELEMENT: number;
/**
- * The ArrayBuffer instance referenced by the array.
+ * The ArrayBuffer instance referenced by the array.
*/
- buffer: ArrayBuffer;
+ readonly buffer: ArrayBuffer;
/**
* The length in bytes of the array.
*/
- byteLength: number;
+ readonly byteLength: number;
/**
* The offset in bytes of the array.
*/
- byteOffset: number;
+ readonly byteOffset: number;
- /**
+ /**
* Returns the this object after copying a section of the array identified by start and end
* to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
+ * @param end If not specified, length of the this object is used as its default value.
*/
- copyWithin(target: number, start: number, end?: number): Uint8Array;
+ copyWithin(target: number, start: number, end?: number): this;
/**
* Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
* or until the end of the array.
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
@@ -3034,49 +1792,49 @@ interface Uint8Array {
/**
* Returns the this object after filling the section identified by start and end with value
* @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
* length+end.
*/
- fill(value: number, start?: number, end?: number): Uint8Array;
+ fill(value: number, start?: number, end?: number): this;
/**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
- filter(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): Uint8Array;
+ filter(callbackfn: (value: number, index: number, array: Uint8Array) => any, thisArg?: any): Uint8Array;
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
* otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
* immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
+ * @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
+ find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
- /**
- * Returns the index of the first element in the array where predicate is true, and undefined
+ /**
+ * Returns the index of the first element in the array where predicate is true, and undefined
* otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
forEach(callbackfn: (value: number, index: number, array: Uint8Array) => void, thisArg?: any): void;
@@ -3091,7 +1849,7 @@ interface Uint8Array {
/**
* Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
+ * @param separator A string used to separate one element of an array from the next in the
* resulting String. If omitted, the array elements are separated with a comma.
*/
join(separator?: string): string;
@@ -3099,7 +1857,7 @@ interface Uint8Array {
/**
* Returns the index of the last occurrence of a value in an array.
* @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
*/
lastIndexOf(searchElement: number, fromIndex?: number): number;
@@ -3107,68 +1865,68 @@ interface Uint8Array {
/**
* The length of the array.
*/
- length: number;
+ readonly length: number;
/**
- * Calls a defined callback function on each element of an array, and returns an array that
+ * Calls a defined callback function on each element of an array, and returns an array that
* contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
map(callbackfn: (value: number, index: number, array: Uint8Array) => number, thisArg?: any): Uint8Array;
/**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
* call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
* callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
* the accumulation. The first call to the callbackfn function provides this value as an argument
* instead of an array value.
*/
reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number;
/**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
* call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
* callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
* instead of an array value.
*/
reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
* argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
* argument instead of an array value.
*/
reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8Array) => number, initialValue?: number): number;
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
* argument in the next call to the callback function.
* @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
* the accumulation. The first call to the callbackfn function provides this value as an argument
* instead of an array value.
*/
reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8Array) => U, initialValue: U): U;
/**
- * Reverses the elements in an Array.
+ * Reverses the elements in an Array.
*/
reverse(): Uint8Array;
@@ -3186,7 +1944,7 @@ interface Uint8Array {
*/
set(array: ArrayLike<number>, offset?: number): void;
- /**
+ /**
* Returns a section of an array.
* @param start The beginning of the specified portion of the array.
* @param end The end of the specified portion of the array.
@@ -3195,31 +1953,31 @@ interface Uint8Array {
/**
* Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
* the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
some(callbackfn: (value: number, index: number, array: Uint8Array) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
+ * @param compareFn The name of the function used to determine the order of the elements. If
* omitted, the elements are sorted in ascending, ASCII character order.
*/
- sort(compareFn?: (a: number, b: number) => number): Uint8Array;
+ sort(compareFn?: (a: number, b: number) => number): this;
/**
* Gets a new Uint8Array view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
+ * at begin, inclusive, up to end, exclusive.
* @param begin The index of the beginning of the array.
* @param end The index of the end of the array.
*/
subarray(begin: number, end?: number): Uint8Array;
/**
- * Converts a number to a string by using the current locale.
+ * Converts a number to a string by using the current locale.
*/
toLocaleString(): string;
@@ -3232,22 +1990,22 @@ interface Uint8Array {
}
interface Uint8ArrayConstructor {
- prototype: Uint8Array;
+ readonly prototype: Uint8Array;
new (length: number): Uint8Array;
new (array: ArrayLike<number>): Uint8Array;
new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8Array;
/**
- * The size in bytes of each element in the array.
+ * The size in bytes of each element in the array.
*/
- BYTES_PER_ELEMENT: number;
+ readonly BYTES_PER_ELEMENT: number;
/**
* Returns a new array from a set of elements.
* @param items A set of elements to include in the new array object.
*/
of(...items: number[]): Uint8Array;
-
+
/**
* Creates an array from an array-like or iterable object.
* @param arrayLike An array-like or iterable object to convert to an array.
@@ -3257,48 +2015,48 @@ interface Uint8ArrayConstructor {
from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array;
}
-declare var Uint8Array: Uint8ArrayConstructor;
+declare const Uint8Array: Uint8ArrayConstructor;
/**
- * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.
+ * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.
* If the requested number of bytes could not be allocated an exception is raised.
*/
interface Uint8ClampedArray {
/**
- * The size in bytes of each element in the array.
+ * The size in bytes of each element in the array.
*/
- BYTES_PER_ELEMENT: number;
+ readonly BYTES_PER_ELEMENT: number;
/**
- * The ArrayBuffer instance referenced by the array.
+ * The ArrayBuffer instance referenced by the array.
*/
- buffer: ArrayBuffer;
+ readonly buffer: ArrayBuffer;
/**
* The length in bytes of the array.
*/
- byteLength: number;
+ readonly byteLength: number;
/**
* The offset in bytes of the array.
*/
- byteOffset: number;
+ readonly byteOffset: number;
- /**
+ /**
* Returns the this object after copying a section of the array identified by start and end
* to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
+ * @param end If not specified, length of the this object is used as its default value.
*/
- copyWithin(target: number, start: number, end?: number): Uint8ClampedArray;
+ copyWithin(target: number, start: number, end?: number): this;
/**
* Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
* or until the end of the array.
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
@@ -3308,49 +2066,49 @@ interface Uint8ClampedArray {
/**
* Returns the this object after filling the section identified by start and end with value
* @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
* length+end.
*/
- fill(value: number, start?: number, end?: number): Uint8ClampedArray;
+ fill(value: number, start?: number, end?: number): this;
/**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
- filter(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): Uint8ClampedArray;
+ filter(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => any, thisArg?: any): Uint8ClampedArray;
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
* otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
* immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
+ * @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
+ find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
- /**
- * Returns the index of the first element in the array where predicate is true, and undefined
+ /**
+ * Returns the index of the first element in the array where predicate is true, and undefined
* otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
forEach(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => void, thisArg?: any): void;
@@ -3365,7 +2123,7 @@ interface Uint8ClampedArray {
/**
* Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
+ * @param separator A string used to separate one element of an array from the next in the
* resulting String. If omitted, the array elements are separated with a comma.
*/
join(separator?: string): string;
@@ -3373,7 +2131,7 @@ interface Uint8ClampedArray {
/**
* Returns the index of the last occurrence of a value in an array.
* @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
*/
lastIndexOf(searchElement: number, fromIndex?: number): number;
@@ -3381,68 +2139,68 @@ interface Uint8ClampedArray {
/**
* The length of the array.
*/
- length: number;
+ readonly length: number;
/**
- * Calls a defined callback function on each element of an array, and returns an array that
+ * Calls a defined callback function on each element of an array, and returns an array that
* contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
map(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => number, thisArg?: any): Uint8ClampedArray;
/**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
* call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
* callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
* the accumulation. The first call to the callbackfn function provides this value as an argument
* instead of an array value.
*/
reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number;
/**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
* call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
* callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
* instead of an array value.
*/
reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
* argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
* argument instead of an array value.
*/
reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => number, initialValue?: number): number;
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
* argument in the next call to the callback function.
* @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
* the accumulation. The first call to the callbackfn function provides this value as an argument
* instead of an array value.
*/
reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint8ClampedArray) => U, initialValue: U): U;
/**
- * Reverses the elements in an Array.
+ * Reverses the elements in an Array.
*/
reverse(): Uint8ClampedArray;
@@ -3460,7 +2218,7 @@ interface Uint8ClampedArray {
*/
set(array: Uint8ClampedArray, offset?: number): void;
- /**
+ /**
* Returns a section of an array.
* @param start The beginning of the specified portion of the array.
* @param end The end of the specified portion of the array.
@@ -3469,31 +2227,31 @@ interface Uint8ClampedArray {
/**
* Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
* the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
some(callbackfn: (value: number, index: number, array: Uint8ClampedArray) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
+ * @param compareFn The name of the function used to determine the order of the elements. If
* omitted, the elements are sorted in ascending, ASCII character order.
*/
- sort(compareFn?: (a: number, b: number) => number): Uint8ClampedArray;
+ sort(compareFn?: (a: number, b: number) => number): this;
/**
* Gets a new Uint8ClampedArray view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
+ * at begin, inclusive, up to end, exclusive.
* @param begin The index of the beginning of the array.
* @param end The index of the end of the array.
*/
subarray(begin: number, end?: number): Uint8ClampedArray;
/**
- * Converts a number to a string by using the current locale.
+ * Converts a number to a string by using the current locale.
*/
toLocaleString(): string;
@@ -3506,15 +2264,15 @@ interface Uint8ClampedArray {
}
interface Uint8ClampedArrayConstructor {
- prototype: Uint8ClampedArray;
+ readonly prototype: Uint8ClampedArray;
new (length: number): Uint8ClampedArray;
new (array: ArrayLike<number>): Uint8ClampedArray;
new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint8ClampedArray;
/**
- * The size in bytes of each element in the array.
+ * The size in bytes of each element in the array.
*/
- BYTES_PER_ELEMENT: number;
+ readonly BYTES_PER_ELEMENT: number;
/**
* Returns a new array from a set of elements.
@@ -3530,48 +2288,48 @@ interface Uint8ClampedArrayConstructor {
*/
from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray;
}
-declare var Uint8ClampedArray: Uint8ClampedArrayConstructor;
+declare const Uint8ClampedArray: Uint8ClampedArrayConstructor;
/**
- * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the
+ * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the
* requested number of bytes could not be allocated an exception is raised.
*/
interface Int16Array {
/**
- * The size in bytes of each element in the array.
+ * The size in bytes of each element in the array.
*/
- BYTES_PER_ELEMENT: number;
+ readonly BYTES_PER_ELEMENT: number;
/**
- * The ArrayBuffer instance referenced by the array.
+ * The ArrayBuffer instance referenced by the array.
*/
- buffer: ArrayBuffer;
+ readonly buffer: ArrayBuffer;
/**
* The length in bytes of the array.
*/
- byteLength: number;
+ readonly byteLength: number;
/**
* The offset in bytes of the array.
*/
- byteOffset: number;
+ readonly byteOffset: number;
- /**
+ /**
* Returns the this object after copying a section of the array identified by start and end
* to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
+ * @param end If not specified, length of the this object is used as its default value.
*/
- copyWithin(target: number, start: number, end?: number): Int16Array;
+ copyWithin(target: number, start: number, end?: number): this;
/**
* Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
* or until the end of the array.
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
@@ -3581,49 +2339,49 @@ interface Int16Array {
/**
* Returns the this object after filling the section identified by start and end with value
* @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
* length+end.
*/
- fill(value: number, start?: number, end?: number): Int16Array;
+ fill(value: number, start?: number, end?: number): this;
/**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
- filter(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): Int16Array;
+ filter(callbackfn: (value: number, index: number, array: Int16Array) => any, thisArg?: any): Int16Array;
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
* otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
* immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
+ * @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
+ find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
- /**
- * Returns the index of the first element in the array where predicate is true, and undefined
+ /**
+ * Returns the index of the first element in the array where predicate is true, and undefined
* otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
forEach(callbackfn: (value: number, index: number, array: Int16Array) => void, thisArg?: any): void;
@@ -3638,7 +2396,7 @@ interface Int16Array {
/**
* Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
+ * @param separator A string used to separate one element of an array from the next in the
* resulting String. If omitted, the array elements are separated with a comma.
*/
join(separator?: string): string;
@@ -3646,7 +2404,7 @@ interface Int16Array {
/**
* Returns the index of the last occurrence of a value in an array.
* @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
*/
lastIndexOf(searchElement: number, fromIndex?: number): number;
@@ -3654,68 +2412,68 @@ interface Int16Array {
/**
* The length of the array.
*/
- length: number;
+ readonly length: number;
/**
- * Calls a defined callback function on each element of an array, and returns an array that
+ * Calls a defined callback function on each element of an array, and returns an array that
* contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
map(callbackfn: (value: number, index: number, array: Int16Array) => number, thisArg?: any): Int16Array;
/**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
* call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
* callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
* the accumulation. The first call to the callbackfn function provides this value as an argument
* instead of an array value.
*/
reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number;
/**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
* call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
* callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
* instead of an array value.
*/
reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
* argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
* argument instead of an array value.
*/
reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int16Array) => number, initialValue?: number): number;
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
* argument in the next call to the callback function.
* @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
* the accumulation. The first call to the callbackfn function provides this value as an argument
* instead of an array value.
*/
reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int16Array) => U, initialValue: U): U;
/**
- * Reverses the elements in an Array.
+ * Reverses the elements in an Array.
*/
reverse(): Int16Array;
@@ -3733,7 +2491,7 @@ interface Int16Array {
*/
set(array: ArrayLike<number>, offset?: number): void;
- /**
+ /**
* Returns a section of an array.
* @param start The beginning of the specified portion of the array.
* @param end The end of the specified portion of the array.
@@ -3742,31 +2500,31 @@ interface Int16Array {
/**
* Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
* the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
some(callbackfn: (value: number, index: number, array: Int16Array) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
+ * @param compareFn The name of the function used to determine the order of the elements. If
* omitted, the elements are sorted in ascending, ASCII character order.
*/
- sort(compareFn?: (a: number, b: number) => number): Int16Array;
+ sort(compareFn?: (a: number, b: number) => number): this;
/**
* Gets a new Int16Array view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
+ * at begin, inclusive, up to end, exclusive.
* @param begin The index of the beginning of the array.
* @param end The index of the end of the array.
*/
subarray(begin: number, end?: number): Int16Array;
/**
- * Converts a number to a string by using the current locale.
+ * Converts a number to a string by using the current locale.
*/
toLocaleString(): string;
@@ -3779,22 +2537,22 @@ interface Int16Array {
}
interface Int16ArrayConstructor {
- prototype: Int16Array;
+ readonly prototype: Int16Array;
new (length: number): Int16Array;
new (array: ArrayLike<number>): Int16Array;
new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int16Array;
/**
- * The size in bytes of each element in the array.
+ * The size in bytes of each element in the array.
*/
- BYTES_PER_ELEMENT: number;
+ readonly BYTES_PER_ELEMENT: number;
/**
* Returns a new array from a set of elements.
* @param items A set of elements to include in the new array object.
*/
of(...items: number[]): Int16Array;
-
+
/**
* Creates an array from an array-like or iterable object.
* @param arrayLike An array-like or iterable object to convert to an array.
@@ -3804,48 +2562,48 @@ interface Int16ArrayConstructor {
from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array;
}
-declare var Int16Array: Int16ArrayConstructor;
+declare const Int16Array: Int16ArrayConstructor;
/**
- * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the
+ * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the
* requested number of bytes could not be allocated an exception is raised.
*/
interface Uint16Array {
/**
- * The size in bytes of each element in the array.
+ * The size in bytes of each element in the array.
*/
- BYTES_PER_ELEMENT: number;
+ readonly BYTES_PER_ELEMENT: number;
/**
- * The ArrayBuffer instance referenced by the array.
+ * The ArrayBuffer instance referenced by the array.
*/
- buffer: ArrayBuffer;
+ readonly buffer: ArrayBuffer;
/**
* The length in bytes of the array.
*/
- byteLength: number;
+ readonly byteLength: number;
/**
* The offset in bytes of the array.
*/
- byteOffset: number;
+ readonly byteOffset: number;
- /**
+ /**
* Returns the this object after copying a section of the array identified by start and end
* to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
+ * @param end If not specified, length of the this object is used as its default value.
*/
- copyWithin(target: number, start: number, end?: number): Uint16Array;
+ copyWithin(target: number, start: number, end?: number): this;
/**
* Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
* or until the end of the array.
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
@@ -3855,49 +2613,49 @@ interface Uint16Array {
/**
* Returns the this object after filling the section identified by start and end with value
* @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
* length+end.
*/
- fill(value: number, start?: number, end?: number): Uint16Array;
+ fill(value: number, start?: number, end?: number): this;
/**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
- filter(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): Uint16Array;
+ filter(callbackfn: (value: number, index: number, array: Uint16Array) => any, thisArg?: any): Uint16Array;
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
* otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
* immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
+ * @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
+ find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
- /**
- * Returns the index of the first element in the array where predicate is true, and undefined
+ /**
+ * Returns the index of the first element in the array where predicate is true, and undefined
* otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
forEach(callbackfn: (value: number, index: number, array: Uint16Array) => void, thisArg?: any): void;
@@ -3912,7 +2670,7 @@ interface Uint16Array {
/**
* Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
+ * @param separator A string used to separate one element of an array from the next in the
* resulting String. If omitted, the array elements are separated with a comma.
*/
join(separator?: string): string;
@@ -3920,7 +2678,7 @@ interface Uint16Array {
/**
* Returns the index of the last occurrence of a value in an array.
* @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
*/
lastIndexOf(searchElement: number, fromIndex?: number): number;
@@ -3928,68 +2686,68 @@ interface Uint16Array {
/**
* The length of the array.
*/
- length: number;
+ readonly length: number;
/**
- * Calls a defined callback function on each element of an array, and returns an array that
+ * Calls a defined callback function on each element of an array, and returns an array that
* contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
map(callbackfn: (value: number, index: number, array: Uint16Array) => number, thisArg?: any): Uint16Array;
/**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
* call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
* callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
* the accumulation. The first call to the callbackfn function provides this value as an argument
* instead of an array value.
*/
reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number;
/**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
* call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
* callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
* instead of an array value.
*/
reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
* argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
* argument instead of an array value.
*/
reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint16Array) => number, initialValue?: number): number;
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
* argument in the next call to the callback function.
* @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
* the accumulation. The first call to the callbackfn function provides this value as an argument
* instead of an array value.
*/
reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint16Array) => U, initialValue: U): U;
/**
- * Reverses the elements in an Array.
+ * Reverses the elements in an Array.
*/
reverse(): Uint16Array;
@@ -4007,7 +2765,7 @@ interface Uint16Array {
*/
set(array: ArrayLike<number>, offset?: number): void;
- /**
+ /**
* Returns a section of an array.
* @param start The beginning of the specified portion of the array.
* @param end The end of the specified portion of the array.
@@ -4016,31 +2774,31 @@ interface Uint16Array {
/**
* Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
* the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
some(callbackfn: (value: number, index: number, array: Uint16Array) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
+ * @param compareFn The name of the function used to determine the order of the elements. If
* omitted, the elements are sorted in ascending, ASCII character order.
*/
- sort(compareFn?: (a: number, b: number) => number): Uint16Array;
+ sort(compareFn?: (a: number, b: number) => number): this;
/**
* Gets a new Uint16Array view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
+ * at begin, inclusive, up to end, exclusive.
* @param begin The index of the beginning of the array.
* @param end The index of the end of the array.
*/
subarray(begin: number, end?: number): Uint16Array;
/**
- * Converts a number to a string by using the current locale.
+ * Converts a number to a string by using the current locale.
*/
toLocaleString(): string;
@@ -4053,22 +2811,22 @@ interface Uint16Array {
}
interface Uint16ArrayConstructor {
- prototype: Uint16Array;
+ readonly prototype: Uint16Array;
new (length: number): Uint16Array;
new (array: ArrayLike<number>): Uint16Array;
new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint16Array;
/**
- * The size in bytes of each element in the array.
+ * The size in bytes of each element in the array.
*/
- BYTES_PER_ELEMENT: number;
+ readonly BYTES_PER_ELEMENT: number;
/**
* Returns a new array from a set of elements.
* @param items A set of elements to include in the new array object.
*/
of(...items: number[]): Uint16Array;
-
+
/**
* Creates an array from an array-like or iterable object.
* @param arrayLike An array-like or iterable object to convert to an array.
@@ -4078,47 +2836,47 @@ interface Uint16ArrayConstructor {
from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array;
}
-declare var Uint16Array: Uint16ArrayConstructor;
+declare const Uint16Array: Uint16ArrayConstructor;
/**
- * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the
+ * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the
* requested number of bytes could not be allocated an exception is raised.
*/
interface Int32Array {
/**
- * The size in bytes of each element in the array.
+ * The size in bytes of each element in the array.
*/
- BYTES_PER_ELEMENT: number;
+ readonly BYTES_PER_ELEMENT: number;
/**
- * The ArrayBuffer instance referenced by the array.
+ * The ArrayBuffer instance referenced by the array.
*/
- buffer: ArrayBuffer;
+ readonly buffer: ArrayBuffer;
/**
* The length in bytes of the array.
*/
- byteLength: number;
+ readonly byteLength: number;
/**
* The offset in bytes of the array.
*/
- byteOffset: number;
+ readonly byteOffset: number;
- /**
+ /**
* Returns the this object after copying a section of the array identified by start and end
* to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
+ * @param end If not specified, length of the this object is used as its default value.
*/
- copyWithin(target: number, start: number, end?: number): Int32Array;
+ copyWithin(target: number, start: number, end?: number): this;
/**
* Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
* or until the end of the array.
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
@@ -4128,49 +2886,49 @@ interface Int32Array {
/**
* Returns the this object after filling the section identified by start and end with value
* @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
* length+end.
*/
- fill(value: number, start?: number, end?: number): Int32Array;
+ fill(value: number, start?: number, end?: number): this;
/**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
- filter(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): Int32Array;
+ filter(callbackfn: (value: number, index: number, array: Int32Array) => any, thisArg?: any): Int32Array;
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
* otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
* immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
+ * @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
+ find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
- /**
- * Returns the index of the first element in the array where predicate is true, and undefined
+ /**
+ * Returns the index of the first element in the array where predicate is true, and undefined
* otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
forEach(callbackfn: (value: number, index: number, array: Int32Array) => void, thisArg?: any): void;
@@ -4185,7 +2943,7 @@ interface Int32Array {
/**
* Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
+ * @param separator A string used to separate one element of an array from the next in the
* resulting String. If omitted, the array elements are separated with a comma.
*/
join(separator?: string): string;
@@ -4193,7 +2951,7 @@ interface Int32Array {
/**
* Returns the index of the last occurrence of a value in an array.
* @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
*/
lastIndexOf(searchElement: number, fromIndex?: number): number;
@@ -4201,68 +2959,68 @@ interface Int32Array {
/**
* The length of the array.
*/
- length: number;
+ readonly length: number;
/**
- * Calls a defined callback function on each element of an array, and returns an array that
+ * Calls a defined callback function on each element of an array, and returns an array that
* contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
map(callbackfn: (value: number, index: number, array: Int32Array) => number, thisArg?: any): Int32Array;
/**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
* call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
* callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
* the accumulation. The first call to the callbackfn function provides this value as an argument
* instead of an array value.
*/
reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number;
/**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
* call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
* callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
* instead of an array value.
*/
reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
* argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
* argument instead of an array value.
*/
reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Int32Array) => number, initialValue?: number): number;
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
* argument in the next call to the callback function.
* @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
* the accumulation. The first call to the callbackfn function provides this value as an argument
* instead of an array value.
*/
reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Int32Array) => U, initialValue: U): U;
/**
- * Reverses the elements in an Array.
+ * Reverses the elements in an Array.
*/
reverse(): Int32Array;
@@ -4280,7 +3038,7 @@ interface Int32Array {
*/
set(array: ArrayLike<number>, offset?: number): void;
- /**
+ /**
* Returns a section of an array.
* @param start The beginning of the specified portion of the array.
* @param end The end of the specified portion of the array.
@@ -4289,31 +3047,31 @@ interface Int32Array {
/**
* Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
* the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
some(callbackfn: (value: number, index: number, array: Int32Array) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
+ * @param compareFn The name of the function used to determine the order of the elements. If
* omitted, the elements are sorted in ascending, ASCII character order.
*/
- sort(compareFn?: (a: number, b: number) => number): Int32Array;
+ sort(compareFn?: (a: number, b: number) => number): this;
/**
* Gets a new Int32Array view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
+ * at begin, inclusive, up to end, exclusive.
* @param begin The index of the beginning of the array.
* @param end The index of the end of the array.
*/
subarray(begin: number, end?: number): Int32Array;
/**
- * Converts a number to a string by using the current locale.
+ * Converts a number to a string by using the current locale.
*/
toLocaleString(): string;
@@ -4326,22 +3084,22 @@ interface Int32Array {
}
interface Int32ArrayConstructor {
- prototype: Int32Array;
+ readonly prototype: Int32Array;
new (length: number): Int32Array;
new (array: ArrayLike<number>): Int32Array;
new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Int32Array;
/**
- * The size in bytes of each element in the array.
+ * The size in bytes of each element in the array.
*/
- BYTES_PER_ELEMENT: number;
+ readonly BYTES_PER_ELEMENT: number;
/**
* Returns a new array from a set of elements.
* @param items A set of elements to include in the new array object.
*/
of(...items: number[]): Int32Array;
-
+
/**
* Creates an array from an array-like or iterable object.
* @param arrayLike An array-like or iterable object to convert to an array.
@@ -4350,48 +3108,48 @@ interface Int32ArrayConstructor {
*/
from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array;
}
-declare var Int32Array: Int32ArrayConstructor;
+declare const Int32Array: Int32ArrayConstructor;
/**
- * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the
+ * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the
* requested number of bytes could not be allocated an exception is raised.
*/
interface Uint32Array {
/**
- * The size in bytes of each element in the array.
+ * The size in bytes of each element in the array.
*/
- BYTES_PER_ELEMENT: number;
+ readonly BYTES_PER_ELEMENT: number;
/**
- * The ArrayBuffer instance referenced by the array.
+ * The ArrayBuffer instance referenced by the array.
*/
- buffer: ArrayBuffer;
+ readonly buffer: ArrayBuffer;
/**
* The length in bytes of the array.
*/
- byteLength: number;
+ readonly byteLength: number;
/**
* The offset in bytes of the array.
*/
- byteOffset: number;
+ readonly byteOffset: number;
- /**
+ /**
* Returns the this object after copying a section of the array identified by start and end
* to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
+ * @param end If not specified, length of the this object is used as its default value.
*/
- copyWithin(target: number, start: number, end?: number): Uint32Array;
+ copyWithin(target: number, start: number, end?: number): this;
/**
* Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
* or until the end of the array.
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
@@ -4401,49 +3159,49 @@ interface Uint32Array {
/**
* Returns the this object after filling the section identified by start and end with value
* @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
* length+end.
*/
- fill(value: number, start?: number, end?: number): Uint32Array;
+ fill(value: number, start?: number, end?: number): this;
/**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
- filter(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): Uint32Array;
+ filter(callbackfn: (value: number, index: number, array: Uint32Array) => any, thisArg?: any): Uint32Array;
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
* otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
* immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
+ * @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
+ find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
- /**
- * Returns the index of the first element in the array where predicate is true, and undefined
+ /**
+ * Returns the index of the first element in the array where predicate is true, and undefined
* otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
forEach(callbackfn: (value: number, index: number, array: Uint32Array) => void, thisArg?: any): void;
@@ -4458,7 +3216,7 @@ interface Uint32Array {
/**
* Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
+ * @param separator A string used to separate one element of an array from the next in the
* resulting String. If omitted, the array elements are separated with a comma.
*/
join(separator?: string): string;
@@ -4466,7 +3224,7 @@ interface Uint32Array {
/**
* Returns the index of the last occurrence of a value in an array.
* @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
*/
lastIndexOf(searchElement: number, fromIndex?: number): number;
@@ -4474,68 +3232,68 @@ interface Uint32Array {
/**
* The length of the array.
*/
- length: number;
+ readonly length: number;
/**
- * Calls a defined callback function on each element of an array, and returns an array that
+ * Calls a defined callback function on each element of an array, and returns an array that
* contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
map(callbackfn: (value: number, index: number, array: Uint32Array) => number, thisArg?: any): Uint32Array;
/**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
* call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
* callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
* the accumulation. The first call to the callbackfn function provides this value as an argument
* instead of an array value.
*/
reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number;
/**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
* call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
* callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
* instead of an array value.
*/
reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
* argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
* argument instead of an array value.
*/
reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Uint32Array) => number, initialValue?: number): number;
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
* argument in the next call to the callback function.
* @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
* the accumulation. The first call to the callbackfn function provides this value as an argument
* instead of an array value.
*/
reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Uint32Array) => U, initialValue: U): U;
/**
- * Reverses the elements in an Array.
+ * Reverses the elements in an Array.
*/
reverse(): Uint32Array;
@@ -4553,7 +3311,7 @@ interface Uint32Array {
*/
set(array: ArrayLike<number>, offset?: number): void;
- /**
+ /**
* Returns a section of an array.
* @param start The beginning of the specified portion of the array.
* @param end The end of the specified portion of the array.
@@ -4562,31 +3320,31 @@ interface Uint32Array {
/**
* Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
* the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
some(callbackfn: (value: number, index: number, array: Uint32Array) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
+ * @param compareFn The name of the function used to determine the order of the elements. If
* omitted, the elements are sorted in ascending, ASCII character order.
*/
- sort(compareFn?: (a: number, b: number) => number): Uint32Array;
+ sort(compareFn?: (a: number, b: number) => number): this;
/**
* Gets a new Uint32Array view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
+ * at begin, inclusive, up to end, exclusive.
* @param begin The index of the beginning of the array.
* @param end The index of the end of the array.
*/
subarray(begin: number, end?: number): Uint32Array;
/**
- * Converts a number to a string by using the current locale.
+ * Converts a number to a string by using the current locale.
*/
toLocaleString(): string;
@@ -4599,22 +3357,22 @@ interface Uint32Array {
}
interface Uint32ArrayConstructor {
- prototype: Uint32Array;
+ readonly prototype: Uint32Array;
new (length: number): Uint32Array;
new (array: ArrayLike<number>): Uint32Array;
new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Uint32Array;
/**
- * The size in bytes of each element in the array.
+ * The size in bytes of each element in the array.
*/
- BYTES_PER_ELEMENT: number;
+ readonly BYTES_PER_ELEMENT: number;
/**
* Returns a new array from a set of elements.
* @param items A set of elements to include in the new array object.
*/
of(...items: number[]): Uint32Array;
-
+
/**
* Creates an array from an array-like or iterable object.
* @param arrayLike An array-like or iterable object to convert to an array.
@@ -4623,7 +3381,7 @@ interface Uint32ArrayConstructor {
*/
from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array;
}
-declare var Uint32Array: Uint32ArrayConstructor;
+declare const Uint32Array: Uint32ArrayConstructor;
/**
* A typed array of 32-bit float values. The contents are initialized to 0. If the requested number
@@ -4631,40 +3389,40 @@ declare var Uint32Array: Uint32ArrayConstructor;
*/
interface Float32Array {
/**
- * The size in bytes of each element in the array.
+ * The size in bytes of each element in the array.
*/
- BYTES_PER_ELEMENT: number;
+ readonly BYTES_PER_ELEMENT: number;
/**
- * The ArrayBuffer instance referenced by the array.
+ * The ArrayBuffer instance referenced by the array.
*/
- buffer: ArrayBuffer;
+ readonly buffer: ArrayBuffer;
/**
* The length in bytes of the array.
*/
- byteLength: number;
+ readonly byteLength: number;
/**
* The offset in bytes of the array.
*/
- byteOffset: number;
+ readonly byteOffset: number;
- /**
+ /**
* Returns the this object after copying a section of the array identified by start and end
* to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
+ * @param end If not specified, length of the this object is used as its default value.
*/
- copyWithin(target: number, start: number, end?: number): Float32Array;
+ copyWithin(target: number, start: number, end?: number): this;
/**
* Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
* or until the end of the array.
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
@@ -4674,49 +3432,49 @@ interface Float32Array {
/**
* Returns the this object after filling the section identified by start and end with value
* @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
* length+end.
*/
- fill(value: number, start?: number, end?: number): Float32Array;
+ fill(value: number, start?: number, end?: number): this;
/**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
- filter(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): Float32Array;
+ filter(callbackfn: (value: number, index: number, array: Float32Array) => any, thisArg?: any): Float32Array;
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
* otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
* immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
+ * @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
+ find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
- /**
- * Returns the index of the first element in the array where predicate is true, and undefined
+ /**
+ * Returns the index of the first element in the array where predicate is true, and undefined
* otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
forEach(callbackfn: (value: number, index: number, array: Float32Array) => void, thisArg?: any): void;
@@ -4731,7 +3489,7 @@ interface Float32Array {
/**
* Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
+ * @param separator A string used to separate one element of an array from the next in the
* resulting String. If omitted, the array elements are separated with a comma.
*/
join(separator?: string): string;
@@ -4739,7 +3497,7 @@ interface Float32Array {
/**
* Returns the index of the last occurrence of a value in an array.
* @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
*/
lastIndexOf(searchElement: number, fromIndex?: number): number;
@@ -4747,68 +3505,68 @@ interface Float32Array {
/**
* The length of the array.
*/
- length: number;
+ readonly length: number;
/**
- * Calls a defined callback function on each element of an array, and returns an array that
+ * Calls a defined callback function on each element of an array, and returns an array that
* contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
map(callbackfn: (value: number, index: number, array: Float32Array) => number, thisArg?: any): Float32Array;
/**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
* call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
* callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
* the accumulation. The first call to the callbackfn function provides this value as an argument
* instead of an array value.
*/
reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number;
/**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
* call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
* callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
* instead of an array value.
*/
reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
* argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
* argument instead of an array value.
*/
reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float32Array) => number, initialValue?: number): number;
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
* argument in the next call to the callback function.
* @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
* the accumulation. The first call to the callbackfn function provides this value as an argument
* instead of an array value.
*/
reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float32Array) => U, initialValue: U): U;
/**
- * Reverses the elements in an Array.
+ * Reverses the elements in an Array.
*/
reverse(): Float32Array;
@@ -4826,7 +3584,7 @@ interface Float32Array {
*/
set(array: ArrayLike<number>, offset?: number): void;
- /**
+ /**
* Returns a section of an array.
* @param start The beginning of the specified portion of the array.
* @param end The end of the specified portion of the array.
@@ -4835,31 +3593,31 @@ interface Float32Array {
/**
* Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
* the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
some(callbackfn: (value: number, index: number, array: Float32Array) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
+ * @param compareFn The name of the function used to determine the order of the elements. If
* omitted, the elements are sorted in ascending, ASCII character order.
*/
- sort(compareFn?: (a: number, b: number) => number): Float32Array;
+ sort(compareFn?: (a: number, b: number) => number): this;
/**
* Gets a new Float32Array view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
+ * at begin, inclusive, up to end, exclusive.
* @param begin The index of the beginning of the array.
* @param end The index of the end of the array.
*/
subarray(begin: number, end?: number): Float32Array;
/**
- * Converts a number to a string by using the current locale.
+ * Converts a number to a string by using the current locale.
*/
toLocaleString(): string;
@@ -4872,22 +3630,22 @@ interface Float32Array {
}
interface Float32ArrayConstructor {
- prototype: Float32Array;
+ readonly prototype: Float32Array;
new (length: number): Float32Array;
new (array: ArrayLike<number>): Float32Array;
new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float32Array;
/**
- * The size in bytes of each element in the array.
+ * The size in bytes of each element in the array.
*/
- BYTES_PER_ELEMENT: number;
+ readonly BYTES_PER_ELEMENT: number;
/**
* Returns a new array from a set of elements.
* @param items A set of elements to include in the new array object.
*/
of(...items: number[]): Float32Array;
-
+
/**
* Creates an array from an array-like or iterable object.
* @param arrayLike An array-like or iterable object to convert to an array.
@@ -4897,48 +3655,48 @@ interface Float32ArrayConstructor {
from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array;
}
-declare var Float32Array: Float32ArrayConstructor;
+declare const Float32Array: Float32ArrayConstructor;
/**
- * A typed array of 64-bit float values. The contents are initialized to 0. If the requested
+ * A typed array of 64-bit float values. The contents are initialized to 0. If the requested
* number of bytes could not be allocated an exception is raised.
*/
interface Float64Array {
/**
- * The size in bytes of each element in the array.
+ * The size in bytes of each element in the array.
*/
- BYTES_PER_ELEMENT: number;
+ readonly BYTES_PER_ELEMENT: number;
/**
- * The ArrayBuffer instance referenced by the array.
+ * The ArrayBuffer instance referenced by the array.
*/
- buffer: ArrayBuffer;
+ readonly buffer: ArrayBuffer;
/**
* The length in bytes of the array.
*/
- byteLength: number;
+ readonly byteLength: number;
/**
* The offset in bytes of the array.
*/
- byteOffset: number;
+ readonly byteOffset: number;
- /**
+ /**
* Returns the this object after copying a section of the array identified by start and end
* to the same array starting at position target
- * @param target If target is negative, it is treated as length+target where length is the
- * length of the array.
- * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
* is treated as length+end.
- * @param end If not specified, length of the this object is used as its default value.
+ * @param end If not specified, length of the this object is used as its default value.
*/
- copyWithin(target: number, start: number, end?: number): Float64Array;
+ copyWithin(target: number, start: number, end?: number): this;
/**
* Determines whether all the members of an array satisfy the specified test.
- * @param callbackfn A function that accepts up to three arguments. The every method calls
- * the callbackfn function for each element in array1 until the callbackfn returns false,
+ * @param callbackfn A function that accepts up to three arguments. The every method calls
+ * the callbackfn function for each element in array1 until the callbackfn returns false,
* or until the end of the array.
* @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
@@ -4948,49 +3706,49 @@ interface Float64Array {
/**
* Returns the this object after filling the section identified by start and end with value
* @param value value to fill array section with
- * @param start index to start filling the array at. If start is negative, it is treated as
- * length+start where length is the length of the array.
- * @param end index to stop filling the array at. If end is negative, it is treated as
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
* length+end.
*/
- fill(value: number, start?: number, end?: number): Float64Array;
+ fill(value: number, start?: number, end?: number): this;
/**
- * Returns the elements of an array that meet the condition specified in a callback function.
- * @param callbackfn A function that accepts up to three arguments. The filter method calls
- * the callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * Returns the elements of an array that meet the condition specified in a callback function.
+ * @param callbackfn A function that accepts up to three arguments. The filter method calls
+ * the callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
- filter(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): Float64Array;
+ filter(callbackfn: (value: number, index: number, array: Float64Array) => any, thisArg?: any): Float64Array;
- /**
- * Returns the value of the first element in the array where predicate is true, and undefined
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
* otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
* immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
+ * @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
- find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number;
+ find(predicate: (value: number, index: number, obj: Array<number>) => boolean, thisArg?: any): number | undefined;
- /**
- * Returns the index of the first element in the array where predicate is true, and undefined
+ /**
+ * Returns the index of the first element in the array where predicate is true, and undefined
* otherwise.
- * @param predicate find calls predicate once for each element of the array, in ascending
- * order, until it finds one where predicate returns true. If such an element is found, find
- * immediately returns that element value. Otherwise, find returns undefined.
- * @param thisArg If provided, it will be used as the this value for each invocation of
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
* predicate. If it is not provided, undefined is used instead.
*/
findIndex(predicate: (value: number) => boolean, thisArg?: any): number;
/**
* Performs the specified action for each element in an array.
- * @param callbackfn A function that accepts up to three arguments. forEach calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * @param callbackfn A function that accepts up to three arguments. forEach calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
forEach(callbackfn: (value: number, index: number, array: Float64Array) => void, thisArg?: any): void;
@@ -5005,7 +3763,7 @@ interface Float64Array {
/**
* Adds all the elements of an array separated by the specified separator string.
- * @param separator A string used to separate one element of an array from the next in the
+ * @param separator A string used to separate one element of an array from the next in the
* resulting String. If omitted, the array elements are separated with a comma.
*/
join(separator?: string): string;
@@ -5013,7 +3771,7 @@ interface Float64Array {
/**
* Returns the index of the last occurrence of a value in an array.
* @param searchElement The value to locate in the array.
- * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
+ * @param fromIndex The array index at which to begin the search. If fromIndex is omitted, the
* search starts at index 0.
*/
lastIndexOf(searchElement: number, fromIndex?: number): number;
@@ -5021,68 +3779,68 @@ interface Float64Array {
/**
* The length of the array.
*/
- length: number;
+ readonly length: number;
/**
- * Calls a defined callback function on each element of an array, and returns an array that
+ * Calls a defined callback function on each element of an array, and returns an array that
* contains the results.
- * @param callbackfn A function that accepts up to three arguments. The map method calls the
- * callbackfn function one time for each element in the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * @param callbackfn A function that accepts up to three arguments. The map method calls the
+ * callbackfn function one time for each element in the array.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
map(callbackfn: (value: number, index: number, array: Float64Array) => number, thisArg?: any): Float64Array;
/**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
* call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
* callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
* the accumulation. The first call to the callbackfn function provides this value as an argument
* instead of an array value.
*/
reduce(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number;
/**
- * Calls the specified callback function for all the elements in an array. The return value of
- * the callback function is the accumulated result, and is provided as an argument in the next
+ * Calls the specified callback function for all the elements in an array. The return value of
+ * the callback function is the accumulated result, and is provided as an argument in the next
* call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
+ * @param callbackfn A function that accepts up to four arguments. The reduce method calls the
* callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an argument
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an argument
* instead of an array value.
*/
reduce<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
* argument in the next call to the callback function.
- * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
- * the accumulation. The first call to the callbackfn function provides this value as an
+ * @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the accumulation. The first call to the callbackfn function provides this value as an
* argument instead of an array value.
*/
reduceRight(callbackfn: (previousValue: number, currentValue: number, currentIndex: number, array: Float64Array) => number, initialValue?: number): number;
- /**
- * Calls the specified callback function for all the elements in an array, in descending order.
- * The return value of the callback function is the accumulated result, and is provided as an
+ /**
+ * Calls the specified callback function for all the elements in an array, in descending order.
+ * The return value of the callback function is the accumulated result, and is provided as an
* argument in the next call to the callback function.
* @param callbackfn A function that accepts up to four arguments. The reduceRight method calls
- * the callbackfn function one time for each element in the array.
- * @param initialValue If initialValue is specified, it is used as the initial value to start
+ * the callbackfn function one time for each element in the array.
+ * @param initialValue If initialValue is specified, it is used as the initial value to start
* the accumulation. The first call to the callbackfn function provides this value as an argument
* instead of an array value.
*/
reduceRight<U>(callbackfn: (previousValue: U, currentValue: number, currentIndex: number, array: Float64Array) => U, initialValue: U): U;
/**
- * Reverses the elements in an Array.
+ * Reverses the elements in an Array.
*/
reverse(): Float64Array;
@@ -5100,7 +3858,7 @@ interface Float64Array {
*/
set(array: ArrayLike<number>, offset?: number): void;
- /**
+ /**
* Returns a section of an array.
* @param start The beginning of the specified portion of the array.
* @param end The end of the specified portion of the array.
@@ -5109,31 +3867,31 @@ interface Float64Array {
/**
* Determines whether the specified callback function returns true for any element of an array.
- * @param callbackfn A function that accepts up to three arguments. The some method calls the
- * callbackfn function for each element in array1 until the callbackfn returns true, or until
+ * @param callbackfn A function that accepts up to three arguments. The some method calls the
+ * callbackfn function for each element in array1 until the callbackfn returns true, or until
* the end of the array.
- * @param thisArg An object to which the this keyword can refer in the callbackfn function.
+ * @param thisArg An object to which the this keyword can refer in the callbackfn function.
* If thisArg is omitted, undefined is used as the this value.
*/
some(callbackfn: (value: number, index: number, array: Float64Array) => boolean, thisArg?: any): boolean;
/**
* Sorts an array.
- * @param compareFn The name of the function used to determine the order of the elements. If
+ * @param compareFn The name of the function used to determine the order of the elements. If
* omitted, the elements are sorted in ascending, ASCII character order.
*/
- sort(compareFn?: (a: number, b: number) => number): Float64Array;
+ sort(compareFn?: (a: number, b: number) => number): this;
/**
* Gets a new Float64Array view of the ArrayBuffer store for this array, referencing the elements
- * at begin, inclusive, up to end, exclusive.
+ * at begin, inclusive, up to end, exclusive.
* @param begin The index of the beginning of the array.
* @param end The index of the end of the array.
*/
subarray(begin: number, end?: number): Float64Array;
/**
- * Converts a number to a string by using the current locale.
+ * Converts a number to a string by using the current locale.
*/
toLocaleString(): string;
@@ -5146,22 +3904,22 @@ interface Float64Array {
}
interface Float64ArrayConstructor {
- prototype: Float64Array;
+ readonly prototype: Float64Array;
new (length: number): Float64Array;
new (array: ArrayLike<number>): Float64Array;
new (buffer: ArrayBuffer, byteOffset?: number, length?: number): Float64Array;
/**
- * The size in bytes of each element in the array.
+ * The size in bytes of each element in the array.
*/
- BYTES_PER_ELEMENT: number;
+ readonly BYTES_PER_ELEMENT: number;
/**
* Returns a new array from a set of elements.
* @param items A set of elements to include in the new array object.
*/
of(...items: number[]): Float64Array;
-
+
/**
* Creates an array from an array-like or iterable object.
* @param arrayLike An array-like or iterable object to convert to an array.
@@ -5170,9 +3928,10 @@ interface Float64ArrayConstructor {
*/
from(arrayLike: ArrayLike<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array;
}
-declare var Float64Array: Float64ArrayConstructor;
+declare const Float64Array: Float64ArrayConstructor;
+
/////////////////////////////
-/// ECMAScript Internationalization API
+/// ECMAScript Internationalization API
/////////////////////////////
declare module Intl {
@@ -5315,14 +4074,14 @@ interface String {
interface Number {
/**
- * Converts a number to a string by using the current or specified locale.
+ * Converts a number to a string by using the current or specified locale.
* @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
* @param options An object that contains one or more properties that specify comparison options.
*/
toLocaleString(locales?: string[], options?: Intl.NumberFormatOptions): string;
/**
- * Converts a number to a string by using the current or specified locale.
+ * Converts a number to a string by using the current or specified locale.
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
* @param options An object that contains one or more properties that specify comparison options.
*/
@@ -5331,54 +4090,1661 @@ interface Number {
interface Date {
/**
- * Converts a date and time to a string by using the current or specified locale.
+ * Converts a date and time to a string by using the current or specified locale.
* @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
* @param options An object that contains one or more properties that specify comparison options.
*/
toLocaleString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;
/**
- * Converts a date to a string by using the current or specified locale.
+ * Converts a date to a string by using the current or specified locale.
* @param locales An array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used.
* @param options An object that contains one or more properties that specify comparison options.
*/
toLocaleDateString(locales?: string[], options?: Intl.DateTimeFormatOptions): string;
/**
- * Converts a time to a string by using the current or specified locale.
+ * Converts a time to a string by using the current or specified locale.
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
* @param options An object that contains one or more properties that specify comparison options.
*/
toLocaleTimeString(locale?: string[], options?: Intl.DateTimeFormatOptions): string;
-
+
/**
- * Converts a date and time to a string by using the current or specified locale.
+ * Converts a date and time to a string by using the current or specified locale.
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
* @param options An object that contains one or more properties that specify comparison options.
*/
toLocaleString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
-
+
/**
- * Converts a date to a string by using the current or specified locale.
+ * Converts a date to a string by using the current or specified locale.
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
* @param options An object that contains one or more properties that specify comparison options.
*/
toLocaleDateString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
/**
- * Converts a time to a string by using the current or specified locale.
+ * Converts a time to a string by using the current or specified locale.
* @param locale Locale tag. If you omit this parameter, the default locale of the JavaScript runtime is used.
* @param options An object that contains one or more properties that specify comparison options.
*/
toLocaleTimeString(locale?: string, options?: Intl.DateTimeFormatOptions): string;
}
+declare type PropertyKey = string | number | symbol;
+
+interface Array<T> {
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: T, index: number, obj: Array<T>) => boolean, thisArg?: any): T | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: T) => boolean, thisArg?: any): number;
+
+ /**
+ * Returns the this object after filling the section identified by start and end with value
+ * @param value value to fill array section with
+ * @param start index to start filling the array at. If start is negative, it is treated as
+ * length+start where length is the length of the array.
+ * @param end index to stop filling the array at. If end is negative, it is treated as
+ * length+end.
+ */
+ fill(value: T, start?: number, end?: number): this;
+
+ /**
+ * Returns the this object after copying a section of the array identified by start and end
+ * to the same array starting at position target
+ * @param target If target is negative, it is treated as length+target where length is the
+ * length of the array.
+ * @param start If start is negative, it is treated as length+start. If end is negative, it
+ * is treated as length+end.
+ * @param end If not specified, length of the this object is used as its default value.
+ */
+ copyWithin(target: number, start: number, end?: number): this;
+}
+
+interface ArrayConstructor {
+ /**
+ * Creates an array from an array-like object.
+ * @param arrayLike An array-like object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): Array<U>;
+
+
+ /**
+ * Creates an array from an array-like object.
+ * @param arrayLike An array-like object to convert to an array.
+ */
+ from<T>(arrayLike: ArrayLike<T>): Array<T>;
+
+ /**
+ * Returns a new array from a set of elements.
+ * @param items A set of elements to include in the new array object.
+ */
+ of<T>(...items: T[]): Array<T>;
+}
+
+interface DateConstructor {
+ new (value: Date): Date;
+}
+
+interface Function {
+ /**
+ * Returns the name of the function. Function names are read-only and can not be changed.
+ */
+ readonly name: string;
+}
+
+interface Math {
+ /**
+ * Returns the number of leading zero bits in the 32-bit binary representation of a number.
+ * @param x A numeric expression.
+ */
+ clz32(x: number): number;
+
+ /**
+ * Returns the result of 32-bit multiplication of two numbers.
+ * @param x First number
+ * @param y Second number
+ */
+ imul(x: number, y: number): number;
+
+ /**
+ * Returns the sign of the x, indicating whether x is positive, negative or zero.
+ * @param x The numeric expression to test
+ */
+ sign(x: number): number;
+
+ /**
+ * Returns the base 10 logarithm of a number.
+ * @param x A numeric expression.
+ */
+ log10(x: number): number;
+
+ /**
+ * Returns the base 2 logarithm of a number.
+ * @param x A numeric expression.
+ */
+ log2(x: number): number;
+
+ /**
+ * Returns the natural logarithm of 1 + x.
+ * @param x A numeric expression.
+ */
+ log1p(x: number): number;
+
+ /**
+ * Returns the result of (e^x - 1) of x (e raised to the power of x, where e is the base of
+ * the natural logarithms).
+ * @param x A numeric expression.
+ */
+ expm1(x: number): number;
+
+ /**
+ * Returns the hyperbolic cosine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ cosh(x: number): number;
+
+ /**
+ * Returns the hyperbolic sine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ sinh(x: number): number;
+
+ /**
+ * Returns the hyperbolic tangent of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ tanh(x: number): number;
+
+ /**
+ * Returns the inverse hyperbolic cosine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ acosh(x: number): number;
+
+ /**
+ * Returns the inverse hyperbolic sine of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ asinh(x: number): number;
+
+ /**
+ * Returns the inverse hyperbolic tangent of a number.
+ * @param x A numeric expression that contains an angle measured in radians.
+ */
+ atanh(x: number): number;
+
+ /**
+ * Returns the square root of the sum of squares of its arguments.
+ * @param values Values to compute the square root for.
+ * If no arguments are passed, the result is +0.
+ * If there is only one argument, the result is the absolute value.
+ * If any argument is +Infinity or -Infinity, the result is +Infinity.
+ * If any argument is NaN, the result is NaN.
+ * If all arguments are either +0 or −0, the result is +0.
+ */
+ hypot(...values: number[] ): number;
+
+ /**
+ * Returns the integral part of the a numeric expression, x, removing any fractional digits.
+ * If x is already an integer, the result is x.
+ * @param x A numeric expression.
+ */
+ trunc(x: number): number;
+
+ /**
+ * Returns the nearest single precision float representation of a number.
+ * @param x A numeric expression.
+ */
+ fround(x: number): number;
+
+ /**
+ * Returns an implementation-dependent approximation to the cube root of number.
+ * @param x A numeric expression.
+ */
+ cbrt(x: number): number;
+}
+
+interface NumberConstructor {
+ /**
+ * The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1
+ * that is representable as a Number value, which is approximately:
+ * 2.2204460492503130808472633361816 x 10‍−‍16.
+ */
+ readonly EPSILON: number;
+
+ /**
+ * Returns true if passed value is finite.
+ * Unlike the global isFininte, Number.isFinite doesn't forcibly convert the parameter to a
+ * number. Only finite values of the type number, result in true.
+ * @param number A numeric value.
+ */
+ isFinite(number: number): boolean;
+
+ /**
+ * Returns true if the value passed is an integer, false otherwise.
+ * @param number A numeric value.
+ */
+ isInteger(number: number): boolean;
+
+ /**
+ * Returns a Boolean value that indicates whether a value is the reserved value NaN (not a
+ * number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter
+ * to a number. Only values of the type number, that are also NaN, result in true.
+ * @param number A numeric value.
+ */
+ isNaN(number: number): boolean;
+
+ /**
+ * Returns true if the value passed is a safe integer.
+ * @param number A numeric value.
+ */
+ isSafeInteger(number: number): boolean;
+
+ /**
+ * The value of the largest integer n such that n and n + 1 are both exactly representable as
+ * a Number value.
+ * The value of Number.MAX_SAFE_INTEGER is 9007199254740991 2^53 − 1.
+ */
+ readonly MAX_SAFE_INTEGER: number;
+
+ /**
+ * The value of the smallest integer n such that n and n − 1 are both exactly representable as
+ * a Number value.
+ * The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)).
+ */
+ readonly MIN_SAFE_INTEGER: number;
+
+ /**
+ * Converts a string to a floating-point number.
+ * @param string A string that contains a floating-point number.
+ */
+ parseFloat(string: string): number;
+
+ /**
+ * Converts A string to an integer.
+ * @param s A string to convert into a number.
+ * @param radix A value between 2 and 36 that specifies the base of the number in numString.
+ * If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal.
+ * All other strings are considered decimal.
+ */
+ parseInt(string: string, radix?: number): number;
+}
+
+interface Object {
+ /**
+ * Determines whether an object has a property with the specified name.
+ * @param v A property name.
+ */
+ hasOwnProperty(v: PropertyKey): boolean
+
+ /**
+ * Determines whether a specified property is enumerable.
+ * @param v A property name.
+ */
+ propertyIsEnumerable(v: PropertyKey): boolean;
+}
+
+interface ObjectConstructor {
+ /**
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
+ * target object. Returns the target object.
+ * @param target The target object to copy to.
+ * @param source The source object from which to copy properties.
+ */
+ assign<T, U>(target: T, source: U): T & U;
+
+ /**
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
+ * target object. Returns the target object.
+ * @param target The target object to copy to.
+ * @param source1 The first source object from which to copy properties.
+ * @param source2 The second source object from which to copy properties.
+ */
+ assign<T, U, V>(target: T, source1: U, source2: V): T & U & V;
+
+ /**
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
+ * target object. Returns the target object.
+ * @param target The target object to copy to.
+ * @param source1 The first source object from which to copy properties.
+ * @param source2 The second source object from which to copy properties.
+ * @param source3 The third source object from which to copy properties.
+ */
+ assign<T, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
+
+ /**
+ * Copy the values of all of the enumerable own properties from one or more source objects to a
+ * target object. Returns the target object.
+ * @param target The target object to copy to.
+ * @param sources One or more source objects from which to copy properties
+ */
+ assign(target: any, ...sources: any[]): any;
+
+ /**
+ * Returns an array of all symbol properties found directly on object o.
+ * @param o Object to retrieve the symbols from.
+ */
+ getOwnPropertySymbols(o: any): symbol[];
+
+ /**
+ * Returns true if the values are the same value, false otherwise.
+ * @param value1 The first value.
+ * @param value2 The second value.
+ */
+ is(value1: any, value2: any): boolean;
+
+ /**
+ * Sets the prototype of a specified object o to object proto or null. Returns the object o.
+ * @param o The object to change its prototype.
+ * @param proto The value of the new prototype or null.
+ */
+ setPrototypeOf(o: any, proto: any): any;
+
+ /**
+ * Gets the own property descriptor of the specified object.
+ * An own property descriptor is one that is defined directly on the object and is not
+ * inherited from the object's prototype.
+ * @param o Object that contains the property.
+ * @param p Name of the property.
+ */
+ getOwnPropertyDescriptor(o: any, propertyKey: PropertyKey): PropertyDescriptor;
+
+ /**
+ * Adds a property to an object, or modifies attributes of an existing property.
+ * @param o Object on which to add or modify the property. This can be a native JavaScript
+ * object (that is, a user-defined object or a built in object) or a DOM object.
+ * @param p The property name.
+ * @param attributes Descriptor for the property. It can be for a data property or an accessor
+ * property.
+ */
+ defineProperty(o: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): any;
+}
+
+interface ReadonlyArray<T> {
+ /**
+ * Returns the value of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found, find
+ * immediately returns that element value. Otherwise, find returns undefined.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ find(predicate: (value: T, index: number, obj: ReadonlyArray<T>) => boolean, thisArg?: any): T | undefined;
+
+ /**
+ * Returns the index of the first element in the array where predicate is true, and undefined
+ * otherwise.
+ * @param predicate find calls predicate once for each element of the array, in ascending
+ * order, until it finds one where predicate returns true. If such an element is found,
+ * findIndex immediately returns that element index. Otherwise, findIndex returns -1.
+ * @param thisArg If provided, it will be used as the this value for each invocation of
+ * predicate. If it is not provided, undefined is used instead.
+ */
+ findIndex(predicate: (value: T) => boolean, thisArg?: any): number;
+}
+
+interface RegExp {
+ /**
+ * Returns a string indicating the flags of the regular expression in question. This field is read-only.
+ * The characters in this string are sequenced and concatenated in the following order:
+ *
+ * - "g" for global
+ * - "i" for ignoreCase
+ * - "m" for multiline
+ * - "u" for unicode
+ * - "y" for sticky
+ *
+ * If no flags are set, the value is the empty string.
+ */
+ readonly flags: string;
+
+ /**
+ * Returns a Boolean value indicating the state of the sticky flag (y) used with a regular
+ * expression. Default is false. Read-only.
+ */
+ readonly sticky: boolean;
+
+ /**
+ * Returns a Boolean value indicating the state of the Unicode flag (u) used with a regular
+ * expression. Default is false. Read-only.
+ */
+ readonly unicode: boolean;
+}
+
+interface RegExpConstructor {
+ new (pattern: RegExp, flags?: string): RegExp;
+ (pattern: RegExp, flags?: string): RegExp;
+}
+
+interface String {
+ /**
+ * Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point
+ * value of the UTF-16 encoded code point starting at the string element at position pos in
+ * the String resulting from converting this object to a String.
+ * If there is no element at that position, the result is undefined.
+ * If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.
+ */
+ codePointAt(pos: number): number | undefined;
+
+ /**
+ * Returns true if searchString appears as a substring of the result of converting this
+ * object to a String, at one or more positions that are
+ * greater than or equal to position; otherwise, returns false.
+ * @param searchString search string
+ * @param position If position is undefined, 0 is assumed, so as to search all of the String.
+ */
+ includes(searchString: string, position?: number): boolean;
+
+ /**
+ * Returns true if the sequence of elements of searchString converted to a String is the
+ * same as the corresponding elements of this object (converted to a String) starting at
+ * endPosition – length(this). Otherwise returns false.
+ */
+ endsWith(searchString: string, endPosition?: number): boolean;
+
+ /**
+ * Returns the String value result of normalizing the string into the normalization form
+ * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.
+ * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default
+ * is "NFC"
+ */
+ normalize(form: "NFC" | "NFD" | "NFKC" | "NFKD"): string;
+
+ /**
+ * Returns the String value result of normalizing the string into the normalization form
+ * named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.
+ * @param form Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default
+ * is "NFC"
+ */
+ normalize(form?: string): string;
+
+ /**
+ * Returns a String value that is made from count copies appended together. If count is 0,
+ * T is the empty String is returned.
+ * @param count number of copies to append
+ */
+ repeat(count: number): string;
+
+ /**
+ * Returns true if the sequence of elements of searchString converted to a String is the
+ * same as the corresponding elements of this object (converted to a String) starting at
+ * position. Otherwise returns false.
+ */
+ startsWith(searchString: string, position?: number): boolean;
+
+ /**
+ * Returns an <a> HTML anchor element and sets the name attribute to the text value
+ * @param name
+ */
+ anchor(name: string): string;
+
+ /** Returns a <big> HTML element */
+ big(): string;
+
+ /** Returns a <blink> HTML element */
+ blink(): string;
+
+ /** Returns a <b> HTML element */
+ bold(): string;
+
+ /** Returns a <tt> HTML element */
+ fixed(): string
+
+ /** Returns a <font> HTML element and sets the color attribute value */
+ fontcolor(color: string): string
+
+ /** Returns a <font> HTML element and sets the size attribute value */
+ fontsize(size: number): string;
+
+ /** Returns a <font> HTML element and sets the size attribute value */
+ fontsize(size: string): string;
+
+ /** Returns an <i> HTML element */
+ italics(): string;
+
+ /** Returns an <a> HTML element and sets the href attribute value */
+ link(url: string): string;
+
+ /** Returns a <small> HTML element */
+ small(): string;
+
+ /** Returns a <strike> HTML element */
+ strike(): string;
+
+ /** Returns a <sub> HTML element */
+ sub(): string;
+
+ /** Returns a <sup> HTML element */
+ sup(): string;
+}
+
+interface StringConstructor {
+ /**
+ * Return the String value whose elements are, in order, the elements in the List elements.
+ * If length is 0, the empty string is returned.
+ */
+ fromCodePoint(...codePoints: number[]): string;
+
+ /**
+ * String.raw is intended for use as a tag function of a Tagged Template String. When called
+ * as such the first argument will be a well formed template call site object and the rest
+ * parameter will contain the substitution values.
+ * @param template A well-formed template string call site representation.
+ * @param substitutions A set of substitution values.
+ */
+ raw(template: TemplateStringsArray, ...substitutions: any[]): string;
+}
+interface Map<K, V> {
+ clear(): void;
+ delete(key: K): boolean;
+ forEach(callbackfn: (value: V, index: K, map: Map<K, V>) => void, thisArg?: any): void;
+ get(key: K): V | undefined;
+ has(key: K): boolean;
+ set(key: K, value?: V): this;
+ readonly size: number;
+}
+
+interface MapConstructor {
+ new (): Map<any, any>;
+ new <K, V>(entries?: [K, V][]): Map<K, V>;
+ readonly prototype: Map<any, any>;
+}
+declare var Map: MapConstructor;
+
+interface WeakMap<K, V> {
+ clear(): void;
+ delete(key: K): boolean;
+ get(key: K): V | undefined;
+ has(key: K): boolean;
+ set(key: K, value?: V): this;
+}
+
+interface WeakMapConstructor {
+ new (): WeakMap<any, any>;
+ new <K, V>(entries?: [K, V][]): WeakMap<K, V>;
+ readonly prototype: WeakMap<any, any>;
+}
+declare var WeakMap: WeakMapConstructor;
+
+interface Set<T> {
+ add(value: T): this;
+ clear(): void;
+ delete(value: T): boolean;
+ forEach(callbackfn: (value: T, index: T, set: Set<T>) => void, thisArg?: any): void;
+ has(value: T): boolean;
+ readonly size: number;
+}
+
+interface SetConstructor {
+ new (): Set<any>;
+ new <T>(values?: T[]): Set<T>;
+ readonly prototype: Set<any>;
+}
+declare var Set: SetConstructor;
+
+interface WeakSet<T> {
+ add(value: T): this;
+ clear(): void;
+ delete(value: T): boolean;
+ has(value: T): boolean;
+}
+
+interface WeakSetConstructor {
+ new (): WeakSet<any>;
+ new <T>(values?: T[]): WeakSet<T>;
+ readonly prototype: WeakSet<any>;
+}
+declare var WeakSet: WeakSetConstructor;
+interface GeneratorFunction extends Function { }
+
+interface GeneratorFunctionConstructor {
+ /**
+ * Creates a new Generator function.
+ * @param args A list of arguments the function accepts.
+ */
+ new (...args: string[]): GeneratorFunction;
+ (...args: string[]): GeneratorFunction;
+ readonly prototype: GeneratorFunction;
+}
+declare var GeneratorFunction: GeneratorFunctionConstructor;
+/// <reference path="lib.es2015.symbol.d.ts" />
+
+interface SymbolConstructor {
+ /**
+ * A method that returns the default iterator for an object. Called by the semantics of the
+ * for-of statement.
+ */
+ readonly iterator: symbol;
+}
+
+interface IteratorResult<T> {
+ done: boolean;
+ value: T;
+}
+
+interface Iterator<T> {
+ next(value?: any): IteratorResult<T>;
+ return?(value?: any): IteratorResult<T>;
+ throw?(e?: any): IteratorResult<T>;
+}
+
+interface Iterable<T> {
+ [Symbol.iterator](): Iterator<T>;
+}
+
+interface IterableIterator<T> extends Iterator<T> {
+ [Symbol.iterator](): IterableIterator<T>;
+}
+
+interface Array<T> {
+ /** Iterator */
+ [Symbol.iterator](): IterableIterator<T>;
+
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, T]>;
+
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<T>;
+}
+
+interface ArrayConstructor {
+ /**
+ * Creates an array from an iterable object.
+ * @param iterable An iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from<T, U>(iterable: Iterable<T>, mapfn: (v: T, k: number) => U, thisArg?: any): Array<U>;
+
+ /**
+ * Creates an array from an iterable object.
+ * @param iterable An iterable object to convert to an array.
+ */
+ from<T>(iterable: Iterable<T>): Array<T>;
+}
+
+interface ReadonlyArray<T> {
+ /** Iterator */
+ [Symbol.iterator](): IterableIterator<T>;
+
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, T]>;
+
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<T>;
+}
+
+interface IArguments {
+ /** Iterator */
+ [Symbol.iterator](): IterableIterator<any>;
+}
+
+interface Map<K, V> {
+ [Symbol.iterator](): IterableIterator<[K,V]>;
+ entries(): IterableIterator<[K, V]>;
+ keys(): IterableIterator<K>;
+ values(): IterableIterator<V>;
+}
+
+interface MapConstructor {
+ new <K, V>(iterable: Iterable<[K, V]>): Map<K, V>;
+}
+
+interface WeakMap<K, V> { }
+
+interface WeakMapConstructor {
+ new <K, V>(iterable: Iterable<[K, V]>): WeakMap<K, V>;
+}
+
+interface Set<T> {
+ [Symbol.iterator](): IterableIterator<T>;
+ entries(): IterableIterator<[T, T]>;
+ keys(): IterableIterator<T>;
+ values(): IterableIterator<T>;
+}
+
+interface SetConstructor {
+ new <T>(iterable: Iterable<T>): Set<T>;
+}
+
+interface WeakSet<T> { }
+
+interface WeakSetConstructor {
+ new <T>(iterable: Iterable<T>): WeakSet<T>;
+}
+
+interface Promise<T> { }
+
+interface PromiseConstructor {
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<TAll>(values: Iterable<TAll | PromiseLike<TAll>>): Promise<TAll[]>;
+
+ /**
+ * Creates a Promise that is resolved or rejected when any of the provided Promises are resolved
+ * or rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ race<T>(values: Iterable<T | PromiseLike<T>>): Promise<T>;
+}
+
+declare namespace Reflect {
+ function enumerate(target: any): IterableIterator<any>;
+}
+
+interface String {
+ /** Iterator */
+ [Symbol.iterator](): IterableIterator<string>;
+}
+
+/**
+ * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested
+ * number of bytes could not be allocated an exception is raised.
+ */
+interface Int8Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Int8ArrayConstructor {
+ new (elements: Iterable<number>): Int8Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int8Array;
+}
+
+/**
+ * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint8Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Uint8ArrayConstructor {
+ new (elements: Iterable<number>): Uint8Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8Array;
+}
+
+/**
+ * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.
+ * If the requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint8ClampedArray {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Uint8ClampedArrayConstructor {
+ new (elements: Iterable<number>): Uint8ClampedArray;
+
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint8ClampedArray;
+}
+
+/**
+ * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Int16Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Int16ArrayConstructor {
+ new (elements: Iterable<number>): Int16Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int16Array;
+}
+
+/**
+ * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint16Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Uint16ArrayConstructor {
+ new (elements: Iterable<number>): Uint16Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint16Array;
+}
+
+/**
+ * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Int32Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Int32ArrayConstructor {
+ new (elements: Iterable<number>): Int32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Int32Array;
+}
+
+/**
+ * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint32Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Uint32ArrayConstructor {
+ new (elements: Iterable<number>): Uint32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Uint32Array;
+}
+
+/**
+ * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number
+ * of bytes could not be allocated an exception is raised.
+ */
+interface Float32Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Float32ArrayConstructor {
+ new (elements: Iterable<number>): Float32Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float32Array;
+}
+
+/**
+ * A typed array of 64-bit float values. The contents are initialized to 0. If the requested
+ * number of bytes could not be allocated an exception is raised.
+ */
+interface Float64Array {
+ [Symbol.iterator](): IterableIterator<number>;
+ /**
+ * Returns an array of key, value pairs for every entry in the array
+ */
+ entries(): IterableIterator<[number, number]>;
+ /**
+ * Returns an list of keys in the array
+ */
+ keys(): IterableIterator<number>;
+ /**
+ * Returns an list of values in the array
+ */
+ values(): IterableIterator<number>;
+}
+
+interface Float64ArrayConstructor {
+ new (elements: Iterable<number>): Float64Array;
+
+ /**
+ * Creates an array from an array-like or iterable object.
+ * @param arrayLike An array-like or iterable object to convert to an array.
+ * @param mapfn A mapping function to call on every element of the array.
+ * @param thisArg Value of 'this' used to invoke the mapfn.
+ */
+ from(arrayLike: Iterable<number>, mapfn?: (v: number, k: number) => number, thisArg?: any): Float64Array;
+}/**
+ * Represents the completion of an asynchronous operation
+ */
+interface Promise<T> {
+ /**
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
+ * @param onfulfilled The callback to execute when the Promise is resolved.
+ * @param onrejected The callback to execute when the Promise is rejected.
+ * @returns A Promise for the completion of which ever callback is executed.
+ */
+ then<TResult1, TResult2>(onfulfilled: (value: T) => TResult1 | PromiseLike<TResult1>, onrejected: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>;
+
+ /**
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
+ * @param onfulfilled The callback to execute when the Promise is resolved.
+ * @param onrejected The callback to execute when the Promise is rejected.
+ * @returns A Promise for the completion of which ever callback is executed.
+ */
+ then<TResult>(onfulfilled: (value: T) => TResult | PromiseLike<TResult>, onrejected: (reason: any) => TResult | PromiseLike<TResult>): Promise<TResult>;
+
+ /**
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
+ * @param onfulfilled The callback to execute when the Promise is resolved.
+ * @returns A Promise for the completion of which ever callback is executed.
+ */
+ then<TResult>(onfulfilled: (value: T) => TResult | PromiseLike<TResult>): Promise<TResult>;
+
+ /**
+ * Creates a new Promise with the same internal state of this Promise.
+ * @returns A Promise.
+ */
+ then(): Promise<T>;
+
+ /**
+ * Attaches a callback for only the rejection of the Promise.
+ * @param onrejected The callback to execute when the Promise is rejected.
+ * @returns A Promise for the completion of the callback.
+ */
+ catch<TResult>(onrejected: (reason: any) => TResult | PromiseLike<TResult>): Promise<T | TResult>;
+
+ /**
+ * Attaches a callback for only the rejection of the Promise.
+ * @param onrejected The callback to execute when the Promise is rejected.
+ * @returns A Promise for the completion of the callback.
+ */
+ catch(onrejected: (reason: any) => T | PromiseLike<T>): Promise<T>;
+}
+
+interface PromiseConstructor {
+ /**
+ * A reference to the prototype.
+ */
+ readonly prototype: Promise<any>;
+
+ /**
+ * Creates a new Promise.
+ * @param executor A callback used to initialize the promise. This callback is passed two arguments:
+ * a resolve callback used resolve the promise with a value or the result of another promise,
+ * and a reject callback used to reject the promise with a provided reason or error.
+ */
+ new <T>(executor: (resolve: (value?: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void): Promise<T>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>, T10 | PromiseLike<T10>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9, T10]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2, T3, T4, T5, T6, T7, T8, T9>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>, T9 | PromiseLike<T9>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8, T9]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2, T3, T4, T5, T6, T7, T8>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>, T8 | PromiseLike<T8>]): Promise<[T1, T2, T3, T4, T5, T6, T7, T8]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2, T3, T4, T5, T6, T7>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>, T7 | PromiseLike<T7>]): Promise<[T1, T2, T3, T4, T5, T6, T7]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2, T3, T4, T5, T6>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>, T6 | PromiseLike<T6>]): Promise<[T1, T2, T3, T4, T5, T6]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2, T3, T4, T5>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>, T5 | PromiseLike<T5>]): Promise<[T1, T2, T3, T4, T5]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2, T3, T4>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>, T4 | PromiseLike <T4>]): Promise<[T1, T2, T3, T4]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2, T3>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>, T3 | PromiseLike<T3>]): Promise<[T1, T2, T3]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T1, T2>(values: [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<[T1, T2]>;
+
+ /**
+ * Creates a Promise that is resolved with an array of results when all of the provided Promises
+ * resolve, or rejected when any Promise is rejected.
+ * @param values An array of Promises.
+ * @returns A new Promise.
+ */
+ all<T>(values: (T | PromiseLike<T>)[]): Promise<T[]>;
+
+ /**
+ * Creates a new rejected promise for the provided reason.
+ * @param reason The reason the promise was rejected.
+ * @returns A new rejected Promise.
+ */
+ reject(reason: any): Promise<never>;
+
+ /**
+ * Creates a new rejected promise for the provided reason.
+ * @param reason The reason the promise was rejected.
+ * @returns A new rejected Promise.
+ */
+ reject<T>(reason: any): Promise<T>;
+
+ /**
+ * Creates a new resolved promise for the provided value.
+ * @param value A promise.
+ * @returns A promise whose internal state matches the provided promise.
+ */
+ resolve<T>(value: T | PromiseLike<T>): Promise<T>;
+
+ /**
+ * Creates a new resolved promise .
+ * @returns A resolved promise.
+ */
+ resolve(): Promise<void>;
+}
+
+declare var Promise: PromiseConstructor;interface ProxyHandler<T> {
+ getPrototypeOf? (target: T): any;
+ setPrototypeOf? (target: T, v: any): boolean;
+ isExtensible? (target: T): boolean;
+ preventExtensions? (target: T): boolean;
+ getOwnPropertyDescriptor? (target: T, p: PropertyKey): PropertyDescriptor;
+ has? (target: T, p: PropertyKey): boolean;
+ get? (target: T, p: PropertyKey, receiver: any): any;
+ set? (target: T, p: PropertyKey, value: any, receiver: any): boolean;
+ deleteProperty? (target: T, p: PropertyKey): boolean;
+ defineProperty? (target: T, p: PropertyKey, attributes: PropertyDescriptor): boolean;
+ enumerate? (target: T): PropertyKey[];
+ ownKeys? (target: T): PropertyKey[];
+ apply? (target: T, thisArg: any, argArray?: any): any;
+ construct? (target: T, thisArg: any, argArray?: any): any;
+}
+
+interface ProxyConstructor {
+ revocable<T>(target: T, handler: ProxyHandler<T>): { proxy: T; revoke: () => void; };
+ new <T>(target: T, handler: ProxyHandler<T>): T
+}
+declare var Proxy: ProxyConstructor;declare namespace Reflect {
+ function apply(target: Function, thisArgument: any, argumentsList: ArrayLike<any>): any;
+ function construct(target: Function, argumentsList: ArrayLike<any>, newTarget?: any): any;
+ function defineProperty(target: any, propertyKey: PropertyKey, attributes: PropertyDescriptor): boolean;
+ function deleteProperty(target: any, propertyKey: PropertyKey): boolean;
+ function get(target: any, propertyKey: PropertyKey, receiver?: any): any;
+ function getOwnPropertyDescriptor(target: any, propertyKey: PropertyKey): PropertyDescriptor;
+ function getPrototypeOf(target: any): any;
+ function has(target: any, propertyKey: string): boolean;
+ function has(target: any, propertyKey: symbol): boolean;
+ function isExtensible(target: any): boolean;
+ function ownKeys(target: any): Array<PropertyKey>;
+ function preventExtensions(target: any): boolean;
+ function set(target: any, propertyKey: PropertyKey, value: any, receiver?: any): boolean;
+ function setPrototypeOf(target: any, proto: any): boolean;
+}interface Symbol {
+ /** Returns a string representation of an object. */
+ toString(): string;
+
+ /** Returns the primitive value of the specified object. */
+ valueOf(): Object;
+}
+
+interface SymbolConstructor {
+ /**
+ * A reference to the prototype.
+ */
+ readonly prototype: Symbol;
+
+ /**
+ * Returns a new unique Symbol value.
+ * @param description Description of the new Symbol object.
+ */
+ (description?: string|number): symbol;
+
+ /**
+ * Returns a Symbol object from the global symbol registry matching the given key if found.
+ * Otherwise, returns a new symbol with this key.
+ * @param key key to search for.
+ */
+ for(key: string): symbol;
+
+ /**
+ * Returns a key from the global symbol registry matching the given Symbol if found.
+ * Otherwise, returns a undefined.
+ * @param sym Symbol to find the key for.
+ */
+ keyFor(sym: symbol): string | undefined;
+}
+
+declare var Symbol: SymbolConstructor;/// <reference path="lib.es2015.symbol.d.ts" />
+
+interface SymbolConstructor {
+ /**
+ * A method that determines if a constructor object recognizes an object as one of the
+ * constructor’s instances. Called by the semantics of the instanceof operator.
+ */
+ readonly hasInstance: symbol;
+
+ /**
+ * A Boolean value that if true indicates that an object should flatten to its array elements
+ * by Array.prototype.concat.
+ */
+ readonly isConcatSpreadable: symbol;
+
+ /**
+ * A regular expression method that matches the regular expression against a string. Called
+ * by the String.prototype.match method.
+ */
+ readonly match: symbol;
+
+ /**
+ * A regular expression method that replaces matched substrings of a string. Called by the
+ * String.prototype.replace method.
+ */
+ readonly replace: symbol;
+
+ /**
+ * A regular expression method that returns the index within a string that matches the
+ * regular expression. Called by the String.prototype.search method.
+ */
+ readonly search: symbol;
+
+ /**
+ * A function valued property that is the constructor function that is used to create
+ * derived objects.
+ */
+ readonly species: symbol;
+
+ /**
+ * A regular expression method that splits a string at the indices that match the regular
+ * expression. Called by the String.prototype.split method.
+ */
+ readonly split: symbol;
+
+ /**
+ * A method that converts an object to a corresponding primitive value.
+ * Called by the ToPrimitive abstract operation.
+ */
+ readonly toPrimitive: symbol;
+
+ /**
+ * A String value that is used in the creation of the default string description of an object.
+ * Called by the built-in method Object.prototype.toString.
+ */
+ readonly toStringTag: symbol;
+
+ /**
+ * An Object whose own property names are property names that are excluded from the 'with'
+ * environment bindings of the associated objects.
+ */
+ readonly unscopables: symbol;
+}
+
+interface Symbol {
+ readonly [Symbol.toStringTag]: "Symbol";
+}
+
+interface Array<T> {
+ /**
+ * Returns an object whose properties have the value 'true'
+ * when they will be absent when used in a 'with' statement.
+ */
+ [Symbol.unscopables](): {
+ copyWithin: boolean;
+ entries: boolean;
+ fill: boolean;
+ find: boolean;
+ findIndex: boolean;
+ keys: boolean;
+ values: boolean;
+ };
+}
+
+interface Date {
+ /**
+ * Converts a Date object to a string.
+ */
+ [Symbol.toPrimitive](hint: "default"): string;
+ /**
+ * Converts a Date object to a string.
+ */
+ [Symbol.toPrimitive](hint: "string"): string;
+ /**
+ * Converts a Date object to a number.
+ */
+ [Symbol.toPrimitive](hint: "number"): number;
+ /**
+ * Converts a Date object to a string or number.
+ *
+ * @param hint The strings "number", "string", or "default" to specify what primitive to return.
+ *
+ * @throws {TypeError} If 'hint' was given something other than "number", "string", or "default".
+ * @returns A number if 'hint' was "number", a string if 'hint' was "string" or "default".
+ */
+ [Symbol.toPrimitive](hint: string): string | number;
+}
+
+interface Map<K, V> {
+ readonly [Symbol.toStringTag]: "Map";
+}
+
+interface WeakMap<K, V>{
+ readonly [Symbol.toStringTag]: "WeakMap";
+}
+
+interface Set<T> {
+ readonly [Symbol.toStringTag]: "Set";
+}
+
+interface WeakSet<T> {
+ readonly [Symbol.toStringTag]: "WeakSet";
+}
+
+interface JSON {
+ readonly [Symbol.toStringTag]: "JSON";
+}
+
+interface Function {
+ /**
+ * Determines whether the given value inherits from this function if this function was used
+ * as a constructor function.
+ *
+ * A constructor function can control which objects are recognized as its instances by
+ * 'instanceof' by overriding this method.
+ */
+ [Symbol.hasInstance](value: any): boolean;
+}
+
+interface GeneratorFunction extends Function {
+ readonly [Symbol.toStringTag]: "GeneratorFunction";
+}
+
+interface Math {
+ readonly [Symbol.toStringTag]: "Math";
+}
+
+interface Promise<T> {
+ readonly [Symbol.toStringTag]: "Promise";
+}
+
+interface PromiseConstructor {
+ readonly [Symbol.species]: Function;
+}
+
+interface RegExp {
+ /**
+ * Matches a string with this regular expression, and returns an array containing the results of
+ * that search.
+ * @param string A string to search within.
+ */
+ [Symbol.match](string: string): RegExpMatchArray | null;
+
+ /**
+ * Replaces text in a string, using this regular expression.
+ * @param string A String object or string literal whose contents matching against
+ * this regular expression will be replaced
+ * @param replaceValue A String object or string literal containing the text to replace for every
+ * successful match of this regular expression.
+ */
+ [Symbol.replace](string: string, replaceValue: string): string;
+
+ /**
+ * Replaces text in a string, using this regular expression.
+ * @param string A String object or string literal whose contents matching against
+ * this regular expression will be replaced
+ * @param replacer A function that returns the replacement text.
+ */
+ [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string;
+
+ /**
+ * Finds the position beginning first substring match in a regular expression search
+ * using this regular expression.
+ *
+ * @param string The string to search within.
+ */
+ [Symbol.search](string: string): number;
+
+ /**
+ * Returns an array of substrings that were delimited by strings in the original input that
+ * match against this regular expression.
+ *
+ * If the regular expression contains capturing parentheses, then each time this
+ * regular expression matches, the results (including any undefined results) of the
+ * capturing parentheses are spliced.
+ *
+ * @param string string value to split
+ * @param limit if not undefined, the output array is truncated so that it contains no more
+ * than 'limit' elements.
+ */
+ [Symbol.split](string: string, limit?: number): string[];
+}
+
+interface RegExpConstructor {
+ [Symbol.species](): RegExpConstructor;
+}
+
+interface String {
+ /**
+ * Matches a string an object that supports being matched against, and returns an array containing the results of that search.
+ * @param matcher An object that supports being matched against.
+ */
+ match(matcher: { [Symbol.match](string: string): RegExpMatchArray | null; }): RegExpMatchArray | null;
+
+ /**
+ * Replaces text in a string, using an object that supports replacement within a string.
+ * @param searchValue A object can search for and replace matches within a string.
+ * @param replaceValue A string containing the text to replace for every successful match of searchValue in this string.
+ */
+ replace(searchValue: { [Symbol.replace](string: string, replaceValue: string): string; }, replaceValue: string): string;
+
+ /**
+ * Replaces text in a string, using an object that supports replacement within a string.
+ * @param searchValue A object can search for and replace matches within a string.
+ * @param replacer A function that returns the replacement text.
+ */
+ replace(searchValue: { [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string; }, replacer: (substring: string, ...args: any[]) => string): string;
+ /**
+ * Finds the first substring match in a regular expression search.
+ * @param searcher An object which supports searching within a string.
+ */
+ search(searcher: { [Symbol.search](string: string): number; }): number;
+ /**
+ * Split a string into substrings using the specified separator and return them as an array.
+ * @param splitter An object that can split a string.
+ * @param limit A value used to limit the number of elements returned in the array.
+ */
+ split(splitter: { [Symbol.split](string: string, limit?: number): string[]; }, limit?: number): string[];
+}
+
+/**
+ * Represents a raw buffer of binary data, which is used to store data for the
+ * different typed arrays. ArrayBuffers cannot be read from or written to directly,
+ * but can be passed to a typed array or DataView Object to interpret the raw
+ * buffer as needed.
+ */
+interface ArrayBuffer {
+ readonly [Symbol.toStringTag]: "ArrayBuffer";
+}
+
+interface DataView {
+ readonly [Symbol.toStringTag]: "DataView";
+}
+
+/**
+ * A typed array of 8-bit integer values. The contents are initialized to 0. If the requested
+ * number of bytes could not be allocated an exception is raised.
+ */
+interface Int8Array {
+ readonly [Symbol.toStringTag]: "Int8Array";
+}
+
+/**
+ * A typed array of 8-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint8Array {
+ readonly [Symbol.toStringTag]: "UInt8Array";
+}
+
+/**
+ * A typed array of 8-bit unsigned integer (clamped) values. The contents are initialized to 0.
+ * If the requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint8ClampedArray {
+ readonly [Symbol.toStringTag]: "Uint8ClampedArray";
+}
+
+/**
+ * A typed array of 16-bit signed integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Int16Array {
+ readonly [Symbol.toStringTag]: "Int16Array";
+}
+
+/**
+ * A typed array of 16-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint16Array {
+ readonly [Symbol.toStringTag]: "Uint16Array";
+}
+
+/**
+ * A typed array of 32-bit signed integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Int32Array {
+ readonly [Symbol.toStringTag]: "Int32Array";
+}
+
+/**
+ * A typed array of 32-bit unsigned integer values. The contents are initialized to 0. If the
+ * requested number of bytes could not be allocated an exception is raised.
+ */
+interface Uint32Array {
+ readonly [Symbol.toStringTag]: "Uint32Array";
+}
+
+/**
+ * A typed array of 32-bit float values. The contents are initialized to 0. If the requested number
+ * of bytes could not be allocated an exception is raised.
+ */
+interface Float32Array {
+ readonly [Symbol.toStringTag]: "Float32Array";
+}
+
+/**
+ * A typed array of 64-bit float values. The contents are initialized to 0. If the requested
+ * number of bytes could not be allocated an exception is raised.
+ */
+interface Float64Array {
+ readonly [Symbol.toStringTag]: "Float64Array";
+}
/////////////////////////////
/// IE DOM APIs
/////////////////////////////
interface Algorithm {
- name?: string;
+ name: string;
}
interface AriaRequestEventInit extends EventInit {
@@ -5386,11 +5752,6 @@ interface AriaRequestEventInit extends EventInit {
attributeValue?: string;
}
-interface ClipboardEventInit extends EventInit {
- data?: string;
- dataType?: string;
-}
-
interface CommandEventInit extends EventInit {
commandName?: string;
detail?: string;
@@ -5404,6 +5765,31 @@ interface ConfirmSiteSpecificExceptionsInformation extends ExceptionInformation
arrayOfDomainStrings?: string[];
}
+interface ConstrainBooleanParameters {
+ exact?: boolean;
+ ideal?: boolean;
+}
+
+interface ConstrainDOMStringParameters {
+ exact?: string | string[];
+ ideal?: string | string[];
+}
+
+interface ConstrainDoubleRange extends DoubleRange {
+ exact?: number;
+ ideal?: number;
+}
+
+interface ConstrainLongRange extends LongRange {
+ exact?: number;
+ ideal?: number;
+}
+
+interface ConstrainVideoFacingModeParameters {
+ exact?: string | string[];
+ ideal?: string | string[];
+}
+
interface CustomEventInit extends EventInit {
detail?: any;
}
@@ -5414,17 +5800,44 @@ interface DeviceAccelerationDict {
z?: number;
}
+interface DeviceLightEventInit extends EventInit {
+ value?: number;
+}
+
interface DeviceRotationRateDict {
alpha?: number;
beta?: number;
gamma?: number;
}
+interface DoubleRange {
+ max?: number;
+ min?: number;
+}
+
interface EventInit {
bubbles?: boolean;
cancelable?: boolean;
}
+interface EventModifierInit extends UIEventInit {
+ ctrlKey?: boolean;
+ shiftKey?: boolean;
+ altKey?: boolean;
+ metaKey?: boolean;
+ modifierAltGraph?: boolean;
+ modifierCapsLock?: boolean;
+ modifierFn?: boolean;
+ modifierFnLock?: boolean;
+ modifierHyper?: boolean;
+ modifierNumLock?: boolean;
+ modifierOS?: boolean;
+ modifierScrollLock?: boolean;
+ modifierSuper?: boolean;
+ modifierSymbol?: boolean;
+ modifierSymbolLock?: boolean;
+}
+
interface ExceptionInformation {
domain?: string;
}
@@ -5438,17 +5851,416 @@ interface HashChangeEventInit extends EventInit {
oldURL?: string;
}
+interface IDBIndexParameters {
+ multiEntry?: boolean;
+ unique?: boolean;
+}
+
+interface IDBObjectStoreParameters {
+ autoIncrement?: boolean;
+ keyPath?: IDBKeyPath;
+}
+
interface KeyAlgorithm {
name?: string;
}
-interface KeyboardEventInit extends SharedKeyboardAndMouseEventInit {
+interface KeyboardEventInit extends EventModifierInit {
+ code?: string;
key?: string;
location?: number;
repeat?: boolean;
}
-interface MouseEventInit extends SharedKeyboardAndMouseEventInit {
+interface LongRange {
+ max?: number;
+ min?: number;
+}
+
+interface MSAccountInfo {
+ rpDisplayName?: string;
+ userDisplayName?: string;
+ accountName?: string;
+ userId?: string;
+ accountImageUri?: string;
+}
+
+interface MSAudioLocalClientEvent extends MSLocalClientEventBase {
+ networkSendQualityEventRatio?: number;
+ networkDelayEventRatio?: number;
+ cpuInsufficientEventRatio?: number;
+ deviceHalfDuplexAECEventRatio?: number;
+ deviceRenderNotFunctioningEventRatio?: number;
+ deviceCaptureNotFunctioningEventRatio?: number;
+ deviceGlitchesEventRatio?: number;
+ deviceLowSNREventRatio?: number;
+ deviceLowSpeechLevelEventRatio?: number;
+ deviceClippingEventRatio?: number;
+ deviceEchoEventRatio?: number;
+ deviceNearEndToEchoRatioEventRatio?: number;
+ deviceRenderZeroVolumeEventRatio?: number;
+ deviceRenderMuteEventRatio?: number;
+ deviceMultipleEndpointsEventCount?: number;
+ deviceHowlingEventCount?: number;
+}
+
+interface MSAudioRecvPayload extends MSPayloadBase {
+ samplingRate?: number;
+ signal?: MSAudioRecvSignal;
+ packetReorderRatio?: number;
+ packetReorderDepthAvg?: number;
+ packetReorderDepthMax?: number;
+ burstLossLength1?: number;
+ burstLossLength2?: number;
+ burstLossLength3?: number;
+ burstLossLength4?: number;
+ burstLossLength5?: number;
+ burstLossLength6?: number;
+ burstLossLength7?: number;
+ burstLossLength8OrHigher?: number;
+ fecRecvDistance1?: number;
+ fecRecvDistance2?: number;
+ fecRecvDistance3?: number;
+ ratioConcealedSamplesAvg?: number;
+ ratioStretchedSamplesAvg?: number;
+ ratioCompressedSamplesAvg?: number;
+}
+
+interface MSAudioRecvSignal {
+ initialSignalLevelRMS?: number;
+ recvSignalLevelCh1?: number;
+ recvNoiseLevelCh1?: number;
+ renderSignalLevel?: number;
+ renderNoiseLevel?: number;
+ renderLoopbackSignalLevel?: number;
+}
+
+interface MSAudioSendPayload extends MSPayloadBase {
+ samplingRate?: number;
+ signal?: MSAudioSendSignal;
+ audioFECUsed?: boolean;
+ sendMutePercent?: number;
+}
+
+interface MSAudioSendSignal {
+ noiseLevel?: number;
+ sendSignalLevelCh1?: number;
+ sendNoiseLevelCh1?: number;
+}
+
+interface MSConnectivity {
+ iceType?: string;
+ iceWarningFlags?: MSIceWarningFlags;
+ relayAddress?: MSRelayAddress;
+}
+
+interface MSCredentialFilter {
+ accept?: MSCredentialSpec[];
+}
+
+interface MSCredentialParameters {
+ type?: string;
+}
+
+interface MSCredentialSpec {
+ type?: string;
+ id?: string;
+}
+
+interface MSDelay {
+ roundTrip?: number;
+ roundTripMax?: number;
+}
+
+interface MSDescription extends RTCStats {
+ connectivity?: MSConnectivity;
+ transport?: string;
+ networkconnectivity?: MSNetworkConnectivityInfo;
+ localAddr?: MSIPAddressInfo;
+ remoteAddr?: MSIPAddressInfo;
+ deviceDevName?: string;
+ reflexiveLocalIPAddr?: MSIPAddressInfo;
+}
+
+interface MSFIDOCredentialParameters extends MSCredentialParameters {
+ algorithm?: string | Algorithm;
+ authenticators?: AAGUID[];
+}
+
+interface MSIPAddressInfo {
+ ipAddr?: string;
+ port?: number;
+ manufacturerMacAddrMask?: string;
+}
+
+interface MSIceWarningFlags {
+ turnTcpTimedOut?: boolean;
+ turnUdpAllocateFailed?: boolean;
+ turnUdpSendFailed?: boolean;
+ turnTcpAllocateFailed?: boolean;
+ turnTcpSendFailed?: boolean;
+ udpLocalConnectivityFailed?: boolean;
+ udpNatConnectivityFailed?: boolean;
+ udpRelayConnectivityFailed?: boolean;
+ tcpNatConnectivityFailed?: boolean;
+ tcpRelayConnectivityFailed?: boolean;
+ connCheckMessageIntegrityFailed?: boolean;
+ allocationMessageIntegrityFailed?: boolean;
+ connCheckOtherError?: boolean;
+ turnAuthUnknownUsernameError?: boolean;
+ noRelayServersConfigured?: boolean;
+ multipleRelayServersAttempted?: boolean;
+ portRangeExhausted?: boolean;
+ alternateServerReceived?: boolean;
+ pseudoTLSFailure?: boolean;
+ turnTurnTcpConnectivityFailed?: boolean;
+ useCandidateChecksFailed?: boolean;
+ fipsAllocationFailure?: boolean;
+}
+
+interface MSJitter {
+ interArrival?: number;
+ interArrivalMax?: number;
+ interArrivalSD?: number;
+}
+
+interface MSLocalClientEventBase extends RTCStats {
+ networkReceiveQualityEventRatio?: number;
+ networkBandwidthLowEventRatio?: number;
+}
+
+interface MSNetwork extends RTCStats {
+ jitter?: MSJitter;
+ delay?: MSDelay;
+ packetLoss?: MSPacketLoss;
+ utilization?: MSUtilization;
+}
+
+interface MSNetworkConnectivityInfo {
+ vpn?: boolean;
+ linkspeed?: number;
+ networkConnectionDetails?: string;
+}
+
+interface MSNetworkInterfaceType {
+ interfaceTypeEthernet?: boolean;
+ interfaceTypeWireless?: boolean;
+ interfaceTypePPP?: boolean;
+ interfaceTypeTunnel?: boolean;
+ interfaceTypeWWAN?: boolean;
+}
+
+interface MSOutboundNetwork extends MSNetwork {
+ appliedBandwidthLimit?: number;
+}
+
+interface MSPacketLoss {
+ lossRate?: number;
+ lossRateMax?: number;
+}
+
+interface MSPayloadBase extends RTCStats {
+ payloadDescription?: string;
+}
+
+interface MSRelayAddress {
+ relayAddress?: string;
+ port?: number;
+}
+
+interface MSSignatureParameters {
+ userPrompt?: string;
+}
+
+interface MSTransportDiagnosticsStats extends RTCStats {
+ baseAddress?: string;
+ localAddress?: string;
+ localSite?: string;
+ networkName?: string;
+ remoteAddress?: string;
+ remoteSite?: string;
+ localMR?: string;
+ remoteMR?: string;
+ iceWarningFlags?: MSIceWarningFlags;
+ portRangeMin?: number;
+ portRangeMax?: number;
+ localMRTCPPort?: number;
+ remoteMRTCPPort?: number;
+ stunVer?: number;
+ numConsentReqSent?: number;
+ numConsentReqReceived?: number;
+ numConsentRespSent?: number;
+ numConsentRespReceived?: number;
+ interfaces?: MSNetworkInterfaceType;
+ baseInterface?: MSNetworkInterfaceType;
+ protocol?: string;
+ localInterface?: MSNetworkInterfaceType;
+ localAddrType?: string;
+ remoteAddrType?: string;
+ iceRole?: string;
+ rtpRtcpMux?: boolean;
+ allocationTimeInMs?: number;
+ msRtcEngineVersion?: string;
+}
+
+interface MSUtilization {
+ packets?: number;
+ bandwidthEstimation?: number;
+ bandwidthEstimationMin?: number;
+ bandwidthEstimationMax?: number;
+ bandwidthEstimationStdDev?: number;
+ bandwidthEstimationAvg?: number;
+}
+
+interface MSVideoPayload extends MSPayloadBase {
+ resoluton?: string;
+ videoBitRateAvg?: number;
+ videoBitRateMax?: number;
+ videoFrameRateAvg?: number;
+ videoPacketLossRate?: number;
+ durationSeconds?: number;
+}
+
+interface MSVideoRecvPayload extends MSVideoPayload {
+ videoFrameLossRate?: number;
+ recvCodecType?: string;
+ recvResolutionWidth?: number;
+ recvResolutionHeight?: number;
+ videoResolutions?: MSVideoResolutionDistribution;
+ recvFrameRateAverage?: number;
+ recvBitRateMaximum?: number;
+ recvBitRateAverage?: number;
+ recvVideoStreamsMax?: number;
+ recvVideoStreamsMin?: number;
+ recvVideoStreamsMode?: number;
+ videoPostFECPLR?: number;
+ lowBitRateCallPercent?: number;
+ lowFrameRateCallPercent?: number;
+ reorderBufferTotalPackets?: number;
+ recvReorderBufferReorderedPackets?: number;
+ recvReorderBufferPacketsDroppedDueToBufferExhaustion?: number;
+ recvReorderBufferMaxSuccessfullyOrderedExtent?: number;
+ recvReorderBufferMaxSuccessfullyOrderedLateTime?: number;
+ recvReorderBufferPacketsDroppedDueToTimeout?: number;
+ recvFpsHarmonicAverage?: number;
+ recvNumResSwitches?: number;
+}
+
+interface MSVideoResolutionDistribution {
+ cifQuality?: number;
+ vgaQuality?: number;
+ h720Quality?: number;
+ h1080Quality?: number;
+ h1440Quality?: number;
+ h2160Quality?: number;
+}
+
+interface MSVideoSendPayload extends MSVideoPayload {
+ sendFrameRateAverage?: number;
+ sendBitRateMaximum?: number;
+ sendBitRateAverage?: number;
+ sendVideoStreamsMax?: number;
+ sendResolutionWidth?: number;
+ sendResolutionHeight?: number;
+}
+
+interface MediaEncryptedEventInit extends EventInit {
+ initDataType?: string;
+ initData?: ArrayBuffer;
+}
+
+interface MediaKeyMessageEventInit extends EventInit {
+ messageType?: string;
+ message?: ArrayBuffer;
+}
+
+interface MediaKeySystemConfiguration {
+ initDataTypes?: string[];
+ audioCapabilities?: MediaKeySystemMediaCapability[];
+ videoCapabilities?: MediaKeySystemMediaCapability[];
+ distinctiveIdentifier?: string;
+ persistentState?: string;
+}
+
+interface MediaKeySystemMediaCapability {
+ contentType?: string;
+ robustness?: string;
+}
+
+interface MediaStreamConstraints {
+ video?: boolean | MediaTrackConstraints;
+ audio?: boolean | MediaTrackConstraints;
+}
+
+interface MediaStreamErrorEventInit extends EventInit {
+ error?: MediaStreamError;
+}
+
+interface MediaStreamTrackEventInit extends EventInit {
+ track?: MediaStreamTrack;
+}
+
+interface MediaTrackCapabilities {
+ width?: number | LongRange;
+ height?: number | LongRange;
+ aspectRatio?: number | DoubleRange;
+ frameRate?: number | DoubleRange;
+ facingMode?: string;
+ volume?: number | DoubleRange;
+ sampleRate?: number | LongRange;
+ sampleSize?: number | LongRange;
+ echoCancellation?: boolean[];
+ deviceId?: string;
+ groupId?: string;
+}
+
+interface MediaTrackConstraintSet {
+ width?: number | ConstrainLongRange;
+ height?: number | ConstrainLongRange;
+ aspectRatio?: number | ConstrainDoubleRange;
+ frameRate?: number | ConstrainDoubleRange;
+ facingMode?: string | string[] | ConstrainDOMStringParameters;
+ volume?: number | ConstrainDoubleRange;
+ sampleRate?: number | ConstrainLongRange;
+ sampleSize?: number | ConstrainLongRange;
+ echoCancelation?: boolean | ConstrainBooleanParameters;
+ deviceId?: string | string[] | ConstrainDOMStringParameters;
+ groupId?: string | string[] | ConstrainDOMStringParameters;
+}
+
+interface MediaTrackConstraints extends MediaTrackConstraintSet {
+ advanced?: MediaTrackConstraintSet[];
+}
+
+interface MediaTrackSettings {
+ width?: number;
+ height?: number;
+ aspectRatio?: number;
+ frameRate?: number;
+ facingMode?: string;
+ volume?: number;
+ sampleRate?: number;
+ sampleSize?: number;
+ echoCancellation?: boolean;
+ deviceId?: string;
+ groupId?: string;
+}
+
+interface MediaTrackSupportedConstraints {
+ width?: boolean;
+ height?: boolean;
+ aspectRatio?: boolean;
+ frameRate?: boolean;
+ facingMode?: boolean;
+ volume?: boolean;
+ sampleRate?: boolean;
+ sampleSize?: boolean;
+ echoCancellation?: boolean;
+ deviceId?: boolean;
+ groupId?: boolean;
+}
+
+interface MouseEventInit extends EventModifierInit {
screenX?: number;
screenY?: number;
clientX?: number;
@@ -5481,6 +6293,10 @@ interface ObjectURLOptions {
oneTimeOnly?: boolean;
}
+interface PeriodicWaveConstraints {
+ disableNormalization?: boolean;
+}
+
interface PointerEventInit extends MouseEventInit {
pointerId?: number;
width?: number;
@@ -5498,22 +6314,266 @@ interface PositionOptions {
maximumAge?: number;
}
-interface SharedKeyboardAndMouseEventInit extends UIEventInit {
- ctrlKey?: boolean;
- shiftKey?: boolean;
- altKey?: boolean;
- metaKey?: boolean;
- keyModifierStateAltGraph?: boolean;
- keyModifierStateCapsLock?: boolean;
- keyModifierStateFn?: boolean;
- keyModifierStateFnLock?: boolean;
- keyModifierStateHyper?: boolean;
- keyModifierStateNumLock?: boolean;
- keyModifierStateOS?: boolean;
- keyModifierStateScrollLock?: boolean;
- keyModifierStateSuper?: boolean;
- keyModifierStateSymbol?: boolean;
- keyModifierStateSymbolLock?: boolean;
+interface RTCDTMFToneChangeEventInit extends EventInit {
+ tone?: string;
+}
+
+interface RTCDtlsFingerprint {
+ algorithm?: string;
+ value?: string;
+}
+
+interface RTCDtlsParameters {
+ role?: string;
+ fingerprints?: RTCDtlsFingerprint[];
+}
+
+interface RTCIceCandidate {
+ foundation?: string;
+ priority?: number;
+ ip?: string;
+ protocol?: string;
+ port?: number;
+ type?: string;
+ tcpType?: string;
+ relatedAddress?: string;
+ relatedPort?: number;
+}
+
+interface RTCIceCandidateAttributes extends RTCStats {
+ ipAddress?: string;
+ portNumber?: number;
+ transport?: string;
+ candidateType?: string;
+ priority?: number;
+ addressSourceUrl?: string;
+}
+
+interface RTCIceCandidateComplete {
+}
+
+interface RTCIceCandidatePair {
+ local?: RTCIceCandidate;
+ remote?: RTCIceCandidate;
+}
+
+interface RTCIceCandidatePairStats extends RTCStats {
+ transportId?: string;
+ localCandidateId?: string;
+ remoteCandidateId?: string;
+ state?: string;
+ priority?: number;
+ nominated?: boolean;
+ writable?: boolean;
+ readable?: boolean;
+ bytesSent?: number;
+ bytesReceived?: number;
+ roundTripTime?: number;
+ availableOutgoingBitrate?: number;
+ availableIncomingBitrate?: number;
+}
+
+interface RTCIceGatherOptions {
+ gatherPolicy?: string;
+ iceservers?: RTCIceServer[];
+}
+
+interface RTCIceParameters {
+ usernameFragment?: string;
+ password?: string;
+}
+
+interface RTCIceServer {
+ urls?: any;
+ username?: string;
+ credential?: string;
+}
+
+interface RTCInboundRTPStreamStats extends RTCRTPStreamStats {
+ packetsReceived?: number;
+ bytesReceived?: number;
+ packetsLost?: number;
+ jitter?: number;
+ fractionLost?: number;
+}
+
+interface RTCMediaStreamTrackStats extends RTCStats {
+ trackIdentifier?: string;
+ remoteSource?: boolean;
+ ssrcIds?: string[];
+ frameWidth?: number;
+ frameHeight?: number;
+ framesPerSecond?: number;
+ framesSent?: number;
+ framesReceived?: number;
+ framesDecoded?: number;
+ framesDropped?: number;
+ framesCorrupted?: number;
+ audioLevel?: number;
+ echoReturnLoss?: number;
+ echoReturnLossEnhancement?: number;
+}
+
+interface RTCOutboundRTPStreamStats extends RTCRTPStreamStats {
+ packetsSent?: number;
+ bytesSent?: number;
+ targetBitrate?: number;
+ roundTripTime?: number;
+}
+
+interface RTCRTPStreamStats extends RTCStats {
+ ssrc?: string;
+ associateStatsId?: string;
+ isRemote?: boolean;
+ mediaTrackId?: string;
+ transportId?: string;
+ codecId?: string;
+ firCount?: number;
+ pliCount?: number;
+ nackCount?: number;
+ sliCount?: number;
+}
+
+interface RTCRtcpFeedback {
+ type?: string;
+ parameter?: string;
+}
+
+interface RTCRtcpParameters {
+ ssrc?: number;
+ cname?: string;
+ reducedSize?: boolean;
+ mux?: boolean;
+}
+
+interface RTCRtpCapabilities {
+ codecs?: RTCRtpCodecCapability[];
+ headerExtensions?: RTCRtpHeaderExtension[];
+ fecMechanisms?: string[];
+}
+
+interface RTCRtpCodecCapability {
+ name?: string;
+ kind?: string;
+ clockRate?: number;
+ preferredPayloadType?: number;
+ maxptime?: number;
+ numChannels?: number;
+ rtcpFeedback?: RTCRtcpFeedback[];
+ parameters?: any;
+ options?: any;
+ maxTemporalLayers?: number;
+ maxSpatialLayers?: number;
+ svcMultiStreamSupport?: boolean;
+}
+
+interface RTCRtpCodecParameters {
+ name?: string;
+ payloadType?: any;
+ clockRate?: number;
+ maxptime?: number;
+ numChannels?: number;
+ rtcpFeedback?: RTCRtcpFeedback[];
+ parameters?: any;
+}
+
+interface RTCRtpContributingSource {
+ timestamp?: number;
+ csrc?: number;
+ audioLevel?: number;
+}
+
+interface RTCRtpEncodingParameters {
+ ssrc?: number;
+ codecPayloadType?: number;
+ fec?: RTCRtpFecParameters;
+ rtx?: RTCRtpRtxParameters;
+ priority?: number;
+ maxBitrate?: number;
+ minQuality?: number;
+ framerateBias?: number;
+ resolutionScale?: number;
+ framerateScale?: number;
+ active?: boolean;
+ encodingId?: string;
+ dependencyEncodingIds?: string[];
+ ssrcRange?: RTCSsrcRange;
+}
+
+interface RTCRtpFecParameters {
+ ssrc?: number;
+ mechanism?: string;
+}
+
+interface RTCRtpHeaderExtension {
+ kind?: string;
+ uri?: string;
+ preferredId?: number;
+ preferredEncrypt?: boolean;
+}
+
+interface RTCRtpHeaderExtensionParameters {
+ uri?: string;
+ id?: number;
+ encrypt?: boolean;
+}
+
+interface RTCRtpParameters {
+ muxId?: string;
+ codecs?: RTCRtpCodecParameters[];
+ headerExtensions?: RTCRtpHeaderExtensionParameters[];
+ encodings?: RTCRtpEncodingParameters[];
+ rtcp?: RTCRtcpParameters;
+}
+
+interface RTCRtpRtxParameters {
+ ssrc?: number;
+}
+
+interface RTCRtpUnhandled {
+ ssrc?: number;
+ payloadType?: number;
+ muxId?: string;
+}
+
+interface RTCSrtpKeyParam {
+ keyMethod?: string;
+ keySalt?: string;
+ lifetime?: string;
+ mkiValue?: number;
+ mkiLength?: number;
+}
+
+interface RTCSrtpSdesParameters {
+ tag?: number;
+ cryptoSuite?: string;
+ keyParams?: RTCSrtpKeyParam[];
+ sessionParams?: string[];
+}
+
+interface RTCSsrcRange {
+ min?: number;
+ max?: number;
+}
+
+interface RTCStats {
+ timestamp?: number;
+ type?: string;
+ id?: string;
+ msType?: string;
+}
+
+interface RTCStatsReport {
+}
+
+interface RTCTransportStats extends RTCStats {
+ bytesSent?: number;
+ bytesReceived?: number;
+ rtcpTransportStatsId?: string;
+ activeConnection?: boolean;
+ selectedCandidatePairId?: string;
+ localCertificateId?: string;
+ remoteCertificateId?: string;
}
interface StoreExceptionsInformation extends ExceptionInformation {
@@ -5532,6 +6592,7 @@ interface UIEventInit extends EventInit {
}
interface WebGLContextAttributes {
+ failIfMajorPerformanceCaveat?: boolean;
alpha?: boolean;
depth?: boolean;
stencil?: boolean;
@@ -5559,18 +6620,18 @@ interface ANGLE_instanced_arrays {
drawArraysInstancedANGLE(mode: number, first: number, count: number, primcount: number): void;
drawElementsInstancedANGLE(mode: number, count: number, type: number, offset: number, primcount: number): void;
vertexAttribDivisorANGLE(index: number, divisor: number): void;
- VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number;
+ readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number;
}
declare var ANGLE_instanced_arrays: {
prototype: ANGLE_instanced_arrays;
new(): ANGLE_instanced_arrays;
- VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number;
+ readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number;
}
interface AnalyserNode extends AudioNode {
fftSize: number;
- frequencyBinCount: number;
+ readonly frequencyBinCount: number;
maxDecibels: number;
minDecibels: number;
smoothingTimeConstant: number;
@@ -5586,8 +6647,8 @@ declare var AnalyserNode: {
}
interface AnimationEvent extends Event {
- animationName: string;
- elapsedTime: number;
+ readonly animationName: string;
+ readonly elapsedTime: number;
initAnimationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, animationNameArg: string, elapsedTimeArg: number): void;
}
@@ -5597,49 +6658,49 @@ declare var AnimationEvent: {
}
interface ApplicationCache extends EventTarget {
- oncached: (ev: Event) => any;
- onchecking: (ev: Event) => any;
- ondownloading: (ev: Event) => any;
- onerror: (ev: Event) => any;
- onnoupdate: (ev: Event) => any;
- onobsolete: (ev: Event) => any;
- onprogress: (ev: ProgressEvent) => any;
- onupdateready: (ev: Event) => any;
- status: number;
+ oncached: (this: this, ev: Event) => any;
+ onchecking: (this: this, ev: Event) => any;
+ ondownloading: (this: this, ev: Event) => any;
+ onerror: (this: this, ev: ErrorEvent) => any;
+ onnoupdate: (this: this, ev: Event) => any;
+ onobsolete: (this: this, ev: Event) => any;
+ onprogress: (this: this, ev: ProgressEvent) => any;
+ onupdateready: (this: this, ev: Event) => any;
+ readonly status: number;
abort(): void;
swapCache(): void;
update(): void;
- CHECKING: number;
- DOWNLOADING: number;
- IDLE: number;
- OBSOLETE: number;
- UNCACHED: number;
- UPDATEREADY: number;
- addEventListener(type: "cached", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "checking", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "downloading", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "noupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "obsolete", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "updateready", listener: (ev: Event) => any, useCapture?: boolean): void;
+ readonly CHECKING: number;
+ readonly DOWNLOADING: number;
+ readonly IDLE: number;
+ readonly OBSOLETE: number;
+ readonly UNCACHED: number;
+ readonly UPDATEREADY: number;
+ addEventListener(type: "cached", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "checking", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "downloading", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "noupdate", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "obsolete", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "progress", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "updateready", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
declare var ApplicationCache: {
prototype: ApplicationCache;
new(): ApplicationCache;
- CHECKING: number;
- DOWNLOADING: number;
- IDLE: number;
- OBSOLETE: number;
- UNCACHED: number;
- UPDATEREADY: number;
+ readonly CHECKING: number;
+ readonly DOWNLOADING: number;
+ readonly IDLE: number;
+ readonly OBSOLETE: number;
+ readonly UNCACHED: number;
+ readonly UPDATEREADY: number;
}
interface AriaRequestEvent extends Event {
- attributeName: string;
- attributeValue: string;
+ readonly attributeName: string;
+ attributeValue: string | null;
}
declare var AriaRequestEvent: {
@@ -5648,9 +6709,10 @@ declare var AriaRequestEvent: {
}
interface Attr extends Node {
- name: string;
- ownerElement: Element;
- specified: boolean;
+ readonly name: string;
+ readonly ownerElement: Element;
+ readonly prefix: string | null;
+ readonly specified: boolean;
value: string;
}
@@ -5660,10 +6722,12 @@ declare var Attr: {
}
interface AudioBuffer {
- duration: number;
- length: number;
- numberOfChannels: number;
- sampleRate: number;
+ readonly duration: number;
+ readonly length: number;
+ readonly numberOfChannels: number;
+ readonly sampleRate: number;
+ copyFromChannel(destination: Float32Array, channelNumber: number, startInChannel?: number): void;
+ copyToChannel(source: Float32Array, channelNumber: number, startInChannel?: number): void;
getChannelData(channel: number): Float32Array;
}
@@ -5673,15 +6737,16 @@ declare var AudioBuffer: {
}
interface AudioBufferSourceNode extends AudioNode {
- buffer: AudioBuffer;
+ buffer: AudioBuffer | null;
+ readonly detune: AudioParam;
loop: boolean;
loopEnd: number;
loopStart: number;
- onended: (ev: Event) => any;
- playbackRate: AudioParam;
+ onended: (this: this, ev: MediaStreamErrorEvent) => any;
+ readonly playbackRate: AudioParam;
start(when?: number, offset?: number, duration?: number): void;
stop(when?: number): void;
- addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "ended", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -5691,10 +6756,10 @@ declare var AudioBufferSourceNode: {
}
interface AudioContext extends EventTarget {
- currentTime: number;
- destination: AudioDestinationNode;
- listener: AudioListener;
- sampleRate: number;
+ readonly currentTime: number;
+ readonly destination: AudioDestinationNode;
+ readonly listener: AudioListener;
+ readonly sampleRate: number;
state: string;
createAnalyser(): AnalyserNode;
createBiquadFilter(): BiquadFilterNode;
@@ -5707,13 +6772,14 @@ interface AudioContext extends EventTarget {
createDynamicsCompressor(): DynamicsCompressorNode;
createGain(): GainNode;
createMediaElementSource(mediaElement: HTMLMediaElement): MediaElementAudioSourceNode;
+ createMediaStreamSource(mediaStream: MediaStream): MediaStreamAudioSourceNode;
createOscillator(): OscillatorNode;
createPanner(): PannerNode;
- createPeriodicWave(real: Float32Array, imag: Float32Array): PeriodicWave;
+ createPeriodicWave(real: Float32Array, imag: Float32Array, constraints?: PeriodicWaveConstraints): PeriodicWave;
createScriptProcessor(bufferSize?: number, numberOfInputChannels?: number, numberOfOutputChannels?: number): ScriptProcessorNode;
createStereoPanner(): StereoPannerNode;
createWaveShaper(): WaveShaperNode;
- decodeAudioData(audioData: ArrayBuffer, successCallback: DecodeSuccessCallback, errorCallback?: DecodeErrorCallback): void;
+ decodeAudioData(audioData: ArrayBuffer, successCallback?: DecodeSuccessCallback, errorCallback?: DecodeErrorCallback): PromiseLike<AudioBuffer>;
}
declare var AudioContext: {
@@ -5722,7 +6788,7 @@ declare var AudioContext: {
}
interface AudioDestinationNode extends AudioNode {
- maxChannelCount: number;
+ readonly maxChannelCount: number;
}
declare var AudioDestinationNode: {
@@ -5747,11 +6813,13 @@ interface AudioNode extends EventTarget {
channelCount: number;
channelCountMode: string;
channelInterpretation: string;
- context: AudioContext;
- numberOfInputs: number;
- numberOfOutputs: number;
+ readonly context: AudioContext;
+ readonly numberOfInputs: number;
+ readonly numberOfOutputs: number;
connect(destination: AudioNode, output?: number, input?: number): void;
disconnect(output?: number): void;
+ disconnect(destination: AudioNode, output?: number, input?: number): void;
+ disconnect(destination: AudioParam, output?: number): void;
}
declare var AudioNode: {
@@ -5760,7 +6828,7 @@ declare var AudioNode: {
}
interface AudioParam {
- defaultValue: number;
+ readonly defaultValue: number;
value: number;
cancelScheduledValues(startTime: number): void;
exponentialRampToValueAtTime(value: number, endTime: number): void;
@@ -5776,9 +6844,9 @@ declare var AudioParam: {
}
interface AudioProcessingEvent extends Event {
- inputBuffer: AudioBuffer;
- outputBuffer: AudioBuffer;
- playbackTime: number;
+ readonly inputBuffer: AudioBuffer;
+ readonly outputBuffer: AudioBuffer;
+ readonly playbackTime: number;
}
declare var AudioProcessingEvent: {
@@ -5788,11 +6856,11 @@ declare var AudioProcessingEvent: {
interface AudioTrack {
enabled: boolean;
- id: string;
+ readonly id: string;
kind: string;
- label: string;
+ readonly label: string;
language: string;
- sourceBuffer: SourceBuffer;
+ readonly sourceBuffer: SourceBuffer;
}
declare var AudioTrack: {
@@ -5801,15 +6869,15 @@ declare var AudioTrack: {
}
interface AudioTrackList extends EventTarget {
- length: number;
- onaddtrack: (ev: TrackEvent) => any;
- onchange: (ev: Event) => any;
- onremovetrack: (ev: TrackEvent) => any;
- getTrackById(id: string): AudioTrack;
+ readonly length: number;
+ onaddtrack: (this: this, ev: TrackEvent) => any;
+ onchange: (this: this, ev: Event) => any;
+ onremovetrack: (this: this, ev: TrackEvent) => any;
+ getTrackById(id: string): AudioTrack | null;
item(index: number): AudioTrack;
- addEventListener(type: "addtrack", listener: (ev: TrackEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "removetrack", listener: (ev: TrackEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "addtrack", listener: (this: this, ev: TrackEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "change", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "removetrack", listener: (this: this, ev: TrackEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
[index: number]: AudioTrack;
}
@@ -5820,7 +6888,7 @@ declare var AudioTrackList: {
}
interface BarProp {
- visible: boolean;
+ readonly visible: boolean;
}
declare var BarProp: {
@@ -5838,10 +6906,10 @@ declare var BeforeUnloadEvent: {
}
interface BiquadFilterNode extends AudioNode {
- Q: AudioParam;
- detune: AudioParam;
- frequency: AudioParam;
- gain: AudioParam;
+ readonly Q: AudioParam;
+ readonly detune: AudioParam;
+ readonly frequency: AudioParam;
+ readonly gain: AudioParam;
type: string;
getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void;
}
@@ -5852,8 +6920,8 @@ declare var BiquadFilterNode: {
}
interface Blob {
- size: number;
- type: string;
+ readonly size: number;
+ readonly type: string;
msClose(): void;
msDetachStream(): any;
slice(start?: number, end?: number, contentType?: string): Blob;
@@ -5887,7 +6955,7 @@ declare var CSSConditionRule: {
}
interface CSSFontFaceRule extends CSSRule {
- style: CSSStyleDeclaration;
+ readonly style: CSSStyleDeclaration;
}
declare var CSSFontFaceRule: {
@@ -5896,9 +6964,9 @@ declare var CSSFontFaceRule: {
}
interface CSSGroupingRule extends CSSRule {
- cssRules: CSSRuleList;
- deleteRule(index?: number): void;
- insertRule(rule: string, index?: number): number;
+ readonly cssRules: CSSRuleList;
+ deleteRule(index: number): void;
+ insertRule(rule: string, index: number): number;
}
declare var CSSGroupingRule: {
@@ -5907,9 +6975,9 @@ declare var CSSGroupingRule: {
}
interface CSSImportRule extends CSSRule {
- href: string;
- media: MediaList;
- styleSheet: CSSStyleSheet;
+ readonly href: string;
+ readonly media: MediaList;
+ readonly styleSheet: CSSStyleSheet;
}
declare var CSSImportRule: {
@@ -5919,7 +6987,7 @@ declare var CSSImportRule: {
interface CSSKeyframeRule extends CSSRule {
keyText: string;
- style: CSSStyleDeclaration;
+ readonly style: CSSStyleDeclaration;
}
declare var CSSKeyframeRule: {
@@ -5928,7 +6996,7 @@ declare var CSSKeyframeRule: {
}
interface CSSKeyframesRule extends CSSRule {
- cssRules: CSSRuleList;
+ readonly cssRules: CSSRuleList;
name: string;
appendRule(rule: string): void;
deleteRule(rule: string): void;
@@ -5941,7 +7009,7 @@ declare var CSSKeyframesRule: {
}
interface CSSMediaRule extends CSSConditionRule {
- media: MediaList;
+ readonly media: MediaList;
}
declare var CSSMediaRule: {
@@ -5950,8 +7018,8 @@ declare var CSSMediaRule: {
}
interface CSSNamespaceRule extends CSSRule {
- namespaceURI: string;
- prefix: string;
+ readonly namespaceURI: string;
+ readonly prefix: string;
}
declare var CSSNamespaceRule: {
@@ -5960,10 +7028,10 @@ declare var CSSNamespaceRule: {
}
interface CSSPageRule extends CSSRule {
- pseudoClass: string;
- selector: string;
+ readonly pseudoClass: string;
+ readonly selector: string;
selectorText: string;
- style: CSSStyleDeclaration;
+ readonly style: CSSStyleDeclaration;
}
declare var CSSPageRule: {
@@ -5973,42 +7041,42 @@ declare var CSSPageRule: {
interface CSSRule {
cssText: string;
- parentRule: CSSRule;
- parentStyleSheet: CSSStyleSheet;
- type: number;
- CHARSET_RULE: number;
- FONT_FACE_RULE: number;
- IMPORT_RULE: number;
- KEYFRAMES_RULE: number;
- KEYFRAME_RULE: number;
- MEDIA_RULE: number;
- NAMESPACE_RULE: number;
- PAGE_RULE: number;
- STYLE_RULE: number;
- SUPPORTS_RULE: number;
- UNKNOWN_RULE: number;
- VIEWPORT_RULE: number;
+ readonly parentRule: CSSRule;
+ readonly parentStyleSheet: CSSStyleSheet;
+ readonly type: number;
+ readonly CHARSET_RULE: number;
+ readonly FONT_FACE_RULE: number;
+ readonly IMPORT_RULE: number;
+ readonly KEYFRAMES_RULE: number;
+ readonly KEYFRAME_RULE: number;
+ readonly MEDIA_RULE: number;
+ readonly NAMESPACE_RULE: number;
+ readonly PAGE_RULE: number;
+ readonly STYLE_RULE: number;
+ readonly SUPPORTS_RULE: number;
+ readonly UNKNOWN_RULE: number;
+ readonly VIEWPORT_RULE: number;
}
declare var CSSRule: {
prototype: CSSRule;
new(): CSSRule;
- CHARSET_RULE: number;
- FONT_FACE_RULE: number;
- IMPORT_RULE: number;
- KEYFRAMES_RULE: number;
- KEYFRAME_RULE: number;
- MEDIA_RULE: number;
- NAMESPACE_RULE: number;
- PAGE_RULE: number;
- STYLE_RULE: number;
- SUPPORTS_RULE: number;
- UNKNOWN_RULE: number;
- VIEWPORT_RULE: number;
+ readonly CHARSET_RULE: number;
+ readonly FONT_FACE_RULE: number;
+ readonly IMPORT_RULE: number;
+ readonly KEYFRAMES_RULE: number;
+ readonly KEYFRAME_RULE: number;
+ readonly MEDIA_RULE: number;
+ readonly NAMESPACE_RULE: number;
+ readonly PAGE_RULE: number;
+ readonly STYLE_RULE: number;
+ readonly SUPPORTS_RULE: number;
+ readonly UNKNOWN_RULE: number;
+ readonly VIEWPORT_RULE: number;
}
interface CSSRuleList {
- length: number;
+ readonly length: number;
item(index: number): CSSRule;
[index: number]: CSSRule;
}
@@ -6019,356 +7087,343 @@ declare var CSSRuleList: {
}
interface CSSStyleDeclaration {
- alignContent: string;
- alignItems: string;
- alignSelf: string;
- alignmentBaseline: string;
- animation: string;
- animationDelay: string;
- animationDirection: string;
- animationDuration: string;
- animationFillMode: string;
- animationIterationCount: string;
- animationName: string;
- animationPlayState: string;
- animationTimingFunction: string;
- backfaceVisibility: string;
- background: string;
- backgroundAttachment: string;
- backgroundClip: string;
- backgroundColor: string;
- backgroundImage: string;
- backgroundOrigin: string;
- backgroundPosition: string;
- backgroundPositionX: string;
- backgroundPositionY: string;
- backgroundRepeat: string;
- backgroundSize: string;
- baselineShift: string;
- border: string;
- borderBottom: string;
- borderBottomColor: string;
- borderBottomLeftRadius: string;
- borderBottomRightRadius: string;
- borderBottomStyle: string;
- borderBottomWidth: string;
- borderCollapse: string;
- borderColor: string;
- borderImage: string;
- borderImageOutset: string;
- borderImageRepeat: string;
- borderImageSlice: string;
- borderImageSource: string;
- borderImageWidth: string;
- borderLeft: string;
- borderLeftColor: string;
- borderLeftStyle: string;
- borderLeftWidth: string;
- borderRadius: string;
- borderRight: string;
- borderRightColor: string;
- borderRightStyle: string;
- borderRightWidth: string;
- borderSpacing: string;
- borderStyle: string;
- borderTop: string;
- borderTopColor: string;
- borderTopLeftRadius: string;
- borderTopRightRadius: string;
- borderTopStyle: string;
- borderTopWidth: string;
- borderWidth: string;
- bottom: string;
- boxShadow: string;
- boxSizing: string;
- breakAfter: string;
- breakBefore: string;
- breakInside: string;
- captionSide: string;
- clear: string;
- clip: string;
- clipPath: string;
- clipRule: string;
- color: string;
- colorInterpolationFilters: string;
+ alignContent: string | null;
+ alignItems: string | null;
+ alignSelf: string | null;
+ alignmentBaseline: string | null;
+ animation: string | null;
+ animationDelay: string | null;
+ animationDirection: string | null;
+ animationDuration: string | null;
+ animationFillMode: string | null;
+ animationIterationCount: string | null;
+ animationName: string | null;
+ animationPlayState: string | null;
+ animationTimingFunction: string | null;
+ backfaceVisibility: string | null;
+ background: string | null;
+ backgroundAttachment: string | null;
+ backgroundClip: string | null;
+ backgroundColor: string | null;
+ backgroundImage: string | null;
+ backgroundOrigin: string | null;
+ backgroundPosition: string | null;
+ backgroundPositionX: string | null;
+ backgroundPositionY: string | null;
+ backgroundRepeat: string | null;
+ backgroundSize: string | null;
+ baselineShift: string | null;
+ border: string | null;
+ borderBottom: string | null;
+ borderBottomColor: string | null;
+ borderBottomLeftRadius: string | null;
+ borderBottomRightRadius: string | null;
+ borderBottomStyle: string | null;
+ borderBottomWidth: string | null;
+ borderCollapse: string | null;
+ borderColor: string | null;
+ borderImage: string | null;
+ borderImageOutset: string | null;
+ borderImageRepeat: string | null;
+ borderImageSlice: string | null;
+ borderImageSource: string | null;
+ borderImageWidth: string | null;
+ borderLeft: string | null;
+ borderLeftColor: string | null;
+ borderLeftStyle: string | null;
+ borderLeftWidth: string | null;
+ borderRadius: string | null;
+ borderRight: string | null;
+ borderRightColor: string | null;
+ borderRightStyle: string | null;
+ borderRightWidth: string | null;
+ borderSpacing: string | null;
+ borderStyle: string | null;
+ borderTop: string | null;
+ borderTopColor: string | null;
+ borderTopLeftRadius: string | null;
+ borderTopRightRadius: string | null;
+ borderTopStyle: string | null;
+ borderTopWidth: string | null;
+ borderWidth: string | null;
+ bottom: string | null;
+ boxShadow: string | null;
+ boxSizing: string | null;
+ breakAfter: string | null;
+ breakBefore: string | null;
+ breakInside: string | null;
+ captionSide: string | null;
+ clear: string | null;
+ clip: string | null;
+ clipPath: string | null;
+ clipRule: string | null;
+ color: string | null;
+ colorInterpolationFilters: string | null;
columnCount: any;
- columnFill: string;
+ columnFill: string | null;
columnGap: any;
- columnRule: string;
+ columnRule: string | null;
columnRuleColor: any;
- columnRuleStyle: string;
+ columnRuleStyle: string | null;
columnRuleWidth: any;
- columnSpan: string;
+ columnSpan: string | null;
columnWidth: any;
- columns: string;
- content: string;
- counterIncrement: string;
- counterReset: string;
- cssFloat: string;
+ columns: string | null;
+ content: string | null;
+ counterIncrement: string | null;
+ counterReset: string | null;
+ cssFloat: string | null;
cssText: string;
- cursor: string;
- direction: string;
- display: string;
- dominantBaseline: string;
- emptyCells: string;
- enableBackground: string;
- fill: string;
- fillOpacity: string;
- fillRule: string;
- filter: string;
- flex: string;
- flexBasis: string;
- flexDirection: string;
- flexFlow: string;
- flexGrow: string;
- flexShrink: string;
- flexWrap: string;
- floodColor: string;
- floodOpacity: string;
- font: string;
- fontFamily: string;
- fontFeatureSettings: string;
- fontSize: string;
- fontSizeAdjust: string;
- fontStretch: string;
- fontStyle: string;
- fontVariant: string;
- fontWeight: string;
- glyphOrientationHorizontal: string;
- glyphOrientationVertical: string;
- height: string;
- imeMode: string;
- justifyContent: string;
- kerning: string;
- left: string;
- length: number;
- letterSpacing: string;
- lightingColor: string;
- lineHeight: string;
- listStyle: string;
- listStyleImage: string;
- listStylePosition: string;
- listStyleType: string;
- margin: string;
- marginBottom: string;
- marginLeft: string;
- marginRight: string;
- marginTop: string;
- marker: string;
- markerEnd: string;
- markerMid: string;
- markerStart: string;
- mask: string;
- maxHeight: string;
- maxWidth: string;
- minHeight: string;
- minWidth: string;
- msContentZoomChaining: string;
- msContentZoomLimit: string;
+ cursor: string | null;
+ direction: string | null;
+ display: string | null;
+ dominantBaseline: string | null;
+ emptyCells: string | null;
+ enableBackground: string | null;
+ fill: string | null;
+ fillOpacity: string | null;
+ fillRule: string | null;
+ filter: string | null;
+ flex: string | null;
+ flexBasis: string | null;
+ flexDirection: string | null;
+ flexFlow: string | null;
+ flexGrow: string | null;
+ flexShrink: string | null;
+ flexWrap: string | null;
+ floodColor: string | null;
+ floodOpacity: string | null;
+ font: string | null;
+ fontFamily: string | null;
+ fontFeatureSettings: string | null;
+ fontSize: string | null;
+ fontSizeAdjust: string | null;
+ fontStretch: string | null;
+ fontStyle: string | null;
+ fontVariant: string | null;
+ fontWeight: string | null;
+ glyphOrientationHorizontal: string | null;
+ glyphOrientationVertical: string | null;
+ height: string | null;
+ imeMode: string | null;
+ justifyContent: string | null;
+ kerning: string | null;
+ left: string | null;
+ readonly length: number;
+ letterSpacing: string | null;
+ lightingColor: string | null;
+ lineHeight: string | null;
+ listStyle: string | null;
+ listStyleImage: string | null;
+ listStylePosition: string | null;
+ listStyleType: string | null;
+ margin: string | null;
+ marginBottom: string | null;
+ marginLeft: string | null;
+ marginRight: string | null;
+ marginTop: string | null;
+ marker: string | null;
+ markerEnd: string | null;
+ markerMid: string | null;
+ markerStart: string | null;
+ mask: string | null;
+ maxHeight: string | null;
+ maxWidth: string | null;
+ minHeight: string | null;
+ minWidth: string | null;
+ msContentZoomChaining: string | null;
+ msContentZoomLimit: string | null;
msContentZoomLimitMax: any;
msContentZoomLimitMin: any;
- msContentZoomSnap: string;
- msContentZoomSnapPoints: string;
- msContentZoomSnapType: string;
- msContentZooming: string;
- msFlowFrom: string;
- msFlowInto: string;
- msFontFeatureSettings: string;
+ msContentZoomSnap: string | null;
+ msContentZoomSnapPoints: string | null;
+ msContentZoomSnapType: string | null;
+ msContentZooming: string | null;
+ msFlowFrom: string | null;
+ msFlowInto: string | null;
+ msFontFeatureSettings: string | null;
msGridColumn: any;
- msGridColumnAlign: string;
+ msGridColumnAlign: string | null;
msGridColumnSpan: any;
- msGridColumns: string;
+ msGridColumns: string | null;
msGridRow: any;
- msGridRowAlign: string;
+ msGridRowAlign: string | null;
msGridRowSpan: any;
- msGridRows: string;
- msHighContrastAdjust: string;
- msHyphenateLimitChars: string;
+ msGridRows: string | null;
+ msHighContrastAdjust: string | null;
+ msHyphenateLimitChars: string | null;
msHyphenateLimitLines: any;
msHyphenateLimitZone: any;
- msHyphens: string;
- msImeAlign: string;
- msOverflowStyle: string;
- msScrollChaining: string;
- msScrollLimit: string;
+ msHyphens: string | null;
+ msImeAlign: string | null;
+ msOverflowStyle: string | null;
+ msScrollChaining: string | null;
+ msScrollLimit: string | null;
msScrollLimitXMax: any;
msScrollLimitXMin: any;
msScrollLimitYMax: any;
msScrollLimitYMin: any;
- msScrollRails: string;
- msScrollSnapPointsX: string;
- msScrollSnapPointsY: string;
- msScrollSnapType: string;
- msScrollSnapX: string;
- msScrollSnapY: string;
- msScrollTranslation: string;
- msTextCombineHorizontal: string;
+ msScrollRails: string | null;
+ msScrollSnapPointsX: string | null;
+ msScrollSnapPointsY: string | null;
+ msScrollSnapType: string | null;
+ msScrollSnapX: string | null;
+ msScrollSnapY: string | null;
+ msScrollTranslation: string | null;
+ msTextCombineHorizontal: string | null;
msTextSizeAdjust: any;
- msTouchAction: string;
- msTouchSelect: string;
- msUserSelect: string;
+ msTouchAction: string | null;
+ msTouchSelect: string | null;
+ msUserSelect: string | null;
msWrapFlow: string;
msWrapMargin: any;
msWrapThrough: string;
- opacity: string;
- order: string;
- orphans: string;
- outline: string;
- outlineColor: string;
- outlineStyle: string;
- outlineWidth: string;
- overflow: string;
- overflowX: string;
- overflowY: string;
- padding: string;
- paddingBottom: string;
- paddingLeft: string;
- paddingRight: string;
- paddingTop: string;
- pageBreakAfter: string;
- pageBreakBefore: string;
- pageBreakInside: string;
- parentRule: CSSRule;
- perspective: string;
- perspectiveOrigin: string;
- pointerEvents: string;
- position: string;
- quotes: string;
- right: string;
- rubyAlign: string;
- rubyOverhang: string;
- rubyPosition: string;
- stopColor: string;
- stopOpacity: string;
- stroke: string;
- strokeDasharray: string;
- strokeDashoffset: string;
- strokeLinecap: string;
- strokeLinejoin: string;
- strokeMiterlimit: string;
- strokeOpacity: string;
- strokeWidth: string;
- tableLayout: string;
- textAlign: string;
- textAlignLast: string;
- textAnchor: string;
- textDecoration: string;
- textFillColor: string;
- textIndent: string;
- textJustify: string;
- textKashida: string;
- textKashidaSpace: string;
- textOverflow: string;
- textShadow: string;
- textTransform: string;
- textUnderlinePosition: string;
- top: string;
- touchAction: string;
- transform: string;
- transformOrigin: string;
- transformStyle: string;
- transition: string;
- transitionDelay: string;
- transitionDuration: string;
- transitionProperty: string;
- transitionTimingFunction: string;
- unicodeBidi: string;
- verticalAlign: string;
- visibility: string;
- webkitAlignContent: string;
- webkitAlignItems: string;
- webkitAlignSelf: string;
- webkitAnimation: string;
- webkitAnimationDelay: string;
- webkitAnimationDirection: string;
- webkitAnimationDuration: string;
- webkitAnimationFillMode: string;
- webkitAnimationIterationCount: string;
- webkitAnimationName: string;
- webkitAnimationPlayState: string;
- webkitAnimationTimingFunction: string;
- webkitAppearance: string;
- webkitBackfaceVisibility: string;
- webkitBackground: string;
- webkitBackgroundAttachment: string;
- webkitBackgroundClip: string;
- webkitBackgroundColor: string;
- webkitBackgroundImage: string;
- webkitBackgroundOrigin: string;
- webkitBackgroundPosition: string;
- webkitBackgroundPositionX: string;
- webkitBackgroundPositionY: string;
- webkitBackgroundRepeat: string;
- webkitBackgroundSize: string;
- webkitBorderBottomLeftRadius: string;
- webkitBorderBottomRightRadius: string;
- webkitBorderImage: string;
- webkitBorderImageOutset: string;
- webkitBorderImageRepeat: string;
- webkitBorderImageSlice: string;
- webkitBorderImageSource: string;
- webkitBorderImageWidth: string;
- webkitBorderRadius: string;
- webkitBorderTopLeftRadius: string;
- webkitBorderTopRightRadius: string;
- webkitBoxAlign: string;
- webkitBoxDirection: string;
- webkitBoxFlex: string;
- webkitBoxOrdinalGroup: string;
- webkitBoxOrient: string;
- webkitBoxPack: string;
- webkitBoxSizing: string;
- webkitColumnBreakAfter: string;
- webkitColumnBreakBefore: string;
- webkitColumnBreakInside: string;
+ opacity: string | null;
+ order: string | null;
+ orphans: string | null;
+ outline: string | null;
+ outlineColor: string | null;
+ outlineStyle: string | null;
+ outlineWidth: string | null;
+ overflow: string | null;
+ overflowX: string | null;
+ overflowY: string | null;
+ padding: string | null;
+ paddingBottom: string | null;
+ paddingLeft: string | null;
+ paddingRight: string | null;
+ paddingTop: string | null;
+ pageBreakAfter: string | null;
+ pageBreakBefore: string | null;
+ pageBreakInside: string | null;
+ readonly parentRule: CSSRule;
+ perspective: string | null;
+ perspectiveOrigin: string | null;
+ pointerEvents: string | null;
+ position: string | null;
+ quotes: string | null;
+ right: string | null;
+ rubyAlign: string | null;
+ rubyOverhang: string | null;
+ rubyPosition: string | null;
+ stopColor: string | null;
+ stopOpacity: string | null;
+ stroke: string | null;
+ strokeDasharray: string | null;
+ strokeDashoffset: string | null;
+ strokeLinecap: string | null;
+ strokeLinejoin: string | null;
+ strokeMiterlimit: string | null;
+ strokeOpacity: string | null;
+ strokeWidth: string | null;
+ tableLayout: string | null;
+ textAlign: string | null;
+ textAlignLast: string | null;
+ textAnchor: string | null;
+ textDecoration: string | null;
+ textIndent: string | null;
+ textJustify: string | null;
+ textKashida: string | null;
+ textKashidaSpace: string | null;
+ textOverflow: string | null;
+ textShadow: string | null;
+ textTransform: string | null;
+ textUnderlinePosition: string | null;
+ top: string | null;
+ touchAction: string | null;
+ transform: string | null;
+ transformOrigin: string | null;
+ transformStyle: string | null;
+ transition: string | null;
+ transitionDelay: string | null;
+ transitionDuration: string | null;
+ transitionProperty: string | null;
+ transitionTimingFunction: string | null;
+ unicodeBidi: string | null;
+ verticalAlign: string | null;
+ visibility: string | null;
+ webkitAlignContent: string | null;
+ webkitAlignItems: string | null;
+ webkitAlignSelf: string | null;
+ webkitAnimation: string | null;
+ webkitAnimationDelay: string | null;
+ webkitAnimationDirection: string | null;
+ webkitAnimationDuration: string | null;
+ webkitAnimationFillMode: string | null;
+ webkitAnimationIterationCount: string | null;
+ webkitAnimationName: string | null;
+ webkitAnimationPlayState: string | null;
+ webkitAnimationTimingFunction: string | null;
+ webkitAppearance: string | null;
+ webkitBackfaceVisibility: string | null;
+ webkitBackgroundClip: string | null;
+ webkitBackgroundOrigin: string | null;
+ webkitBackgroundSize: string | null;
+ webkitBorderBottomLeftRadius: string | null;
+ webkitBorderBottomRightRadius: string | null;
+ webkitBorderImage: string | null;
+ webkitBorderRadius: string | null;
+ webkitBorderTopLeftRadius: string | null;
+ webkitBorderTopRightRadius: string | null;
+ webkitBoxAlign: string | null;
+ webkitBoxDirection: string | null;
+ webkitBoxFlex: string | null;
+ webkitBoxOrdinalGroup: string | null;
+ webkitBoxOrient: string | null;
+ webkitBoxPack: string | null;
+ webkitBoxSizing: string | null;
+ webkitColumnBreakAfter: string | null;
+ webkitColumnBreakBefore: string | null;
+ webkitColumnBreakInside: string | null;
webkitColumnCount: any;
webkitColumnGap: any;
- webkitColumnRule: string;
+ webkitColumnRule: string | null;
webkitColumnRuleColor: any;
- webkitColumnRuleStyle: string;
+ webkitColumnRuleStyle: string | null;
webkitColumnRuleWidth: any;
- webkitColumnSpan: string;
+ webkitColumnSpan: string | null;
webkitColumnWidth: any;
- webkitColumns: string;
- webkitFilter: string;
- webkitFlex: string;
- webkitFlexBasis: string;
- webkitFlexDirection: string;
- webkitFlexFlow: string;
- webkitFlexGrow: string;
- webkitFlexShrink: string;
- webkitFlexWrap: string;
- webkitJustifyContent: string;
- webkitOrder: string;
- webkitPerspective: string;
- webkitPerspectiveOrigin: string;
- webkitTapHighlightColor: string;
- webkitTextFillColor: string;
+ webkitColumns: string | null;
+ webkitFilter: string | null;
+ webkitFlex: string | null;
+ webkitFlexBasis: string | null;
+ webkitFlexDirection: string | null;
+ webkitFlexFlow: string | null;
+ webkitFlexGrow: string | null;
+ webkitFlexShrink: string | null;
+ webkitFlexWrap: string | null;
+ webkitJustifyContent: string | null;
+ webkitOrder: string | null;
+ webkitPerspective: string | null;
+ webkitPerspectiveOrigin: string | null;
+ webkitTapHighlightColor: string | null;
+ webkitTextFillColor: string | null;
webkitTextSizeAdjust: any;
- webkitTransform: string;
- webkitTransformOrigin: string;
- webkitTransformStyle: string;
- webkitTransition: string;
- webkitTransitionDelay: string;
- webkitTransitionDuration: string;
- webkitTransitionProperty: string;
- webkitTransitionTimingFunction: string;
- webkitUserSelect: string;
- webkitWritingMode: string;
- whiteSpace: string;
- widows: string;
- width: string;
- wordBreak: string;
- wordSpacing: string;
- wordWrap: string;
- writingMode: string;
- zIndex: string;
- zoom: string;
+ webkitTransform: string | null;
+ webkitTransformOrigin: string | null;
+ webkitTransformStyle: string | null;
+ webkitTransition: string | null;
+ webkitTransitionDelay: string | null;
+ webkitTransitionDuration: string | null;
+ webkitTransitionProperty: string | null;
+ webkitTransitionTimingFunction: string | null;
+ webkitUserModify: string | null;
+ webkitUserSelect: string | null;
+ webkitWritingMode: string | null;
+ whiteSpace: string | null;
+ widows: string | null;
+ width: string | null;
+ wordBreak: string | null;
+ wordSpacing: string | null;
+ wordWrap: string | null;
+ writingMode: string | null;
+ zIndex: string | null;
+ zoom: string | null;
getPropertyPriority(propertyName: string): string;
getPropertyValue(propertyName: string): string;
item(index: number): string;
removeProperty(propertyName: string): string;
- setProperty(propertyName: string, value: string, priority?: string): void;
+ setProperty(propertyName: string, value: string | null, priority?: string): void;
[index: number]: string;
}
@@ -6378,9 +7433,9 @@ declare var CSSStyleDeclaration: {
}
interface CSSStyleRule extends CSSRule {
- readOnly: boolean;
+ readonly readOnly: boolean;
selectorText: string;
- style: CSSStyleDeclaration;
+ readonly style: CSSStyleDeclaration;
}
declare var CSSStyleRule: {
@@ -6389,18 +7444,18 @@ declare var CSSStyleRule: {
}
interface CSSStyleSheet extends StyleSheet {
- cssRules: CSSRuleList;
+ readonly cssRules: CSSRuleList;
cssText: string;
- href: string;
- id: string;
- imports: StyleSheetList;
- isAlternate: boolean;
- isPrefAlternate: boolean;
- ownerRule: CSSRule;
- owningElement: Element;
- pages: StyleSheetPageList;
- readOnly: boolean;
- rules: CSSRuleList;
+ readonly href: string;
+ readonly id: string;
+ readonly imports: StyleSheetList;
+ readonly isAlternate: boolean;
+ readonly isPrefAlternate: boolean;
+ readonly ownerRule: CSSRule;
+ readonly owningElement: Element;
+ readonly pages: StyleSheetPageList;
+ readonly readOnly: boolean;
+ readonly rules: CSSRuleList;
addImport(bstrURL: string, lIndex?: number): number;
addPageRule(bstrSelector: string, bstrStyle: string, lIndex?: number): number;
addRule(bstrSelector: string, bstrStyle?: string, lIndex?: number): number;
@@ -6440,8 +7495,8 @@ declare var CanvasPattern: {
new(): CanvasPattern;
}
-interface CanvasRenderingContext2D {
- canvas: HTMLCanvasElement;
+interface CanvasRenderingContext2D extends Object, CanvasPathMethods {
+ readonly canvas: HTMLCanvasElement;
fillStyle: string | CanvasGradient | CanvasPattern;
font: string;
globalAlpha: number;
@@ -6460,13 +7515,12 @@ interface CanvasRenderingContext2D {
strokeStyle: string | CanvasGradient | CanvasPattern;
textAlign: string;
textBaseline: string;
- arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;
- arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;
+ mozImageSmoothingEnabled: boolean;
+ webkitImageSmoothingEnabled: boolean;
+ oImageSmoothingEnabled: boolean;
beginPath(): void;
- bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;
clearRect(x: number, y: number, w: number, h: number): void;
clip(fillRule?: string): void;
- closePath(): void;
createImageData(imageDataOrSw: number | ImageData, sh?: number): ImageData;
createLinearGradient(x0: number, y0: number, x1: number, y1: number): CanvasGradient;
createPattern(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement, repetition: string): CanvasPattern;
@@ -6478,12 +7532,8 @@ interface CanvasRenderingContext2D {
getImageData(sx: number, sy: number, sw: number, sh: number): ImageData;
getLineDash(): number[];
isPointInPath(x: number, y: number, fillRule?: string): boolean;
- lineTo(x: number, y: number): void;
measureText(text: string): TextMetrics;
- moveTo(x: number, y: number): void;
putImageData(imagedata: ImageData, dx: number, dy: number, dirtyX?: number, dirtyY?: number, dirtyWidth?: number, dirtyHeight?: number): void;
- quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
- rect(x: number, y: number, w: number, h: number): void;
restore(): void;
rotate(angle: number): void;
save(): void;
@@ -6520,7 +7570,7 @@ declare var ChannelSplitterNode: {
interface CharacterData extends Node, ChildNode {
data: string;
- length: number;
+ readonly length: number;
appendData(arg: string): void;
deleteData(offset: number, count: number): void;
insertData(offset: number, arg: string): void;
@@ -6536,11 +7586,11 @@ declare var CharacterData: {
interface ClientRect {
bottom: number;
- height: number;
+ readonly height: number;
left: number;
right: number;
top: number;
- width: number;
+ readonly width: number;
}
declare var ClientRect: {
@@ -6549,7 +7599,7 @@ declare var ClientRect: {
}
interface ClientRectList {
- length: number;
+ readonly length: number;
item(index: number): ClientRect;
[index: number]: ClientRect;
}
@@ -6560,7 +7610,7 @@ declare var ClientRectList: {
}
interface ClipboardEvent extends Event {
- clipboardData: DataTransfer;
+ readonly clipboardData: DataTransfer;
}
declare var ClipboardEvent: {
@@ -6569,9 +7619,9 @@ declare var ClipboardEvent: {
}
interface CloseEvent extends Event {
- code: number;
- reason: string;
- wasClean: boolean;
+ readonly code: number;
+ readonly reason: string;
+ readonly wasClean: boolean;
initCloseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, wasCleanArg: boolean, codeArg: number, reasonArg: string): void;
}
@@ -6581,8 +7631,8 @@ declare var CloseEvent: {
}
interface CommandEvent extends Event {
- commandName: string;
- detail: string;
+ readonly commandName: string;
+ readonly detail: string | null;
}
declare var CommandEvent: {
@@ -6600,8 +7650,8 @@ declare var Comment: {
}
interface CompositionEvent extends UIEvent {
- data: string;
- locale: string;
+ readonly data: string;
+ readonly locale: string;
initCompositionEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, dataArg: string, locale: string): void;
}
@@ -6618,6 +7668,7 @@ interface Console {
dir(value?: any, ...optionalParams: any[]): void;
dirxml(value: any): void;
error(message?: any, ...optionalParams: any[]): void;
+ exception(message?: string, ...optionalParams: any[]): void;
group(groupTitle?: string): void;
groupCollapsed(groupTitle?: string): void;
groupEnd(): void;
@@ -6627,9 +7678,10 @@ interface Console {
profile(reportName?: string): void;
profileEnd(): void;
select(element: Element): void;
+ table(...data: any[]): void;
time(timerName?: string): void;
timeEnd(timerName?: string): void;
- trace(): void;
+ trace(message?: any, ...optionalParams: any[]): void;
warn(message?: any, ...optionalParams: any[]): void;
}
@@ -6639,7 +7691,7 @@ declare var Console: {
}
interface ConvolverNode extends AudioNode {
- buffer: AudioBuffer;
+ buffer: AudioBuffer | null;
normalize: boolean;
}
@@ -6649,13 +7701,13 @@ declare var ConvolverNode: {
}
interface Coordinates {
- accuracy: number;
- altitude: number;
- altitudeAccuracy: number;
- heading: number;
- latitude: number;
- longitude: number;
- speed: number;
+ readonly accuracy: number;
+ readonly altitude: number | null;
+ readonly altitudeAccuracy: number | null;
+ readonly heading: number | null;
+ readonly latitude: number;
+ readonly longitude: number;
+ readonly speed: number | null;
}
declare var Coordinates: {
@@ -6664,7 +7716,7 @@ declare var Coordinates: {
}
interface Crypto extends Object, RandomSource {
- subtle: SubtleCrypto;
+ readonly subtle: SubtleCrypto;
}
declare var Crypto: {
@@ -6673,10 +7725,10 @@ declare var Crypto: {
}
interface CryptoKey {
- algorithm: KeyAlgorithm;
- extractable: boolean;
- type: string;
- usages: string[];
+ readonly algorithm: KeyAlgorithm;
+ readonly extractable: boolean;
+ readonly type: string;
+ readonly usages: string[];
}
declare var CryptoKey: {
@@ -6695,7 +7747,7 @@ declare var CryptoKeyPair: {
}
interface CustomEvent extends Event {
- detail: any;
+ readonly detail: any;
initCustomEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, detailArg: any): void;
}
@@ -6705,7 +7757,7 @@ declare var CustomEvent: {
}
interface DOMError {
- name: string;
+ readonly name: string;
toString(): string;
}
@@ -6715,76 +7767,76 @@ declare var DOMError: {
}
interface DOMException {
- code: number;
- message: string;
- name: string;
+ readonly code: number;
+ readonly message: string;
+ readonly name: string;
toString(): string;
- ABORT_ERR: number;
- DATA_CLONE_ERR: number;
- DOMSTRING_SIZE_ERR: number;
- HIERARCHY_REQUEST_ERR: number;
- INDEX_SIZE_ERR: number;
- INUSE_ATTRIBUTE_ERR: number;
- INVALID_ACCESS_ERR: number;
- INVALID_CHARACTER_ERR: number;
- INVALID_MODIFICATION_ERR: number;
- INVALID_NODE_TYPE_ERR: number;
- INVALID_STATE_ERR: number;
- NAMESPACE_ERR: number;
- NETWORK_ERR: number;
- NOT_FOUND_ERR: number;
- NOT_SUPPORTED_ERR: number;
- NO_DATA_ALLOWED_ERR: number;
- NO_MODIFICATION_ALLOWED_ERR: number;
- PARSE_ERR: number;
- QUOTA_EXCEEDED_ERR: number;
- SECURITY_ERR: number;
- SERIALIZE_ERR: number;
- SYNTAX_ERR: number;
- TIMEOUT_ERR: number;
- TYPE_MISMATCH_ERR: number;
- URL_MISMATCH_ERR: number;
- VALIDATION_ERR: number;
- WRONG_DOCUMENT_ERR: number;
+ readonly ABORT_ERR: number;
+ readonly DATA_CLONE_ERR: number;
+ readonly DOMSTRING_SIZE_ERR: number;
+ readonly HIERARCHY_REQUEST_ERR: number;
+ readonly INDEX_SIZE_ERR: number;
+ readonly INUSE_ATTRIBUTE_ERR: number;
+ readonly INVALID_ACCESS_ERR: number;
+ readonly INVALID_CHARACTER_ERR: number;
+ readonly INVALID_MODIFICATION_ERR: number;
+ readonly INVALID_NODE_TYPE_ERR: number;
+ readonly INVALID_STATE_ERR: number;
+ readonly NAMESPACE_ERR: number;
+ readonly NETWORK_ERR: number;
+ readonly NOT_FOUND_ERR: number;
+ readonly NOT_SUPPORTED_ERR: number;
+ readonly NO_DATA_ALLOWED_ERR: number;
+ readonly NO_MODIFICATION_ALLOWED_ERR: number;
+ readonly PARSE_ERR: number;
+ readonly QUOTA_EXCEEDED_ERR: number;
+ readonly SECURITY_ERR: number;
+ readonly SERIALIZE_ERR: number;
+ readonly SYNTAX_ERR: number;
+ readonly TIMEOUT_ERR: number;
+ readonly TYPE_MISMATCH_ERR: number;
+ readonly URL_MISMATCH_ERR: number;
+ readonly VALIDATION_ERR: number;
+ readonly WRONG_DOCUMENT_ERR: number;
}
declare var DOMException: {
prototype: DOMException;
new(): DOMException;
- ABORT_ERR: number;
- DATA_CLONE_ERR: number;
- DOMSTRING_SIZE_ERR: number;
- HIERARCHY_REQUEST_ERR: number;
- INDEX_SIZE_ERR: number;
- INUSE_ATTRIBUTE_ERR: number;
- INVALID_ACCESS_ERR: number;
- INVALID_CHARACTER_ERR: number;
- INVALID_MODIFICATION_ERR: number;
- INVALID_NODE_TYPE_ERR: number;
- INVALID_STATE_ERR: number;
- NAMESPACE_ERR: number;
- NETWORK_ERR: number;
- NOT_FOUND_ERR: number;
- NOT_SUPPORTED_ERR: number;
- NO_DATA_ALLOWED_ERR: number;
- NO_MODIFICATION_ALLOWED_ERR: number;
- PARSE_ERR: number;
- QUOTA_EXCEEDED_ERR: number;
- SECURITY_ERR: number;
- SERIALIZE_ERR: number;
- SYNTAX_ERR: number;
- TIMEOUT_ERR: number;
- TYPE_MISMATCH_ERR: number;
- URL_MISMATCH_ERR: number;
- VALIDATION_ERR: number;
- WRONG_DOCUMENT_ERR: number;
+ readonly ABORT_ERR: number;
+ readonly DATA_CLONE_ERR: number;
+ readonly DOMSTRING_SIZE_ERR: number;
+ readonly HIERARCHY_REQUEST_ERR: number;
+ readonly INDEX_SIZE_ERR: number;
+ readonly INUSE_ATTRIBUTE_ERR: number;
+ readonly INVALID_ACCESS_ERR: number;
+ readonly INVALID_CHARACTER_ERR: number;
+ readonly INVALID_MODIFICATION_ERR: number;
+ readonly INVALID_NODE_TYPE_ERR: number;
+ readonly INVALID_STATE_ERR: number;
+ readonly NAMESPACE_ERR: number;
+ readonly NETWORK_ERR: number;
+ readonly NOT_FOUND_ERR: number;
+ readonly NOT_SUPPORTED_ERR: number;
+ readonly NO_DATA_ALLOWED_ERR: number;
+ readonly NO_MODIFICATION_ALLOWED_ERR: number;
+ readonly PARSE_ERR: number;
+ readonly QUOTA_EXCEEDED_ERR: number;
+ readonly SECURITY_ERR: number;
+ readonly SERIALIZE_ERR: number;
+ readonly SYNTAX_ERR: number;
+ readonly TIMEOUT_ERR: number;
+ readonly TYPE_MISMATCH_ERR: number;
+ readonly URL_MISMATCH_ERR: number;
+ readonly VALIDATION_ERR: number;
+ readonly WRONG_DOCUMENT_ERR: number;
}
interface DOMImplementation {
- createDocument(namespaceURI: string, qualifiedName: string, doctype: DocumentType): Document;
- createDocumentType(qualifiedName: string, publicId: string, systemId: string): DocumentType;
+ createDocument(namespaceURI: string | null, qualifiedName: string | null, doctype: DocumentType): Document;
+ createDocumentType(qualifiedName: string, publicId: string | null, systemId: string | null): DocumentType;
createHTMLDocument(title: string): Document;
- hasFeature(feature: string, version: string): boolean;
+ hasFeature(feature: string | null, version: string | null): boolean;
}
declare var DOMImplementation: {
@@ -6811,9 +7863,9 @@ declare var DOMSettableTokenList: {
}
interface DOMStringList {
- length: number;
+ readonly length: number;
contains(str: string): boolean;
- item(index: number): string;
+ item(index: number): string | null;
[index: number]: string;
}
@@ -6832,7 +7884,7 @@ declare var DOMStringMap: {
}
interface DOMTokenList {
- length: number;
+ readonly length: number;
add(...token: string[]): void;
contains(token: string): boolean;
item(index: number): string;
@@ -6859,9 +7911,9 @@ declare var DataCue: {
interface DataTransfer {
dropEffect: string;
effectAllowed: string;
- files: FileList;
- items: DataTransferItemList;
- types: DOMStringList;
+ readonly files: FileList;
+ readonly items: DataTransferItemList;
+ readonly types: DOMStringList;
clearData(format?: string): boolean;
getData(format: string): string;
setData(format: string, data: string): boolean;
@@ -6873,10 +7925,10 @@ declare var DataTransfer: {
}
interface DataTransferItem {
- kind: string;
- type: string;
- getAsFile(): File;
- getAsString(_callback: FunctionStringCallback): void;
+ readonly kind: string;
+ readonly type: string;
+ getAsFile(): File | null;
+ getAsString(_callback: FunctionStringCallback | null): void;
}
declare var DataTransferItem: {
@@ -6885,12 +7937,12 @@ declare var DataTransferItem: {
}
interface DataTransferItemList {
- length: number;
- add(data: File): DataTransferItem;
+ readonly length: number;
+ add(data: File): DataTransferItem | null;
clear(): void;
- item(index: number): File;
+ item(index: number): DataTransferItem;
remove(index: number): void;
- [index: number]: File;
+ [index: number]: DataTransferItem;
}
declare var DataTransferItemList: {
@@ -6899,9 +7951,9 @@ declare var DataTransferItemList: {
}
interface DeferredPermissionRequest {
- id: number;
- type: string;
- uri: string;
+ readonly id: number;
+ readonly type: string;
+ readonly uri: string;
allow(): void;
deny(): void;
}
@@ -6912,7 +7964,7 @@ declare var DeferredPermissionRequest: {
}
interface DelayNode extends AudioNode {
- delayTime: AudioParam;
+ readonly delayTime: AudioParam;
}
declare var DelayNode: {
@@ -6921,9 +7973,9 @@ declare var DelayNode: {
}
interface DeviceAcceleration {
- x: number;
- y: number;
- z: number;
+ readonly x: number | null;
+ readonly y: number | null;
+ readonly z: number | null;
}
declare var DeviceAcceleration: {
@@ -6931,12 +7983,21 @@ declare var DeviceAcceleration: {
new(): DeviceAcceleration;
}
+interface DeviceLightEvent extends Event {
+ readonly value: number;
+}
+
+declare var DeviceLightEvent: {
+ prototype: DeviceLightEvent;
+ new(type: string, eventInitDict?: DeviceLightEventInit): DeviceLightEvent;
+}
+
interface DeviceMotionEvent extends Event {
- acceleration: DeviceAcceleration;
- accelerationIncludingGravity: DeviceAcceleration;
- interval: number;
- rotationRate: DeviceRotationRate;
- initDeviceMotionEvent(type: string, bubbles: boolean, cancelable: boolean, acceleration: DeviceAccelerationDict, accelerationIncludingGravity: DeviceAccelerationDict, rotationRate: DeviceRotationRateDict, interval: number): void;
+ readonly acceleration: DeviceAcceleration | null;
+ readonly accelerationIncludingGravity: DeviceAcceleration | null;
+ readonly interval: number | null;
+ readonly rotationRate: DeviceRotationRate | null;
+ initDeviceMotionEvent(type: string, bubbles: boolean, cancelable: boolean, acceleration: DeviceAccelerationDict | null, accelerationIncludingGravity: DeviceAccelerationDict | null, rotationRate: DeviceRotationRateDict | null, interval: number | null): void;
}
declare var DeviceMotionEvent: {
@@ -6945,11 +8006,11 @@ declare var DeviceMotionEvent: {
}
interface DeviceOrientationEvent extends Event {
- absolute: boolean;
- alpha: number;
- beta: number;
- gamma: number;
- initDeviceOrientationEvent(type: string, bubbles: boolean, cancelable: boolean, alpha: number, beta: number, gamma: number, absolute: boolean): void;
+ readonly absolute: boolean;
+ readonly alpha: number | null;
+ readonly beta: number | null;
+ readonly gamma: number | null;
+ initDeviceOrientationEvent(type: string, bubbles: boolean, cancelable: boolean, alpha: number | null, beta: number | null, gamma: number | null, absolute: boolean): void;
}
declare var DeviceOrientationEvent: {
@@ -6958,9 +8019,9 @@ declare var DeviceOrientationEvent: {
}
interface DeviceRotationRate {
- alpha: number;
- beta: number;
- gamma: number;
+ readonly alpha: number | null;
+ readonly beta: number | null;
+ readonly gamma: number | null;
}
declare var DeviceRotationRate: {
@@ -6968,19 +8029,19 @@ declare var DeviceRotationRate: {
new(): DeviceRotationRate;
}
-interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEvent {
+interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEvent, ParentNode {
/**
* Sets or gets the URL for the current document.
*/
- URL: string;
+ readonly URL: string;
/**
* Gets the URL for the document, stripped of any character encoding.
*/
- URLUnencoded: string;
+ readonly URLUnencoded: string;
/**
* Gets the object that has the focus when the parent document has focus.
*/
- activeElement: Element;
+ readonly activeElement: Element;
/**
* Sets or gets the color of all active links in the document.
*/
@@ -6988,15 +8049,15 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
/**
* Returns a reference to the collection of elements contained by the object.
*/
- all: HTMLCollection;
+ readonly all: HTMLAllCollection;
/**
* Retrieves a collection of all a objects that have a name and/or id property. Objects in this collection are in HTML source order.
*/
- anchors: HTMLCollection;
+ anchors: HTMLCollectionOf<HTMLAnchorElement>;
/**
* Retrieves a collection of all applet objects in the document.
*/
- applets: HTMLCollection;
+ applets: HTMLCollectionOf<HTMLAppletElement>;
/**
* Deprecated. Sets or retrieves a value that indicates the background color behind the object.
*/
@@ -7005,7 +8066,7 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
* Specifies the beginning and end of the document body.
*/
body: HTMLElement;
- characterSet: string;
+ readonly characterSet: string;
/**
* Gets or sets the character set used to encode the object.
*/
@@ -7013,13 +8074,14 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
/**
* Gets a value that indicates whether standards-compliant mode is switched on for the object.
*/
- compatMode: string;
+ readonly compatMode: string;
cookie: string;
+ readonly currentScript: HTMLScriptElement | SVGScriptElement;
/**
* Gets the default character set from the current regional language settings.
*/
- defaultCharset: string;
- defaultView: Window;
+ readonly defaultCharset: string;
+ readonly defaultView: Window;
/**
* Sets or gets a value that indicates whether the document can be edited.
*/
@@ -7031,7 +8093,7 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
/**
* Gets an object representing the document type declaration associated with the current document.
*/
- doctype: DocumentType;
+ readonly doctype: DocumentType;
/**
* Gets a reference to the root node of the document.
*/
@@ -7043,7 +8105,7 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
/**
* Retrieves a collection of all embed objects in the document.
*/
- embeds: HTMLCollection;
+ embeds: HTMLCollectionOf<HTMLEmbedElement>;
/**
* Sets or gets the foreground (text) color of the document.
*/
@@ -7051,27 +8113,27 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
/**
* Retrieves a collection, in source order, of all form objects in the document.
*/
- forms: HTMLCollection;
- fullscreenElement: Element;
- fullscreenEnabled: boolean;
- head: HTMLHeadElement;
- hidden: boolean;
+ forms: HTMLCollectionOf<HTMLFormElement>;
+ readonly fullscreenElement: Element | null;
+ readonly fullscreenEnabled: boolean;
+ readonly head: HTMLHeadElement;
+ readonly hidden: boolean;
/**
* Retrieves a collection, in source order, of img objects in the document.
*/
- images: HTMLCollection;
+ images: HTMLCollectionOf<HTMLImageElement>;
/**
* Gets the implementation object of the current document.
*/
- implementation: DOMImplementation;
+ readonly implementation: DOMImplementation;
/**
* Returns the character encoding used to create the webpage that is loaded into the document object.
*/
- inputEncoding: string;
+ readonly inputEncoding: string | null;
/**
* Gets the date that the page was last modified, if the page supplies one.
*/
- lastModified: string;
+ readonly lastModified: string;
/**
* Sets or gets the color of the document links.
*/
@@ -7079,302 +8141,305 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
/**
* Retrieves a collection of all a objects that specify the href property and all area objects in the document.
*/
- links: HTMLCollection;
+ links: HTMLCollectionOf<HTMLAnchorElement | HTMLAreaElement>;
/**
* Contains information about the current URL.
*/
- location: Location;
- media: string;
+ readonly location: Location;
msCSSOMElementFloatMetrics: boolean;
msCapsLockWarningOff: boolean;
- msHidden: boolean;
- msVisibilityState: string;
/**
* Fires when the user aborts the download.
* @param ev The event.
*/
- onabort: (ev: Event) => any;
+ onabort: (this: this, ev: UIEvent) => any;
/**
* Fires when the object is set as the active element.
* @param ev The event.
*/
- onactivate: (ev: UIEvent) => any;
+ onactivate: (this: this, ev: UIEvent) => any;
/**
* Fires immediately before the object is set as the active element.
* @param ev The event.
*/
- onbeforeactivate: (ev: UIEvent) => any;
+ onbeforeactivate: (this: this, ev: UIEvent) => any;
/**
* Fires immediately before the activeElement is changed from the current object to another object in the parent document.
* @param ev The event.
*/
- onbeforedeactivate: (ev: UIEvent) => any;
+ onbeforedeactivate: (this: this, ev: UIEvent) => any;
/**
* Fires when the object loses the input focus.
* @param ev The focus event.
*/
- onblur: (ev: FocusEvent) => any;
+ onblur: (this: this, ev: FocusEvent) => any;
/**
* Occurs when playback is possible, but would require further buffering.
* @param ev The event.
*/
- oncanplay: (ev: Event) => any;
- oncanplaythrough: (ev: Event) => any;
+ oncanplay: (this: this, ev: Event) => any;
+ oncanplaythrough: (this: this, ev: Event) => any;
/**
* Fires when the contents of the object or selection have changed.
* @param ev The event.
*/
- onchange: (ev: Event) => any;
+ onchange: (this: this, ev: Event) => any;
/**
* Fires when the user clicks the left mouse button on the object
* @param ev The mouse event.
*/
- onclick: (ev: MouseEvent) => any;
+ onclick: (this: this, ev: MouseEvent) => any;
/**
* Fires when the user clicks the right mouse button in the client area, opening the context menu.
* @param ev The mouse event.
*/
- oncontextmenu: (ev: PointerEvent) => any;
+ oncontextmenu: (this: this, ev: PointerEvent) => any;
/**
* Fires when the user double-clicks the object.
* @param ev The mouse event.
*/
- ondblclick: (ev: MouseEvent) => any;
+ ondblclick: (this: this, ev: MouseEvent) => any;
/**
* Fires when the activeElement is changed from the current object to another object in the parent document.
* @param ev The UI Event
*/
- ondeactivate: (ev: UIEvent) => any;
+ ondeactivate: (this: this, ev: UIEvent) => any;
/**
* Fires on the source object continuously during a drag operation.
* @param ev The event.
*/
- ondrag: (ev: DragEvent) => any;
+ ondrag: (this: this, ev: DragEvent) => any;
/**
* Fires on the source object when the user releases the mouse at the close of a drag operation.
* @param ev The event.
*/
- ondragend: (ev: DragEvent) => any;
+ ondragend: (this: this, ev: DragEvent) => any;
/**
* Fires on the target element when the user drags the object to a valid drop target.
* @param ev The drag event.
*/
- ondragenter: (ev: DragEvent) => any;
+ ondragenter: (this: this, ev: DragEvent) => any;
/**
* Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.
* @param ev The drag event.
*/
- ondragleave: (ev: DragEvent) => any;
+ ondragleave: (this: this, ev: DragEvent) => any;
/**
* Fires on the target element continuously while the user drags the object over a valid drop target.
* @param ev The event.
*/
- ondragover: (ev: DragEvent) => any;
+ ondragover: (this: this, ev: DragEvent) => any;
/**
* Fires on the source object when the user starts to drag a text selection or selected object.
* @param ev The event.
*/
- ondragstart: (ev: DragEvent) => any;
- ondrop: (ev: DragEvent) => any;
+ ondragstart: (this: this, ev: DragEvent) => any;
+ ondrop: (this: this, ev: DragEvent) => any;
/**
* Occurs when the duration attribute is updated.
* @param ev The event.
*/
- ondurationchange: (ev: Event) => any;
+ ondurationchange: (this: this, ev: Event) => any;
/**
* Occurs when the media element is reset to its initial state.
* @param ev The event.
*/
- onemptied: (ev: Event) => any;
+ onemptied: (this: this, ev: Event) => any;
/**
* Occurs when the end of playback is reached.
* @param ev The event
*/
- onended: (ev: Event) => any;
+ onended: (this: this, ev: MediaStreamErrorEvent) => any;
/**
* Fires when an error occurs during object loading.
* @param ev The event.
*/
- onerror: (ev: Event) => any;
+ onerror: (this: this, ev: ErrorEvent) => any;
/**
* Fires when the object receives focus.
* @param ev The event.
*/
- onfocus: (ev: FocusEvent) => any;
- onfullscreenchange: (ev: Event) => any;
- onfullscreenerror: (ev: Event) => any;
- oninput: (ev: Event) => any;
+ onfocus: (this: this, ev: FocusEvent) => any;
+ onfullscreenchange: (this: this, ev: Event) => any;
+ onfullscreenerror: (this: this, ev: Event) => any;
+ oninput: (this: this, ev: Event) => any;
+ oninvalid: (this: this, ev: Event) => any;
/**
* Fires when the user presses a key.
* @param ev The keyboard event
*/
- onkeydown: (ev: KeyboardEvent) => any;
+ onkeydown: (this: this, ev: KeyboardEvent) => any;
/**
* Fires when the user presses an alphanumeric key.
* @param ev The event.
*/
- onkeypress: (ev: KeyboardEvent) => any;
+ onkeypress: (this: this, ev: KeyboardEvent) => any;
/**
* Fires when the user releases a key.
* @param ev The keyboard event
*/
- onkeyup: (ev: KeyboardEvent) => any;
+ onkeyup: (this: this, ev: KeyboardEvent) => any;
/**
* Fires immediately after the browser loads the object.
* @param ev The event.
*/
- onload: (ev: Event) => any;
+ onload: (this: this, ev: Event) => any;
/**
* Occurs when media data is loaded at the current playback position.
* @param ev The event.
*/
- onloadeddata: (ev: Event) => any;
+ onloadeddata: (this: this, ev: Event) => any;
/**
* Occurs when the duration and dimensions of the media have been determined.
* @param ev The event.
*/
- onloadedmetadata: (ev: Event) => any;
+ onloadedmetadata: (this: this, ev: Event) => any;
/**
* Occurs when Internet Explorer begins looking for media data.
* @param ev The event.
*/
- onloadstart: (ev: Event) => any;
+ onloadstart: (this: this, ev: Event) => any;
/**
* Fires when the user clicks the object with either mouse button.
* @param ev The mouse event.
*/
- onmousedown: (ev: MouseEvent) => any;
+ onmousedown: (this: this, ev: MouseEvent) => any;
/**
* Fires when the user moves the mouse over the object.
* @param ev The mouse event.
*/
- onmousemove: (ev: MouseEvent) => any;
+ onmousemove: (this: this, ev: MouseEvent) => any;
/**
* Fires when the user moves the mouse pointer outside the boundaries of the object.
* @param ev The mouse event.
*/
- onmouseout: (ev: MouseEvent) => any;
+ onmouseout: (this: this, ev: MouseEvent) => any;
/**
* Fires when the user moves the mouse pointer into the object.
* @param ev The mouse event.
*/
- onmouseover: (ev: MouseEvent) => any;
+ onmouseover: (this: this, ev: MouseEvent) => any;
/**
* Fires when the user releases a mouse button while the mouse is over the object.
* @param ev The mouse event.
*/
- onmouseup: (ev: MouseEvent) => any;
+ onmouseup: (this: this, ev: MouseEvent) => any;
/**
* Fires when the wheel button is rotated.
* @param ev The mouse event
*/
- onmousewheel: (ev: MouseWheelEvent) => any;
- onmscontentzoom: (ev: UIEvent) => any;
- onmsgesturechange: (ev: MSGestureEvent) => any;
- onmsgesturedoubletap: (ev: MSGestureEvent) => any;
- onmsgestureend: (ev: MSGestureEvent) => any;
- onmsgesturehold: (ev: MSGestureEvent) => any;
- onmsgesturestart: (ev: MSGestureEvent) => any;
- onmsgesturetap: (ev: MSGestureEvent) => any;
- onmsinertiastart: (ev: MSGestureEvent) => any;
- onmsmanipulationstatechanged: (ev: MSManipulationEvent) => any;
- onmspointercancel: (ev: MSPointerEvent) => any;
- onmspointerdown: (ev: MSPointerEvent) => any;
- onmspointerenter: (ev: MSPointerEvent) => any;
- onmspointerleave: (ev: MSPointerEvent) => any;
- onmspointermove: (ev: MSPointerEvent) => any;
- onmspointerout: (ev: MSPointerEvent) => any;
- onmspointerover: (ev: MSPointerEvent) => any;
- onmspointerup: (ev: MSPointerEvent) => any;
+ onmousewheel: (this: this, ev: WheelEvent) => any;
+ onmscontentzoom: (this: this, ev: UIEvent) => any;
+ onmsgesturechange: (this: this, ev: MSGestureEvent) => any;
+ onmsgesturedoubletap: (this: this, ev: MSGestureEvent) => any;
+ onmsgestureend: (this: this, ev: MSGestureEvent) => any;
+ onmsgesturehold: (this: this, ev: MSGestureEvent) => any;
+ onmsgesturestart: (this: this, ev: MSGestureEvent) => any;
+ onmsgesturetap: (this: this, ev: MSGestureEvent) => any;
+ onmsinertiastart: (this: this, ev: MSGestureEvent) => any;
+ onmsmanipulationstatechanged: (this: this, ev: MSManipulationEvent) => any;
+ onmspointercancel: (this: this, ev: MSPointerEvent) => any;
+ onmspointerdown: (this: this, ev: MSPointerEvent) => any;
+ onmspointerenter: (this: this, ev: MSPointerEvent) => any;
+ onmspointerleave: (this: this, ev: MSPointerEvent) => any;
+ onmspointermove: (this: this, ev: MSPointerEvent) => any;
+ onmspointerout: (this: this, ev: MSPointerEvent) => any;
+ onmspointerover: (this: this, ev: MSPointerEvent) => any;
+ onmspointerup: (this: this, ev: MSPointerEvent) => any;
/**
* Occurs when an item is removed from a Jump List of a webpage running in Site Mode.
* @param ev The event.
*/
- onmssitemodejumplistitemremoved: (ev: MSSiteModeEvent) => any;
+ onmssitemodejumplistitemremoved: (this: this, ev: MSSiteModeEvent) => any;
/**
* Occurs when a user clicks a button in a Thumbnail Toolbar of a webpage running in Site Mode.
* @param ev The event.
*/
- onmsthumbnailclick: (ev: MSSiteModeEvent) => any;
+ onmsthumbnailclick: (this: this, ev: MSSiteModeEvent) => any;
/**
* Occurs when playback is paused.
* @param ev The event.
*/
- onpause: (ev: Event) => any;
+ onpause: (this: this, ev: Event) => any;
/**
* Occurs when the play method is requested.
* @param ev The event.
*/
- onplay: (ev: Event) => any;
+ onplay: (this: this, ev: Event) => any;
/**
* Occurs when the audio or video has started playing.
* @param ev The event.
*/
- onplaying: (ev: Event) => any;
- onpointerlockchange: (ev: Event) => any;
- onpointerlockerror: (ev: Event) => any;
+ onplaying: (this: this, ev: Event) => any;
+ onpointerlockchange: (this: this, ev: Event) => any;
+ onpointerlockerror: (this: this, ev: Event) => any;
/**
* Occurs to indicate progress while downloading media data.
* @param ev The event.
*/
- onprogress: (ev: ProgressEvent) => any;
+ onprogress: (this: this, ev: ProgressEvent) => any;
/**
* Occurs when the playback rate is increased or decreased.
* @param ev The event.
*/
- onratechange: (ev: Event) => any;
+ onratechange: (this: this, ev: Event) => any;
/**
* Fires when the state of the object has changed.
* @param ev The event
*/
- onreadystatechange: (ev: ProgressEvent) => any;
+ onreadystatechange: (this: this, ev: ProgressEvent) => any;
/**
* Fires when the user resets a form.
* @param ev The event.
*/
- onreset: (ev: Event) => any;
+ onreset: (this: this, ev: Event) => any;
/**
* Fires when the user repositions the scroll box in the scroll bar on the object.
* @param ev The event.
*/
- onscroll: (ev: UIEvent) => any;
+ onscroll: (this: this, ev: UIEvent) => any;
/**
* Occurs when the seek operation ends.
* @param ev The event.
*/
- onseeked: (ev: Event) => any;
+ onseeked: (this: this, ev: Event) => any;
/**
* Occurs when the current playback position is moved.
* @param ev The event.
*/
- onseeking: (ev: Event) => any;
+ onseeking: (this: this, ev: Event) => any;
/**
* Fires when the current selection changes.
* @param ev The event.
*/
- onselect: (ev: UIEvent) => any;
- onselectstart: (ev: Event) => any;
+ onselect: (this: this, ev: UIEvent) => any;
+ /**
+ * Fires when the selection state of a document changes.
+ * @param ev The event.
+ */
+ onselectionchange: (this: this, ev: Event) => any;
+ onselectstart: (this: this, ev: Event) => any;
/**
* Occurs when the download has stopped.
* @param ev The event.
*/
- onstalled: (ev: Event) => any;
+ onstalled: (this: this, ev: Event) => any;
/**
* Fires when the user clicks the Stop button or leaves the Web page.
* @param ev The event.
*/
- onstop: (ev: Event) => any;
- onsubmit: (ev: Event) => any;
+ onstop: (this: this, ev: Event) => any;
+ onsubmit: (this: this, ev: Event) => any;
/**
* Occurs if the load operation has been intentionally halted.
* @param ev The event.
*/
- onsuspend: (ev: Event) => any;
+ onsuspend: (this: this, ev: Event) => any;
/**
* Occurs to indicate the current playback position.
* @param ev The event.
*/
- ontimeupdate: (ev: Event) => any;
+ ontimeupdate: (this: this, ev: Event) => any;
ontouchcancel: (ev: TouchEvent) => any;
ontouchend: (ev: TouchEvent) => any;
ontouchmove: (ev: TouchEvent) => any;
@@ -7383,59 +8448,59 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
* Occurs when the volume is changed, or playback is muted or unmuted.
* @param ev The event.
*/
- onvolumechange: (ev: Event) => any;
+ onvolumechange: (this: this, ev: Event) => any;
/**
* Occurs when playback stops because the next frame of a video resource is not available.
* @param ev The event.
*/
- onwaiting: (ev: Event) => any;
- onwebkitfullscreenchange: (ev: Event) => any;
- onwebkitfullscreenerror: (ev: Event) => any;
- plugins: HTMLCollection;
- pointerLockElement: Element;
+ onwaiting: (this: this, ev: Event) => any;
+ onwebkitfullscreenchange: (this: this, ev: Event) => any;
+ onwebkitfullscreenerror: (this: this, ev: Event) => any;
+ plugins: HTMLCollectionOf<HTMLEmbedElement>;
+ readonly pointerLockElement: Element;
/**
* Retrieves a value that indicates the current state of the object.
*/
- readyState: string;
+ readonly readyState: string;
/**
* Gets the URL of the location that referred the user to the current page.
*/
- referrer: string;
+ readonly referrer: string;
/**
* Gets the root svg element in the document hierarchy.
*/
- rootElement: SVGSVGElement;
+ readonly rootElement: SVGSVGElement;
/**
* Retrieves a collection of all script objects in the document.
*/
- scripts: HTMLCollection;
- security: string;
+ scripts: HTMLCollectionOf<HTMLScriptElement>;
+ readonly scrollingElement: Element | null;
/**
* Retrieves a collection of styleSheet objects representing the style sheets that correspond to each instance of a link or style object in the document.
*/
- styleSheets: StyleSheetList;
+ readonly styleSheets: StyleSheetList;
/**
* Contains the title of the document.
*/
title: string;
- visibilityState: string;
+ readonly visibilityState: string;
/**
* Sets or gets the color of the links that the user has visited.
*/
vlinkColor: string;
- webkitCurrentFullScreenElement: Element;
- webkitFullscreenElement: Element;
- webkitFullscreenEnabled: boolean;
- webkitIsFullScreen: boolean;
- xmlEncoding: string;
+ readonly webkitCurrentFullScreenElement: Element | null;
+ readonly webkitFullscreenElement: Element | null;
+ readonly webkitFullscreenEnabled: boolean;
+ readonly webkitIsFullScreen: boolean;
+ readonly xmlEncoding: string | null;
xmlStandalone: boolean;
/**
* Gets or sets the version attribute specified in the declaration of an XML document.
*/
- xmlVersion: string;
- currentScript: HTMLScriptElement;
+ xmlVersion: string | null;
adoptNode(source: Node): Node;
captureEvents(): void;
+ caretRangeFromPoint(x: number, y: number): Range;
clear(): void;
/**
* Closes an output stream and forces the sent data to display.
@@ -7446,7 +8511,7 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
* @param name String that sets the attribute object's name.
*/
createAttribute(name: string): Attr;
- createAttributeNS(namespaceURI: string, qualifiedName: string): Attr;
+ createAttributeNS(namespaceURI: string | null, qualifiedName: string): Attr;
createCDATASection(data: string): CDATASection;
/**
* Creates a comment object with the specified data.
@@ -7462,37 +8527,24 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
* @param tagName The name of an element.
*/
createElement(tagName: "a"): HTMLAnchorElement;
- createElement(tagName: "abbr"): HTMLPhraseElement;
- createElement(tagName: "acronym"): HTMLPhraseElement;
- createElement(tagName: "address"): HTMLBlockElement;
createElement(tagName: "applet"): HTMLAppletElement;
createElement(tagName: "area"): HTMLAreaElement;
createElement(tagName: "audio"): HTMLAudioElement;
- createElement(tagName: "b"): HTMLPhraseElement;
createElement(tagName: "base"): HTMLBaseElement;
createElement(tagName: "basefont"): HTMLBaseFontElement;
- createElement(tagName: "bdo"): HTMLPhraseElement;
- createElement(tagName: "big"): HTMLPhraseElement;
- createElement(tagName: "blockquote"): HTMLBlockElement;
+ createElement(tagName: "blockquote"): HTMLQuoteElement;
createElement(tagName: "body"): HTMLBodyElement;
createElement(tagName: "br"): HTMLBRElement;
createElement(tagName: "button"): HTMLButtonElement;
createElement(tagName: "canvas"): HTMLCanvasElement;
createElement(tagName: "caption"): HTMLTableCaptionElement;
- createElement(tagName: "center"): HTMLBlockElement;
- createElement(tagName: "cite"): HTMLPhraseElement;
- createElement(tagName: "code"): HTMLPhraseElement;
createElement(tagName: "col"): HTMLTableColElement;
createElement(tagName: "colgroup"): HTMLTableColElement;
createElement(tagName: "datalist"): HTMLDataListElement;
- createElement(tagName: "dd"): HTMLDDElement;
createElement(tagName: "del"): HTMLModElement;
- createElement(tagName: "dfn"): HTMLPhraseElement;
createElement(tagName: "dir"): HTMLDirectoryElement;
createElement(tagName: "div"): HTMLDivElement;
createElement(tagName: "dl"): HTMLDListElement;
- createElement(tagName: "dt"): HTMLDTElement;
- createElement(tagName: "em"): HTMLPhraseElement;
createElement(tagName: "embed"): HTMLEmbedElement;
createElement(tagName: "fieldset"): HTMLFieldSetElement;
createElement(tagName: "font"): HTMLFontElement;
@@ -7508,52 +8560,41 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
createElement(tagName: "head"): HTMLHeadElement;
createElement(tagName: "hr"): HTMLHRElement;
createElement(tagName: "html"): HTMLHtmlElement;
- createElement(tagName: "i"): HTMLPhraseElement;
createElement(tagName: "iframe"): HTMLIFrameElement;
createElement(tagName: "img"): HTMLImageElement;
createElement(tagName: "input"): HTMLInputElement;
createElement(tagName: "ins"): HTMLModElement;
- createElement(tagName: "isindex"): HTMLIsIndexElement;
- createElement(tagName: "kbd"): HTMLPhraseElement;
- createElement(tagName: "keygen"): HTMLBlockElement;
+ createElement(tagName: "isindex"): HTMLUnknownElement;
createElement(tagName: "label"): HTMLLabelElement;
createElement(tagName: "legend"): HTMLLegendElement;
createElement(tagName: "li"): HTMLLIElement;
createElement(tagName: "link"): HTMLLinkElement;
- createElement(tagName: "listing"): HTMLBlockElement;
+ createElement(tagName: "listing"): HTMLPreElement;
createElement(tagName: "map"): HTMLMapElement;
createElement(tagName: "marquee"): HTMLMarqueeElement;
createElement(tagName: "menu"): HTMLMenuElement;
createElement(tagName: "meta"): HTMLMetaElement;
- createElement(tagName: "nextid"): HTMLNextIdElement;
- createElement(tagName: "nobr"): HTMLPhraseElement;
+ createElement(tagName: "meter"): HTMLMeterElement;
+ createElement(tagName: "nextid"): HTMLUnknownElement;
createElement(tagName: "object"): HTMLObjectElement;
createElement(tagName: "ol"): HTMLOListElement;
createElement(tagName: "optgroup"): HTMLOptGroupElement;
createElement(tagName: "option"): HTMLOptionElement;
createElement(tagName: "p"): HTMLParagraphElement;
createElement(tagName: "param"): HTMLParamElement;
- createElement(tagName: "plaintext"): HTMLBlockElement;
+ createElement(tagName: "picture"): HTMLPictureElement;
createElement(tagName: "pre"): HTMLPreElement;
createElement(tagName: "progress"): HTMLProgressElement;
createElement(tagName: "q"): HTMLQuoteElement;
- createElement(tagName: "rt"): HTMLPhraseElement;
- createElement(tagName: "ruby"): HTMLPhraseElement;
- createElement(tagName: "s"): HTMLPhraseElement;
- createElement(tagName: "samp"): HTMLPhraseElement;
createElement(tagName: "script"): HTMLScriptElement;
createElement(tagName: "select"): HTMLSelectElement;
- createElement(tagName: "small"): HTMLPhraseElement;
createElement(tagName: "source"): HTMLSourceElement;
createElement(tagName: "span"): HTMLSpanElement;
- createElement(tagName: "strike"): HTMLPhraseElement;
- createElement(tagName: "strong"): HTMLPhraseElement;
createElement(tagName: "style"): HTMLStyleElement;
- createElement(tagName: "sub"): HTMLPhraseElement;
- createElement(tagName: "sup"): HTMLPhraseElement;
createElement(tagName: "table"): HTMLTableElement;
createElement(tagName: "tbody"): HTMLTableSectionElement;
createElement(tagName: "td"): HTMLTableDataCellElement;
+ createElement(tagName: "template"): HTMLTemplateElement;
createElement(tagName: "textarea"): HTMLTextAreaElement;
createElement(tagName: "tfoot"): HTMLTableSectionElement;
createElement(tagName: "th"): HTMLTableHeaderCellElement;
@@ -7561,14 +8602,12 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
createElement(tagName: "title"): HTMLTitleElement;
createElement(tagName: "tr"): HTMLTableRowElement;
createElement(tagName: "track"): HTMLTrackElement;
- createElement(tagName: "tt"): HTMLPhraseElement;
- createElement(tagName: "u"): HTMLPhraseElement;
createElement(tagName: "ul"): HTMLUListElement;
- createElement(tagName: "var"): HTMLPhraseElement;
createElement(tagName: "video"): HTMLVideoElement;
createElement(tagName: "x-ms-webview"): MSHTMLWebViewElement;
- createElement(tagName: "xmp"): HTMLBlockElement;
+ createElement(tagName: "xmp"): HTMLPreElement;
createElement(tagName: string): HTMLElement;
+ createElementNS(namespaceURI: "http://www.w3.org/1999/xhtml", qualifiedName: string): HTMLElement
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "a"): SVGAElement
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "circle"): SVGCircleElement
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "clipPath"): SVGClipPathElement
@@ -7631,7 +8670,7 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "use"): SVGUseElement
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "view"): SVGViewElement
createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: string): SVGElement
- createElementNS(namespaceURI: string, qualifiedName: string): Element;
+ createElementNS(namespaceURI: string | null, qualifiedName: string): Element;
createExpression(expression: string, resolver: XPathNSResolver): XPathExpression;
createNSResolver(nodeResolver: Node): XPathNSResolver;
/**
@@ -7652,7 +8691,7 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
* @param data String that specifies the nodeValue property of the text node.
*/
createTextNode(data: string): Text;
- createTouch(view: any, target: EventTarget, identifier: number, pageX: number, pageY: number, screenX: number, screenY: number): Touch;
+ createTouch(view: Window, target: EventTarget, identifier: number, pageX: number, pageY: number, screenX: number, screenY: number): Touch;
createTouchList(...touches: Touch[]): TouchList;
/**
* Creates a TreeWalker object that you can use to traverse filtered lists of nodes or elements in a document.
@@ -7691,56 +8730,56 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
* Returns a reference to the first object with the specified value of the ID or NAME attribute.
* @param elementId String that specifies the ID value. Case-insensitive.
*/
- getElementById(elementId: string): HTMLElement;
- getElementsByClassName(classNames: string): NodeListOf<Element>;
+ getElementById(elementId: string): HTMLElement | null;
+ getElementsByClassName(classNames: string): HTMLCollectionOf<Element>;
/**
* Gets a collection of objects based on the value of the NAME or ID attribute.
* @param elementName Gets a collection of objects based on the value of the NAME or ID attribute.
*/
- getElementsByName(elementName: string): NodeListOf<Element>;
+ getElementsByName(elementName: string): NodeListOf<HTMLElement>;
/**
* Retrieves a collection of objects based on the specified element name.
* @param name Specifies the name of an element.
*/
getElementsByTagName(tagname: "a"): NodeListOf<HTMLAnchorElement>;
- getElementsByTagName(tagname: "abbr"): NodeListOf<HTMLPhraseElement>;
- getElementsByTagName(tagname: "acronym"): NodeListOf<HTMLPhraseElement>;
- getElementsByTagName(tagname: "address"): NodeListOf<HTMLBlockElement>;
+ getElementsByTagName(tagname: "abbr"): NodeListOf<HTMLElement>;
+ getElementsByTagName(tagname: "acronym"): NodeListOf<HTMLElement>;
+ getElementsByTagName(tagname: "address"): NodeListOf<HTMLElement>;
getElementsByTagName(tagname: "applet"): NodeListOf<HTMLAppletElement>;
getElementsByTagName(tagname: "area"): NodeListOf<HTMLAreaElement>;
getElementsByTagName(tagname: "article"): NodeListOf<HTMLElement>;
getElementsByTagName(tagname: "aside"): NodeListOf<HTMLElement>;
getElementsByTagName(tagname: "audio"): NodeListOf<HTMLAudioElement>;
- getElementsByTagName(tagname: "b"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "b"): NodeListOf<HTMLElement>;
getElementsByTagName(tagname: "base"): NodeListOf<HTMLBaseElement>;
getElementsByTagName(tagname: "basefont"): NodeListOf<HTMLBaseFontElement>;
- getElementsByTagName(tagname: "bdo"): NodeListOf<HTMLPhraseElement>;
- getElementsByTagName(tagname: "big"): NodeListOf<HTMLPhraseElement>;
- getElementsByTagName(tagname: "blockquote"): NodeListOf<HTMLBlockElement>;
+ getElementsByTagName(tagname: "bdo"): NodeListOf<HTMLElement>;
+ getElementsByTagName(tagname: "big"): NodeListOf<HTMLElement>;
+ getElementsByTagName(tagname: "blockquote"): NodeListOf<HTMLQuoteElement>;
getElementsByTagName(tagname: "body"): NodeListOf<HTMLBodyElement>;
getElementsByTagName(tagname: "br"): NodeListOf<HTMLBRElement>;
getElementsByTagName(tagname: "button"): NodeListOf<HTMLButtonElement>;
getElementsByTagName(tagname: "canvas"): NodeListOf<HTMLCanvasElement>;
getElementsByTagName(tagname: "caption"): NodeListOf<HTMLTableCaptionElement>;
- getElementsByTagName(tagname: "center"): NodeListOf<HTMLBlockElement>;
+ getElementsByTagName(tagname: "center"): NodeListOf<HTMLElement>;
getElementsByTagName(tagname: "circle"): NodeListOf<SVGCircleElement>;
- getElementsByTagName(tagname: "cite"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "cite"): NodeListOf<HTMLElement>;
getElementsByTagName(tagname: "clippath"): NodeListOf<SVGClipPathElement>;
- getElementsByTagName(tagname: "code"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "code"): NodeListOf<HTMLElement>;
getElementsByTagName(tagname: "col"): NodeListOf<HTMLTableColElement>;
getElementsByTagName(tagname: "colgroup"): NodeListOf<HTMLTableColElement>;
getElementsByTagName(tagname: "datalist"): NodeListOf<HTMLDataListElement>;
- getElementsByTagName(tagname: "dd"): NodeListOf<HTMLDDElement>;
+ getElementsByTagName(tagname: "dd"): NodeListOf<HTMLElement>;
getElementsByTagName(tagname: "defs"): NodeListOf<SVGDefsElement>;
getElementsByTagName(tagname: "del"): NodeListOf<HTMLModElement>;
getElementsByTagName(tagname: "desc"): NodeListOf<SVGDescElement>;
- getElementsByTagName(tagname: "dfn"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "dfn"): NodeListOf<HTMLElement>;
getElementsByTagName(tagname: "dir"): NodeListOf<HTMLDirectoryElement>;
getElementsByTagName(tagname: "div"): NodeListOf<HTMLDivElement>;
getElementsByTagName(tagname: "dl"): NodeListOf<HTMLDListElement>;
- getElementsByTagName(tagname: "dt"): NodeListOf<HTMLDTElement>;
+ getElementsByTagName(tagname: "dt"): NodeListOf<HTMLElement>;
getElementsByTagName(tagname: "ellipse"): NodeListOf<SVGEllipseElement>;
- getElementsByTagName(tagname: "em"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "em"): NodeListOf<HTMLElement>;
getElementsByTagName(tagname: "embed"): NodeListOf<HTMLEmbedElement>;
getElementsByTagName(tagname: "feblend"): NodeListOf<SVGFEBlendElement>;
getElementsByTagName(tagname: "fecolormatrix"): NodeListOf<SVGFEColorMatrixElement>;
@@ -7788,22 +8827,22 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
getElementsByTagName(tagname: "hgroup"): NodeListOf<HTMLElement>;
getElementsByTagName(tagname: "hr"): NodeListOf<HTMLHRElement>;
getElementsByTagName(tagname: "html"): NodeListOf<HTMLHtmlElement>;
- getElementsByTagName(tagname: "i"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "i"): NodeListOf<HTMLElement>;
getElementsByTagName(tagname: "iframe"): NodeListOf<HTMLIFrameElement>;
getElementsByTagName(tagname: "image"): NodeListOf<SVGImageElement>;
getElementsByTagName(tagname: "img"): NodeListOf<HTMLImageElement>;
getElementsByTagName(tagname: "input"): NodeListOf<HTMLInputElement>;
getElementsByTagName(tagname: "ins"): NodeListOf<HTMLModElement>;
- getElementsByTagName(tagname: "isindex"): NodeListOf<HTMLIsIndexElement>;
- getElementsByTagName(tagname: "kbd"): NodeListOf<HTMLPhraseElement>;
- getElementsByTagName(tagname: "keygen"): NodeListOf<HTMLBlockElement>;
+ getElementsByTagName(tagname: "isindex"): NodeListOf<HTMLUnknownElement>;
+ getElementsByTagName(tagname: "kbd"): NodeListOf<HTMLElement>;
+ getElementsByTagName(tagname: "keygen"): NodeListOf<HTMLElement>;
getElementsByTagName(tagname: "label"): NodeListOf<HTMLLabelElement>;
getElementsByTagName(tagname: "legend"): NodeListOf<HTMLLegendElement>;
getElementsByTagName(tagname: "li"): NodeListOf<HTMLLIElement>;
getElementsByTagName(tagname: "line"): NodeListOf<SVGLineElement>;
getElementsByTagName(tagname: "lineargradient"): NodeListOf<SVGLinearGradientElement>;
getElementsByTagName(tagname: "link"): NodeListOf<HTMLLinkElement>;
- getElementsByTagName(tagname: "listing"): NodeListOf<HTMLBlockElement>;
+ getElementsByTagName(tagname: "listing"): NodeListOf<HTMLPreElement>;
getElementsByTagName(tagname: "map"): NodeListOf<HTMLMapElement>;
getElementsByTagName(tagname: "mark"): NodeListOf<HTMLElement>;
getElementsByTagName(tagname: "marker"): NodeListOf<SVGMarkerElement>;
@@ -7812,9 +8851,10 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
getElementsByTagName(tagname: "menu"): NodeListOf<HTMLMenuElement>;
getElementsByTagName(tagname: "meta"): NodeListOf<HTMLMetaElement>;
getElementsByTagName(tagname: "metadata"): NodeListOf<SVGMetadataElement>;
+ getElementsByTagName(tagname: "meter"): NodeListOf<HTMLMeterElement>;
getElementsByTagName(tagname: "nav"): NodeListOf<HTMLElement>;
- getElementsByTagName(tagname: "nextid"): NodeListOf<HTMLNextIdElement>;
- getElementsByTagName(tagname: "nobr"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "nextid"): NodeListOf<HTMLUnknownElement>;
+ getElementsByTagName(tagname: "nobr"): NodeListOf<HTMLElement>;
getElementsByTagName(tagname: "noframes"): NodeListOf<HTMLElement>;
getElementsByTagName(tagname: "noscript"): NodeListOf<HTMLElement>;
getElementsByTagName(tagname: "object"): NodeListOf<HTMLObjectElement>;
@@ -7825,7 +8865,8 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
getElementsByTagName(tagname: "param"): NodeListOf<HTMLParamElement>;
getElementsByTagName(tagname: "path"): NodeListOf<SVGPathElement>;
getElementsByTagName(tagname: "pattern"): NodeListOf<SVGPatternElement>;
- getElementsByTagName(tagname: "plaintext"): NodeListOf<HTMLBlockElement>;
+ getElementsByTagName(tagname: "picture"): NodeListOf<HTMLPictureElement>;
+ getElementsByTagName(tagname: "plaintext"): NodeListOf<HTMLElement>;
getElementsByTagName(tagname: "polygon"): NodeListOf<SVGPolygonElement>;
getElementsByTagName(tagname: "polyline"): NodeListOf<SVGPolylineElement>;
getElementsByTagName(tagname: "pre"): NodeListOf<HTMLPreElement>;
@@ -7833,28 +8874,29 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
getElementsByTagName(tagname: "q"): NodeListOf<HTMLQuoteElement>;
getElementsByTagName(tagname: "radialgradient"): NodeListOf<SVGRadialGradientElement>;
getElementsByTagName(tagname: "rect"): NodeListOf<SVGRectElement>;
- getElementsByTagName(tagname: "rt"): NodeListOf<HTMLPhraseElement>;
- getElementsByTagName(tagname: "ruby"): NodeListOf<HTMLPhraseElement>;
- getElementsByTagName(tagname: "s"): NodeListOf<HTMLPhraseElement>;
- getElementsByTagName(tagname: "samp"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "rt"): NodeListOf<HTMLElement>;
+ getElementsByTagName(tagname: "ruby"): NodeListOf<HTMLElement>;
+ getElementsByTagName(tagname: "s"): NodeListOf<HTMLElement>;
+ getElementsByTagName(tagname: "samp"): NodeListOf<HTMLElement>;
getElementsByTagName(tagname: "script"): NodeListOf<HTMLScriptElement>;
getElementsByTagName(tagname: "section"): NodeListOf<HTMLElement>;
getElementsByTagName(tagname: "select"): NodeListOf<HTMLSelectElement>;
- getElementsByTagName(tagname: "small"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "small"): NodeListOf<HTMLElement>;
getElementsByTagName(tagname: "source"): NodeListOf<HTMLSourceElement>;
getElementsByTagName(tagname: "span"): NodeListOf<HTMLSpanElement>;
getElementsByTagName(tagname: "stop"): NodeListOf<SVGStopElement>;
- getElementsByTagName(tagname: "strike"): NodeListOf<HTMLPhraseElement>;
- getElementsByTagName(tagname: "strong"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "strike"): NodeListOf<HTMLElement>;
+ getElementsByTagName(tagname: "strong"): NodeListOf<HTMLElement>;
getElementsByTagName(tagname: "style"): NodeListOf<HTMLStyleElement>;
- getElementsByTagName(tagname: "sub"): NodeListOf<HTMLPhraseElement>;
- getElementsByTagName(tagname: "sup"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "sub"): NodeListOf<HTMLElement>;
+ getElementsByTagName(tagname: "sup"): NodeListOf<HTMLElement>;
getElementsByTagName(tagname: "svg"): NodeListOf<SVGSVGElement>;
getElementsByTagName(tagname: "switch"): NodeListOf<SVGSwitchElement>;
getElementsByTagName(tagname: "symbol"): NodeListOf<SVGSymbolElement>;
getElementsByTagName(tagname: "table"): NodeListOf<HTMLTableElement>;
getElementsByTagName(tagname: "tbody"): NodeListOf<HTMLTableSectionElement>;
getElementsByTagName(tagname: "td"): NodeListOf<HTMLTableDataCellElement>;
+ getElementsByTagName(tagname: "template"): NodeListOf<HTMLTemplateElement>;
getElementsByTagName(tagname: "text"): NodeListOf<SVGTextElement>;
getElementsByTagName(tagname: "textpath"): NodeListOf<SVGTextPathElement>;
getElementsByTagName(tagname: "textarea"): NodeListOf<HTMLTextAreaElement>;
@@ -7865,18 +8907,20 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
getElementsByTagName(tagname: "tr"): NodeListOf<HTMLTableRowElement>;
getElementsByTagName(tagname: "track"): NodeListOf<HTMLTrackElement>;
getElementsByTagName(tagname: "tspan"): NodeListOf<SVGTSpanElement>;
- getElementsByTagName(tagname: "tt"): NodeListOf<HTMLPhraseElement>;
- getElementsByTagName(tagname: "u"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "tt"): NodeListOf<HTMLElement>;
+ getElementsByTagName(tagname: "u"): NodeListOf<HTMLElement>;
getElementsByTagName(tagname: "ul"): NodeListOf<HTMLUListElement>;
getElementsByTagName(tagname: "use"): NodeListOf<SVGUseElement>;
- getElementsByTagName(tagname: "var"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(tagname: "var"): NodeListOf<HTMLElement>;
getElementsByTagName(tagname: "video"): NodeListOf<HTMLVideoElement>;
getElementsByTagName(tagname: "view"): NodeListOf<SVGViewElement>;
getElementsByTagName(tagname: "wbr"): NodeListOf<HTMLElement>;
getElementsByTagName(tagname: "x-ms-webview"): NodeListOf<MSHTMLWebViewElement>;
- getElementsByTagName(tagname: "xmp"): NodeListOf<HTMLBlockElement>;
+ getElementsByTagName(tagname: "xmp"): NodeListOf<HTMLPreElement>;
getElementsByTagName(tagname: string): NodeListOf<Element>;
- getElementsByTagNameNS(namespaceURI: string, localName: string): NodeListOf<Element>;
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
+ getElementsByTagNameNS(namespaceURI: string, localName: string): HTMLCollectionOf<Element>;
/**
* Returns an object representing the current selection of the document that is loaded into the object displaying a webpage.
*/
@@ -7886,8 +8930,8 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
*/
hasFocus(): boolean;
importNode(importedNode: Node, deep: boolean): Node;
- msElementsFromPoint(x: number, y: number): NodeList;
- msElementsFromRect(left: number, top: number, width: number, height: number): NodeList;
+ msElementsFromPoint(x: number, y: number): NodeListOf<Element>;
+ msElementsFromRect(left: number, top: number, width: number, height: number): NodeListOf<Element>;
/**
* Opens a new window and loads a document specified by a given URL. Also, opens a new window that uses the url parameter and the name parameter to collect the output of the write method and the writeln method.
* @param url Specifies a MIME type for the document.
@@ -7943,101 +8987,103 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven
* @param content The text and HTML tags to write.
*/
writeln(...content: string[]): void;
- addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "fullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "fullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mssitemodejumplistitemremoved", listener: (ev: MSSiteModeEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "msthumbnailclick", listener: (ev: MSSiteModeEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerlockchange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerlockerror", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "readystatechange", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "stop", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSContentZoom", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureChange", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureDoubleTap", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureEnd", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureHold", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureStart", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureTap", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSInertiaStart", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSManipulationStateChanged", listener: (this: this, ev: MSManipulationEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerCancel", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerDown", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerEnter", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerLeave", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerMove", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOut", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOver", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerUp", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "abort", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "activate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforeactivate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforedeactivate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "blur", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplay", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplaythrough", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "change", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "click", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "contextmenu", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dblclick", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "deactivate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drag", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragend", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragenter", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragleave", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragover", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragstart", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drop", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "durationchange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "emptied", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "ended", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "focus", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "fullscreenchange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "fullscreenerror", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "input", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "invalid", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "keydown", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keypress", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keyup", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadeddata", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadedmetadata", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadstart", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousedown", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousemove", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseout", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseover", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseup", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousewheel", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mssitemodejumplistitemremoved", listener: (this: this, ev: MSSiteModeEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "msthumbnailclick", listener: (this: this, ev: MSSiteModeEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pause", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "play", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "playing", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointercancel", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerdown", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerenter", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerleave", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerlockchange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerlockerror", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointermove", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerout", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerover", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerup", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "progress", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ratechange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "readystatechange", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "reset", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "scroll", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeked", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeking", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "select", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "selectionchange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "selectstart", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "stalled", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "stop", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "submit", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "suspend", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "timeupdate", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchcancel", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchend", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchmove", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchstart", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "volumechange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "waiting", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenchange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenerror", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "wheel", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -8046,7 +9092,7 @@ declare var Document: {
new(): Document;
}
-interface DocumentFragment extends Node, NodeSelector {
+interface DocumentFragment extends Node, NodeSelector, ParentNode {
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -8056,12 +9102,12 @@ declare var DocumentFragment: {
}
interface DocumentType extends Node, ChildNode {
- entities: NamedNodeMap;
- internalSubset: string;
- name: string;
- notations: NamedNodeMap;
- publicId: string;
- systemId: string;
+ readonly entities: NamedNodeMap;
+ readonly internalSubset: string | null;
+ readonly name: string;
+ readonly notations: NamedNodeMap;
+ readonly publicId: string | null;
+ readonly systemId: string | null;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -8071,7 +9117,7 @@ declare var DocumentType: {
}
interface DragEvent extends MouseEvent {
- dataTransfer: DataTransfer;
+ readonly dataTransfer: DataTransfer;
initDragEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, dataTransferArg: DataTransfer): void;
msConvertURL(file: File, targetType: string, targetURL?: string): void;
}
@@ -8082,12 +9128,12 @@ declare var DragEvent: {
}
interface DynamicsCompressorNode extends AudioNode {
- attack: AudioParam;
- knee: AudioParam;
- ratio: AudioParam;
- reduction: AudioParam;
- release: AudioParam;
- threshold: AudioParam;
+ readonly attack: AudioParam;
+ readonly knee: AudioParam;
+ readonly ratio: AudioParam;
+ readonly reduction: AudioParam;
+ readonly release: AudioParam;
+ readonly threshold: AudioParam;
}
declare var DynamicsCompressorNode: {
@@ -8095,106 +9141,115 @@ declare var DynamicsCompressorNode: {
new(): DynamicsCompressorNode;
}
+interface EXT_frag_depth {
+}
+
+declare var EXT_frag_depth: {
+ prototype: EXT_frag_depth;
+ new(): EXT_frag_depth;
+}
+
interface EXT_texture_filter_anisotropic {
- MAX_TEXTURE_MAX_ANISOTROPY_EXT: number;
- TEXTURE_MAX_ANISOTROPY_EXT: number;
+ readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: number;
+ readonly TEXTURE_MAX_ANISOTROPY_EXT: number;
}
declare var EXT_texture_filter_anisotropic: {
prototype: EXT_texture_filter_anisotropic;
new(): EXT_texture_filter_anisotropic;
- MAX_TEXTURE_MAX_ANISOTROPY_EXT: number;
- TEXTURE_MAX_ANISOTROPY_EXT: number;
+ readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: number;
+ readonly TEXTURE_MAX_ANISOTROPY_EXT: number;
}
-interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelector, ChildNode {
- classList: DOMTokenList;
- clientHeight: number;
- clientLeft: number;
- clientTop: number;
- clientWidth: number;
+interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelector, ChildNode, ParentNode {
+ readonly classList: DOMTokenList;
+ className: string;
+ readonly clientHeight: number;
+ readonly clientLeft: number;
+ readonly clientTop: number;
+ readonly clientWidth: number;
+ id: string;
msContentZoomFactor: number;
- msRegionOverflow: string;
- onariarequest: (ev: AriaRequestEvent) => any;
- oncommand: (ev: CommandEvent) => any;
- ongotpointercapture: (ev: PointerEvent) => any;
- onlostpointercapture: (ev: PointerEvent) => any;
- onmsgesturechange: (ev: MSGestureEvent) => any;
- onmsgesturedoubletap: (ev: MSGestureEvent) => any;
- onmsgestureend: (ev: MSGestureEvent) => any;
- onmsgesturehold: (ev: MSGestureEvent) => any;
- onmsgesturestart: (ev: MSGestureEvent) => any;
- onmsgesturetap: (ev: MSGestureEvent) => any;
- onmsgotpointercapture: (ev: MSPointerEvent) => any;
- onmsinertiastart: (ev: MSGestureEvent) => any;
- onmslostpointercapture: (ev: MSPointerEvent) => any;
- onmspointercancel: (ev: MSPointerEvent) => any;
- onmspointerdown: (ev: MSPointerEvent) => any;
- onmspointerenter: (ev: MSPointerEvent) => any;
- onmspointerleave: (ev: MSPointerEvent) => any;
- onmspointermove: (ev: MSPointerEvent) => any;
- onmspointerout: (ev: MSPointerEvent) => any;
- onmspointerover: (ev: MSPointerEvent) => any;
- onmspointerup: (ev: MSPointerEvent) => any;
+ readonly msRegionOverflow: string;
+ onariarequest: (this: this, ev: AriaRequestEvent) => any;
+ oncommand: (this: this, ev: CommandEvent) => any;
+ ongotpointercapture: (this: this, ev: PointerEvent) => any;
+ onlostpointercapture: (this: this, ev: PointerEvent) => any;
+ onmsgesturechange: (this: this, ev: MSGestureEvent) => any;
+ onmsgesturedoubletap: (this: this, ev: MSGestureEvent) => any;
+ onmsgestureend: (this: this, ev: MSGestureEvent) => any;
+ onmsgesturehold: (this: this, ev: MSGestureEvent) => any;
+ onmsgesturestart: (this: this, ev: MSGestureEvent) => any;
+ onmsgesturetap: (this: this, ev: MSGestureEvent) => any;
+ onmsgotpointercapture: (this: this, ev: MSPointerEvent) => any;
+ onmsinertiastart: (this: this, ev: MSGestureEvent) => any;
+ onmslostpointercapture: (this: this, ev: MSPointerEvent) => any;
+ onmspointercancel: (this: this, ev: MSPointerEvent) => any;
+ onmspointerdown: (this: this, ev: MSPointerEvent) => any;
+ onmspointerenter: (this: this, ev: MSPointerEvent) => any;
+ onmspointerleave: (this: this, ev: MSPointerEvent) => any;
+ onmspointermove: (this: this, ev: MSPointerEvent) => any;
+ onmspointerout: (this: this, ev: MSPointerEvent) => any;
+ onmspointerover: (this: this, ev: MSPointerEvent) => any;
+ onmspointerup: (this: this, ev: MSPointerEvent) => any;
ontouchcancel: (ev: TouchEvent) => any;
ontouchend: (ev: TouchEvent) => any;
ontouchmove: (ev: TouchEvent) => any;
ontouchstart: (ev: TouchEvent) => any;
- onwebkitfullscreenchange: (ev: Event) => any;
- onwebkitfullscreenerror: (ev: Event) => any;
- scrollHeight: number;
+ onwebkitfullscreenchange: (this: this, ev: Event) => any;
+ onwebkitfullscreenerror: (this: this, ev: Event) => any;
+ readonly prefix: string | null;
+ readonly scrollHeight: number;
scrollLeft: number;
scrollTop: number;
- scrollWidth: number;
- tagName: string;
- id: string;
- className: string;
+ readonly scrollWidth: number;
+ readonly tagName: string;
innerHTML: string;
- getAttribute(name?: string): string;
+ getAttribute(name: string): string | null;
getAttributeNS(namespaceURI: string, localName: string): string;
getAttributeNode(name: string): Attr;
getAttributeNodeNS(namespaceURI: string, localName: string): Attr;
getBoundingClientRect(): ClientRect;
getClientRects(): ClientRectList;
getElementsByTagName(name: "a"): NodeListOf<HTMLAnchorElement>;
- getElementsByTagName(name: "abbr"): NodeListOf<HTMLPhraseElement>;
- getElementsByTagName(name: "acronym"): NodeListOf<HTMLPhraseElement>;
- getElementsByTagName(name: "address"): NodeListOf<HTMLBlockElement>;
+ getElementsByTagName(name: "abbr"): NodeListOf<HTMLElement>;
+ getElementsByTagName(name: "acronym"): NodeListOf<HTMLElement>;
+ getElementsByTagName(name: "address"): NodeListOf<HTMLElement>;
getElementsByTagName(name: "applet"): NodeListOf<HTMLAppletElement>;
getElementsByTagName(name: "area"): NodeListOf<HTMLAreaElement>;
getElementsByTagName(name: "article"): NodeListOf<HTMLElement>;
getElementsByTagName(name: "aside"): NodeListOf<HTMLElement>;
getElementsByTagName(name: "audio"): NodeListOf<HTMLAudioElement>;
- getElementsByTagName(name: "b"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "b"): NodeListOf<HTMLElement>;
getElementsByTagName(name: "base"): NodeListOf<HTMLBaseElement>;
getElementsByTagName(name: "basefont"): NodeListOf<HTMLBaseFontElement>;
- getElementsByTagName(name: "bdo"): NodeListOf<HTMLPhraseElement>;
- getElementsByTagName(name: "big"): NodeListOf<HTMLPhraseElement>;
- getElementsByTagName(name: "blockquote"): NodeListOf<HTMLBlockElement>;
+ getElementsByTagName(name: "bdo"): NodeListOf<HTMLElement>;
+ getElementsByTagName(name: "big"): NodeListOf<HTMLElement>;
+ getElementsByTagName(name: "blockquote"): NodeListOf<HTMLQuoteElement>;
getElementsByTagName(name: "body"): NodeListOf<HTMLBodyElement>;
getElementsByTagName(name: "br"): NodeListOf<HTMLBRElement>;
getElementsByTagName(name: "button"): NodeListOf<HTMLButtonElement>;
getElementsByTagName(name: "canvas"): NodeListOf<HTMLCanvasElement>;
getElementsByTagName(name: "caption"): NodeListOf<HTMLTableCaptionElement>;
- getElementsByTagName(name: "center"): NodeListOf<HTMLBlockElement>;
+ getElementsByTagName(name: "center"): NodeListOf<HTMLElement>;
getElementsByTagName(name: "circle"): NodeListOf<SVGCircleElement>;
- getElementsByTagName(name: "cite"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "cite"): NodeListOf<HTMLElement>;
getElementsByTagName(name: "clippath"): NodeListOf<SVGClipPathElement>;
- getElementsByTagName(name: "code"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "code"): NodeListOf<HTMLElement>;
getElementsByTagName(name: "col"): NodeListOf<HTMLTableColElement>;
getElementsByTagName(name: "colgroup"): NodeListOf<HTMLTableColElement>;
getElementsByTagName(name: "datalist"): NodeListOf<HTMLDataListElement>;
- getElementsByTagName(name: "dd"): NodeListOf<HTMLDDElement>;
+ getElementsByTagName(name: "dd"): NodeListOf<HTMLElement>;
getElementsByTagName(name: "defs"): NodeListOf<SVGDefsElement>;
getElementsByTagName(name: "del"): NodeListOf<HTMLModElement>;
getElementsByTagName(name: "desc"): NodeListOf<SVGDescElement>;
- getElementsByTagName(name: "dfn"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "dfn"): NodeListOf<HTMLElement>;
getElementsByTagName(name: "dir"): NodeListOf<HTMLDirectoryElement>;
getElementsByTagName(name: "div"): NodeListOf<HTMLDivElement>;
getElementsByTagName(name: "dl"): NodeListOf<HTMLDListElement>;
- getElementsByTagName(name: "dt"): NodeListOf<HTMLDTElement>;
+ getElementsByTagName(name: "dt"): NodeListOf<HTMLElement>;
getElementsByTagName(name: "ellipse"): NodeListOf<SVGEllipseElement>;
- getElementsByTagName(name: "em"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "em"): NodeListOf<HTMLElement>;
getElementsByTagName(name: "embed"): NodeListOf<HTMLEmbedElement>;
getElementsByTagName(name: "feblend"): NodeListOf<SVGFEBlendElement>;
getElementsByTagName(name: "fecolormatrix"): NodeListOf<SVGFEColorMatrixElement>;
@@ -8242,22 +9297,22 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
getElementsByTagName(name: "hgroup"): NodeListOf<HTMLElement>;
getElementsByTagName(name: "hr"): NodeListOf<HTMLHRElement>;
getElementsByTagName(name: "html"): NodeListOf<HTMLHtmlElement>;
- getElementsByTagName(name: "i"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "i"): NodeListOf<HTMLElement>;
getElementsByTagName(name: "iframe"): NodeListOf<HTMLIFrameElement>;
getElementsByTagName(name: "image"): NodeListOf<SVGImageElement>;
getElementsByTagName(name: "img"): NodeListOf<HTMLImageElement>;
getElementsByTagName(name: "input"): NodeListOf<HTMLInputElement>;
getElementsByTagName(name: "ins"): NodeListOf<HTMLModElement>;
- getElementsByTagName(name: "isindex"): NodeListOf<HTMLIsIndexElement>;
- getElementsByTagName(name: "kbd"): NodeListOf<HTMLPhraseElement>;
- getElementsByTagName(name: "keygen"): NodeListOf<HTMLBlockElement>;
+ getElementsByTagName(name: "isindex"): NodeListOf<HTMLUnknownElement>;
+ getElementsByTagName(name: "kbd"): NodeListOf<HTMLElement>;
+ getElementsByTagName(name: "keygen"): NodeListOf<HTMLElement>;
getElementsByTagName(name: "label"): NodeListOf<HTMLLabelElement>;
getElementsByTagName(name: "legend"): NodeListOf<HTMLLegendElement>;
getElementsByTagName(name: "li"): NodeListOf<HTMLLIElement>;
getElementsByTagName(name: "line"): NodeListOf<SVGLineElement>;
getElementsByTagName(name: "lineargradient"): NodeListOf<SVGLinearGradientElement>;
getElementsByTagName(name: "link"): NodeListOf<HTMLLinkElement>;
- getElementsByTagName(name: "listing"): NodeListOf<HTMLBlockElement>;
+ getElementsByTagName(name: "listing"): NodeListOf<HTMLPreElement>;
getElementsByTagName(name: "map"): NodeListOf<HTMLMapElement>;
getElementsByTagName(name: "mark"): NodeListOf<HTMLElement>;
getElementsByTagName(name: "marker"): NodeListOf<SVGMarkerElement>;
@@ -8266,9 +9321,10 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
getElementsByTagName(name: "menu"): NodeListOf<HTMLMenuElement>;
getElementsByTagName(name: "meta"): NodeListOf<HTMLMetaElement>;
getElementsByTagName(name: "metadata"): NodeListOf<SVGMetadataElement>;
+ getElementsByTagName(name: "meter"): NodeListOf<HTMLMeterElement>;
getElementsByTagName(name: "nav"): NodeListOf<HTMLElement>;
- getElementsByTagName(name: "nextid"): NodeListOf<HTMLNextIdElement>;
- getElementsByTagName(name: "nobr"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "nextid"): NodeListOf<HTMLUnknownElement>;
+ getElementsByTagName(name: "nobr"): NodeListOf<HTMLElement>;
getElementsByTagName(name: "noframes"): NodeListOf<HTMLElement>;
getElementsByTagName(name: "noscript"): NodeListOf<HTMLElement>;
getElementsByTagName(name: "object"): NodeListOf<HTMLObjectElement>;
@@ -8279,7 +9335,8 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
getElementsByTagName(name: "param"): NodeListOf<HTMLParamElement>;
getElementsByTagName(name: "path"): NodeListOf<SVGPathElement>;
getElementsByTagName(name: "pattern"): NodeListOf<SVGPatternElement>;
- getElementsByTagName(name: "plaintext"): NodeListOf<HTMLBlockElement>;
+ getElementsByTagName(name: "picture"): NodeListOf<HTMLPictureElement>;
+ getElementsByTagName(name: "plaintext"): NodeListOf<HTMLElement>;
getElementsByTagName(name: "polygon"): NodeListOf<SVGPolygonElement>;
getElementsByTagName(name: "polyline"): NodeListOf<SVGPolylineElement>;
getElementsByTagName(name: "pre"): NodeListOf<HTMLPreElement>;
@@ -8287,28 +9344,29 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
getElementsByTagName(name: "q"): NodeListOf<HTMLQuoteElement>;
getElementsByTagName(name: "radialgradient"): NodeListOf<SVGRadialGradientElement>;
getElementsByTagName(name: "rect"): NodeListOf<SVGRectElement>;
- getElementsByTagName(name: "rt"): NodeListOf<HTMLPhraseElement>;
- getElementsByTagName(name: "ruby"): NodeListOf<HTMLPhraseElement>;
- getElementsByTagName(name: "s"): NodeListOf<HTMLPhraseElement>;
- getElementsByTagName(name: "samp"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "rt"): NodeListOf<HTMLElement>;
+ getElementsByTagName(name: "ruby"): NodeListOf<HTMLElement>;
+ getElementsByTagName(name: "s"): NodeListOf<HTMLElement>;
+ getElementsByTagName(name: "samp"): NodeListOf<HTMLElement>;
getElementsByTagName(name: "script"): NodeListOf<HTMLScriptElement>;
getElementsByTagName(name: "section"): NodeListOf<HTMLElement>;
getElementsByTagName(name: "select"): NodeListOf<HTMLSelectElement>;
- getElementsByTagName(name: "small"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "small"): NodeListOf<HTMLElement>;
getElementsByTagName(name: "source"): NodeListOf<HTMLSourceElement>;
getElementsByTagName(name: "span"): NodeListOf<HTMLSpanElement>;
getElementsByTagName(name: "stop"): NodeListOf<SVGStopElement>;
- getElementsByTagName(name: "strike"): NodeListOf<HTMLPhraseElement>;
- getElementsByTagName(name: "strong"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "strike"): NodeListOf<HTMLElement>;
+ getElementsByTagName(name: "strong"): NodeListOf<HTMLElement>;
getElementsByTagName(name: "style"): NodeListOf<HTMLStyleElement>;
- getElementsByTagName(name: "sub"): NodeListOf<HTMLPhraseElement>;
- getElementsByTagName(name: "sup"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "sub"): NodeListOf<HTMLElement>;
+ getElementsByTagName(name: "sup"): NodeListOf<HTMLElement>;
getElementsByTagName(name: "svg"): NodeListOf<SVGSVGElement>;
getElementsByTagName(name: "switch"): NodeListOf<SVGSwitchElement>;
getElementsByTagName(name: "symbol"): NodeListOf<SVGSymbolElement>;
getElementsByTagName(name: "table"): NodeListOf<HTMLTableElement>;
getElementsByTagName(name: "tbody"): NodeListOf<HTMLTableSectionElement>;
getElementsByTagName(name: "td"): NodeListOf<HTMLTableDataCellElement>;
+ getElementsByTagName(name: "template"): NodeListOf<HTMLTemplateElement>;
getElementsByTagName(name: "text"): NodeListOf<SVGTextElement>;
getElementsByTagName(name: "textpath"): NodeListOf<SVGTextPathElement>;
getElementsByTagName(name: "textarea"): NodeListOf<HTMLTextAreaElement>;
@@ -8319,18 +9377,20 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
getElementsByTagName(name: "tr"): NodeListOf<HTMLTableRowElement>;
getElementsByTagName(name: "track"): NodeListOf<HTMLTrackElement>;
getElementsByTagName(name: "tspan"): NodeListOf<SVGTSpanElement>;
- getElementsByTagName(name: "tt"): NodeListOf<HTMLPhraseElement>;
- getElementsByTagName(name: "u"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "tt"): NodeListOf<HTMLElement>;
+ getElementsByTagName(name: "u"): NodeListOf<HTMLElement>;
getElementsByTagName(name: "ul"): NodeListOf<HTMLUListElement>;
getElementsByTagName(name: "use"): NodeListOf<SVGUseElement>;
- getElementsByTagName(name: "var"): NodeListOf<HTMLPhraseElement>;
+ getElementsByTagName(name: "var"): NodeListOf<HTMLElement>;
getElementsByTagName(name: "video"): NodeListOf<HTMLVideoElement>;
getElementsByTagName(name: "view"): NodeListOf<SVGViewElement>;
getElementsByTagName(name: "wbr"): NodeListOf<HTMLElement>;
getElementsByTagName(name: "x-ms-webview"): NodeListOf<MSHTMLWebViewElement>;
- getElementsByTagName(name: "xmp"): NodeListOf<HTMLBlockElement>;
+ getElementsByTagName(name: "xmp"): NodeListOf<HTMLPreElement>;
getElementsByTagName(name: string): NodeListOf<Element>;
- getElementsByTagNameNS(namespaceURI: string, localName: string): NodeListOf<Element>;
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf<HTMLElement>;
+ getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf<SVGElement>;
+ getElementsByTagNameNS(namespaceURI: string, localName: string): HTMLCollectionOf<Element>;
hasAttribute(name: string): boolean;
hasAttributeNS(namespaceURI: string, localName: string): boolean;
msGetRegionContent(): MSRangeCollection;
@@ -8355,42 +9415,53 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec
webkitRequestFullscreen(): void;
getElementsByClassName(classNames: string): NodeListOf<Element>;
matches(selector: string): boolean;
- addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
+ closest(selector: string): Element | null;
+ scrollIntoView(arg?: boolean | ScrollIntoViewOptions): void;
+ scroll(options?: ScrollToOptions): void;
+ scroll(x: number, y: number): void;
+ scrollTo(options?: ScrollToOptions): void;
+ scrollTo(x: number, y: number): void;
+ scrollBy(options?: ScrollToOptions): void;
+ scrollBy(x: number, y: number): void;
+ insertAdjacentElement(position: string, insertedElement: Element): Element | null;
+ insertAdjacentHTML(where: string, html: string): void;
+ insertAdjacentText(where: string, text: string): void;
+ addEventListener(type: "MSGestureChange", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureDoubleTap", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureEnd", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureHold", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureStart", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureTap", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGotPointerCapture", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSInertiaStart", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSLostPointerCapture", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerCancel", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerDown", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerEnter", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerLeave", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerMove", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOut", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOver", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerUp", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ariarequest", listener: (this: this, ev: AriaRequestEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "command", listener: (this: this, ev: CommandEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "gotpointercapture", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "lostpointercapture", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointercancel", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerdown", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerenter", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerleave", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointermove", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerout", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerover", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerup", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchcancel", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchend", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchmove", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchstart", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenchange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenerror", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "wheel", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -8400,11 +9471,11 @@ declare var Element: {
}
interface ErrorEvent extends Event {
- colno: number;
- error: any;
- filename: string;
- lineno: number;
- message: string;
+ readonly colno: number;
+ readonly error: any;
+ readonly filename: string;
+ readonly lineno: number;
+ readonly message: string;
initErrorEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, messageArg: string, filenameArg: string, linenoArg: number): void;
}
@@ -8414,39 +9485,39 @@ declare var ErrorEvent: {
}
interface Event {
- bubbles: boolean;
+ readonly bubbles: boolean;
cancelBubble: boolean;
- cancelable: boolean;
- currentTarget: EventTarget;
- defaultPrevented: boolean;
- eventPhase: number;
- isTrusted: boolean;
+ readonly cancelable: boolean;
+ readonly currentTarget: EventTarget;
+ readonly defaultPrevented: boolean;
+ readonly eventPhase: number;
+ readonly isTrusted: boolean;
returnValue: boolean;
- srcElement: Element;
- target: EventTarget;
- timeStamp: number;
- type: string;
+ readonly srcElement: Element | null;
+ readonly target: EventTarget;
+ readonly timeStamp: number;
+ readonly type: string;
initEvent(eventTypeArg: string, canBubbleArg: boolean, cancelableArg: boolean): void;
preventDefault(): void;
stopImmediatePropagation(): void;
stopPropagation(): void;
- AT_TARGET: number;
- BUBBLING_PHASE: number;
- CAPTURING_PHASE: number;
+ readonly AT_TARGET: number;
+ readonly BUBBLING_PHASE: number;
+ readonly CAPTURING_PHASE: number;
}
declare var Event: {
prototype: Event;
new(type: string, eventInitDict?: EventInit): Event;
- AT_TARGET: number;
- BUBBLING_PHASE: number;
- CAPTURING_PHASE: number;
+ readonly AT_TARGET: number;
+ readonly BUBBLING_PHASE: number;
+ readonly CAPTURING_PHASE: number;
}
interface EventTarget {
- addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+ addEventListener(type: string, listener?: EventListenerOrEventListenerObject, useCapture?: boolean): void;
dispatchEvent(evt: Event): boolean;
- removeEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+ removeEventListener(type: string, listener?: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
declare var EventTarget: {
@@ -8463,8 +9534,9 @@ declare var External: {
}
interface File extends Blob {
- lastModifiedDate: any;
- name: string;
+ readonly lastModifiedDate: any;
+ readonly name: string;
+ readonly webkitRelativePath: string;
}
declare var File: {
@@ -8473,7 +9545,7 @@ declare var File: {
}
interface FileList {
- length: number;
+ readonly length: number;
item(index: number): File;
[index: number]: File;
}
@@ -8484,7 +9556,7 @@ declare var FileList: {
}
interface FileReader extends EventTarget, MSBaseReader {
- error: DOMError;
+ readonly error: DOMError;
readAsArrayBuffer(blob: Blob): void;
readAsBinaryString(blob: Blob): void;
readAsDataURL(blob: Blob): void;
@@ -8498,7 +9570,7 @@ declare var FileReader: {
}
interface FocusEvent extends UIEvent {
- relatedTarget: EventTarget;
+ readonly relatedTarget: EventTarget;
initFocusEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, relatedTargetArg: EventTarget): void;
}
@@ -8517,7 +9589,7 @@ declare var FormData: {
}
interface GainNode extends AudioNode {
- gain: AudioParam;
+ readonly gain: AudioParam;
}
declare var GainNode: {
@@ -8526,13 +9598,13 @@ declare var GainNode: {
}
interface Gamepad {
- axes: number[];
- buttons: GamepadButton[];
- connected: boolean;
- id: string;
- index: number;
- mapping: string;
- timestamp: number;
+ readonly axes: number[];
+ readonly buttons: GamepadButton[];
+ readonly connected: boolean;
+ readonly id: string;
+ readonly index: number;
+ readonly mapping: string;
+ readonly timestamp: number;
}
declare var Gamepad: {
@@ -8541,8 +9613,8 @@ declare var Gamepad: {
}
interface GamepadButton {
- pressed: boolean;
- value: number;
+ readonly pressed: boolean;
+ readonly value: number;
}
declare var GamepadButton: {
@@ -8551,7 +9623,7 @@ declare var GamepadButton: {
}
interface GamepadEvent extends Event {
- gamepad: Gamepad;
+ readonly gamepad: Gamepad;
}
declare var GamepadEvent: {
@@ -8589,6 +9661,7 @@ interface HTMLAnchorElement extends HTMLElement {
* Sets or retrieves the coordinates of the object.
*/
coords: string;
+ download: string;
/**
* Contains the anchor portion of the URL including the hash sign (#).
*/
@@ -8609,12 +9682,12 @@ interface HTMLAnchorElement extends HTMLElement {
* Sets or retrieves the language code of the object.
*/
hreflang: string;
- mimeType: string;
+ readonly mimeType: string;
/**
* Sets or retrieves the shape of the object.
*/
name: string;
- nameProp: string;
+ readonly nameProp: string;
/**
* Contains the pathname of the URL.
*/
@@ -8627,7 +9700,7 @@ interface HTMLAnchorElement extends HTMLElement {
* Contains the protocol of the URL.
*/
protocol: string;
- protocolLong: string;
+ readonly protocolLong: string;
/**
* Sets or retrieves the relationship between the object and the destination of the link.
*/
@@ -8669,7 +9742,7 @@ interface HTMLAppletElement extends HTMLElement {
/**
* Retrieves a string of the URL where the object tag can be found. This is often the href of the document that the object is in, or the value set by a base element.
*/
- BaseHref: string;
+ readonly BaseHref: string;
align: string;
/**
* Sets or retrieves a text alternative to the graphic.
@@ -8696,7 +9769,7 @@ interface HTMLAppletElement extends HTMLElement {
/**
* Address of a pointer to the document this page or frame contains. If there is no document, then null will be returned.
*/
- contentDocument: Document;
+ readonly contentDocument: Document;
/**
* Sets or retrieves the URL that references the data of the object.
*/
@@ -8705,7 +9778,7 @@ interface HTMLAppletElement extends HTMLElement {
* Sets or retrieves a character string that can be used to implement your own declare functionality for the object.
*/
declare: boolean;
- form: HTMLFormElement;
+ readonly form: HTMLFormElement;
/**
* Sets or retrieves the height of the object.
*/
@@ -8715,7 +9788,7 @@ interface HTMLAppletElement extends HTMLElement {
* Sets or retrieves the shape of the object.
*/
name: string;
- object: string;
+ object: string | null;
/**
* Sets or retrieves a message to be displayed while an object is loading.
*/
@@ -8746,6 +9819,7 @@ interface HTMLAreaElement extends HTMLElement {
* Sets or retrieves the coordinates of the object.
*/
coords: string;
+ download: string;
/**
* Sets or retrieves the subsection of the href property that follows the number sign (#).
*/
@@ -8871,23 +9945,6 @@ declare var HTMLBaseFontElement: {
new(): HTMLBaseFontElement;
}
-interface HTMLBlockElement extends HTMLElement {
- /**
- * Sets or retrieves reference information about the object.
- */
- cite: string;
- clear: string;
- /**
- * Sets or retrieves the width of the object.
- */
- width: number;
-}
-
-declare var HTMLBlockElement: {
- prototype: HTMLBlockElement;
- new(): HTMLBlockElement;
-}
-
interface HTMLBodyElement extends HTMLElement {
aLink: any;
background: string;
@@ -8895,147 +9952,147 @@ interface HTMLBodyElement extends HTMLElement {
bgProperties: string;
link: any;
noWrap: boolean;
- onafterprint: (ev: Event) => any;
- onbeforeprint: (ev: Event) => any;
- onbeforeunload: (ev: BeforeUnloadEvent) => any;
- onblur: (ev: FocusEvent) => any;
- onerror: (ev: Event) => any;
- onfocus: (ev: FocusEvent) => any;
- onhashchange: (ev: HashChangeEvent) => any;
- onload: (ev: Event) => any;
- onmessage: (ev: MessageEvent) => any;
- onoffline: (ev: Event) => any;
- ononline: (ev: Event) => any;
- onorientationchange: (ev: Event) => any;
- onpagehide: (ev: PageTransitionEvent) => any;
- onpageshow: (ev: PageTransitionEvent) => any;
- onpopstate: (ev: PopStateEvent) => any;
- onresize: (ev: UIEvent) => any;
- onstorage: (ev: StorageEvent) => any;
- onunload: (ev: Event) => any;
+ onafterprint: (this: this, ev: Event) => any;
+ onbeforeprint: (this: this, ev: Event) => any;
+ onbeforeunload: (this: this, ev: BeforeUnloadEvent) => any;
+ onblur: (this: this, ev: FocusEvent) => any;
+ onerror: (this: this, ev: ErrorEvent) => any;
+ onfocus: (this: this, ev: FocusEvent) => any;
+ onhashchange: (this: this, ev: HashChangeEvent) => any;
+ onload: (this: this, ev: Event) => any;
+ onmessage: (this: this, ev: MessageEvent) => any;
+ onoffline: (this: this, ev: Event) => any;
+ ononline: (this: this, ev: Event) => any;
+ onorientationchange: (this: this, ev: Event) => any;
+ onpagehide: (this: this, ev: PageTransitionEvent) => any;
+ onpageshow: (this: this, ev: PageTransitionEvent) => any;
+ onpopstate: (this: this, ev: PopStateEvent) => any;
+ onresize: (this: this, ev: UIEvent) => any;
+ onstorage: (this: this, ev: StorageEvent) => any;
+ onunload: (this: this, ev: Event) => any;
text: any;
vLink: any;
- createTextRange(): TextRange;
- addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "afterprint", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforeprint", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "beforeunload", listener: (ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "hashchange", listener: (ev: HashChangeEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "offline", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "online", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "orientationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "pagehide", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pageshow", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "popstate", listener: (ev: PopStateEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "resize", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "storage", listener: (ev: StorageEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "unload", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSContentZoom", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureChange", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureDoubleTap", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureEnd", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureHold", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureStart", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureTap", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGotPointerCapture", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSInertiaStart", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSLostPointerCapture", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSManipulationStateChanged", listener: (this: this, ev: MSManipulationEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerCancel", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerDown", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerEnter", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerLeave", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerMove", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOut", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOver", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerUp", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "abort", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "activate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "afterprint", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "ariarequest", listener: (this: this, ev: AriaRequestEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforeactivate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforecopy", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforecut", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforedeactivate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforepaste", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforeprint", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforeunload", listener: (this: this, ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "blur", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "blur", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplay", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplaythrough", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "change", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "click", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "command", listener: (this: this, ev: CommandEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "contextmenu", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "copy", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "cuechange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "cut", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dblclick", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "deactivate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drag", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragend", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragenter", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragleave", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragover", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragstart", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drop", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "durationchange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "emptied", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "ended", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "focus", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "focus", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "gotpointercapture", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "hashchange", listener: (this: this, ev: HashChangeEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "input", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "invalid", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "keydown", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keypress", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keyup", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadeddata", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadedmetadata", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadstart", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "lostpointercapture", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "message", listener: (this: this, ev: MessageEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousedown", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseenter", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseleave", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousemove", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseout", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseover", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseup", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousewheel", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "offline", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "online", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "orientationchange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "pagehide", listener: (this: this, ev: PageTransitionEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pageshow", listener: (this: this, ev: PageTransitionEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "paste", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pause", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "play", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "playing", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointercancel", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerdown", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerenter", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerleave", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointermove", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerout", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerover", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerup", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "popstate", listener: (this: this, ev: PopStateEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "progress", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ratechange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "reset", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "resize", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "scroll", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeked", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeking", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "select", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "selectstart", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "stalled", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "storage", listener: (this: this, ev: StorageEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "submit", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "suspend", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "timeupdate", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchcancel", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchend", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchmove", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchstart", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "unload", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "volumechange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "waiting", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenchange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenerror", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "wheel", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -9053,7 +10110,7 @@ interface HTMLButtonElement extends HTMLElement {
/**
* Retrieves a reference to the form that the object is embedded in.
*/
- form: HTMLFormElement;
+ readonly form: HTMLFormElement;
/**
* Overrides the action attribute (where the data on a form is sent) on the parent form element.
*/
@@ -9086,11 +10143,11 @@ interface HTMLButtonElement extends HTMLElement {
/**
* Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
*/
- validationMessage: string;
+ readonly validationMessage: string;
/**
* Returns a ValidityState object that represents the validity states of an element.
*/
- validity: ValidityState;
+ readonly validity: ValidityState;
/**
* Sets or retrieves the default or selected value of the control.
*/
@@ -9098,16 +10155,12 @@ interface HTMLButtonElement extends HTMLElement {
/**
* Returns whether an element will successfully validate based on forms validation rules and constraints.
*/
- willValidate: boolean;
+ readonly willValidate: boolean;
/**
* Returns whether a form will validate when it is submitted, without having to submit it.
*/
checkValidity(): boolean;
/**
- * Creates a TextRange object for the element.
- */
- createTextRange(): TextRange;
- /**
* Sets a custom error message that is displayed when a form is submitted.
* @param error Sets a custom error message that is displayed when a form is submitted.
*/
@@ -9132,9 +10185,9 @@ interface HTMLCanvasElement extends HTMLElement {
* Returns an object that provides methods and properties for drawing and manipulating images and graphics on a canvas element in a document. A context object includes information about colors, line widths, fonts, and other graphic parameters that can be drawn on a canvas.
* @param contextId The identifier (ID) of the type of canvas to create. Internet Explorer 9 and Internet Explorer 10 support only a 2-D context using canvas.getContext("2d"); IE11 Preview also supports 3-D or WebGL context using canvas.getContext("experimental-webgl");
*/
- getContext(contextId: "2d"): CanvasRenderingContext2D;
- getContext(contextId: "experimental-webgl"): WebGLRenderingContext;
- getContext(contextId: string, ...args: any[]): CanvasRenderingContext2D | WebGLRenderingContext;
+ getContext(contextId: "2d", contextAttributes?: Canvas2DContextAttributes): CanvasRenderingContext2D | null;
+ getContext(contextId: "webgl" | "experimental-webgl", contextAttributes?: WebGLContextAttributes): WebGLRenderingContext | null;
+ getContext(contextId: string, contextAttributes?: {}): CanvasRenderingContext2D | WebGLRenderingContext | null;
/**
* Returns a blob object encoded as a Portable Network Graphics (PNG) format from a canvas image or drawing.
*/
@@ -9144,6 +10197,7 @@ interface HTMLCanvasElement extends HTMLElement {
* @param type The standard MIME type for the image format to return. If you do not specify this parameter, the default value is a PNG format image.
*/
toDataURL(type?: string, ...args: any[]): string;
+ toBlob(callback: (result: Blob | null) => void, type?: string, ...arguments: any[]): void;
}
declare var HTMLCanvasElement: {
@@ -9155,11 +10209,11 @@ interface HTMLCollection {
/**
* Sets or retrieves the number of objects in a collection.
*/
- length: number;
+ readonly length: number;
/**
* Retrieves an object from various collections.
*/
- item(nameOrIndex?: any, optionalIndex?: any): Element;
+ item(index: number): Element;
/**
* Retrieves a select object or an object from an options collection.
*/
@@ -9172,18 +10226,6 @@ declare var HTMLCollection: {
new(): HTMLCollection;
}
-interface HTMLDDElement extends HTMLElement {
- /**
- * Sets or retrieves whether the browser automatically performs wordwrap.
- */
- noWrap: boolean;
-}
-
-declare var HTMLDDElement: {
- prototype: HTMLDDElement;
- new(): HTMLDDElement;
-}
-
interface HTMLDListElement extends HTMLElement {
compact: boolean;
}
@@ -9193,20 +10235,8 @@ declare var HTMLDListElement: {
new(): HTMLDListElement;
}
-interface HTMLDTElement extends HTMLElement {
- /**
- * Sets or retrieves whether the browser automatically performs wordwrap.
- */
- noWrap: boolean;
-}
-
-declare var HTMLDTElement: {
- prototype: HTMLDTElement;
- new(): HTMLDTElement;
-}
-
interface HTMLDataListElement extends HTMLElement {
- options: HTMLCollection;
+ options: HTMLCollectionOf<HTMLOptionElement>;
}
declare var HTMLDataListElement: {
@@ -9249,206 +10279,204 @@ declare var HTMLDocument: {
interface HTMLElement extends Element {
accessKey: string;
- children: HTMLCollection;
+ readonly children: HTMLCollection;
contentEditable: string;
- dataset: DOMStringMap;
+ readonly dataset: DOMStringMap;
dir: string;
draggable: boolean;
hidden: boolean;
hideFocus: boolean;
innerHTML: string;
innerText: string;
- isContentEditable: boolean;
+ readonly isContentEditable: boolean;
lang: string;
- offsetHeight: number;
- offsetLeft: number;
- offsetParent: Element;
- offsetTop: number;
- offsetWidth: number;
- onabort: (ev: Event) => any;
- onactivate: (ev: UIEvent) => any;
- onbeforeactivate: (ev: UIEvent) => any;
- onbeforecopy: (ev: DragEvent) => any;
- onbeforecut: (ev: DragEvent) => any;
- onbeforedeactivate: (ev: UIEvent) => any;
- onbeforepaste: (ev: DragEvent) => any;
- onblur: (ev: FocusEvent) => any;
- oncanplay: (ev: Event) => any;
- oncanplaythrough: (ev: Event) => any;
- onchange: (ev: Event) => any;
- onclick: (ev: MouseEvent) => any;
- oncontextmenu: (ev: PointerEvent) => any;
- oncopy: (ev: DragEvent) => any;
- oncuechange: (ev: Event) => any;
- oncut: (ev: DragEvent) => any;
- ondblclick: (ev: MouseEvent) => any;
- ondeactivate: (ev: UIEvent) => any;
- ondrag: (ev: DragEvent) => any;
- ondragend: (ev: DragEvent) => any;
- ondragenter: (ev: DragEvent) => any;
- ondragleave: (ev: DragEvent) => any;
- ondragover: (ev: DragEvent) => any;
- ondragstart: (ev: DragEvent) => any;
- ondrop: (ev: DragEvent) => any;
- ondurationchange: (ev: Event) => any;
- onemptied: (ev: Event) => any;
- onended: (ev: Event) => any;
- onerror: (ev: Event) => any;
- onfocus: (ev: FocusEvent) => any;
- oninput: (ev: Event) => any;
- onkeydown: (ev: KeyboardEvent) => any;
- onkeypress: (ev: KeyboardEvent) => any;
- onkeyup: (ev: KeyboardEvent) => any;
- onload: (ev: Event) => any;
- onloadeddata: (ev: Event) => any;
- onloadedmetadata: (ev: Event) => any;
- onloadstart: (ev: Event) => any;
- onmousedown: (ev: MouseEvent) => any;
- onmouseenter: (ev: MouseEvent) => any;
- onmouseleave: (ev: MouseEvent) => any;
- onmousemove: (ev: MouseEvent) => any;
- onmouseout: (ev: MouseEvent) => any;
- onmouseover: (ev: MouseEvent) => any;
- onmouseup: (ev: MouseEvent) => any;
- onmousewheel: (ev: MouseWheelEvent) => any;
- onmscontentzoom: (ev: UIEvent) => any;
- onmsmanipulationstatechanged: (ev: MSManipulationEvent) => any;
- onpaste: (ev: DragEvent) => any;
- onpause: (ev: Event) => any;
- onplay: (ev: Event) => any;
- onplaying: (ev: Event) => any;
- onprogress: (ev: ProgressEvent) => any;
- onratechange: (ev: Event) => any;
- onreset: (ev: Event) => any;
- onscroll: (ev: UIEvent) => any;
- onseeked: (ev: Event) => any;
- onseeking: (ev: Event) => any;
- onselect: (ev: UIEvent) => any;
- onselectstart: (ev: Event) => any;
- onstalled: (ev: Event) => any;
- onsubmit: (ev: Event) => any;
- onsuspend: (ev: Event) => any;
- ontimeupdate: (ev: Event) => any;
- onvolumechange: (ev: Event) => any;
- onwaiting: (ev: Event) => any;
+ readonly offsetHeight: number;
+ readonly offsetLeft: number;
+ readonly offsetParent: Element;
+ readonly offsetTop: number;
+ readonly offsetWidth: number;
+ onabort: (this: this, ev: UIEvent) => any;
+ onactivate: (this: this, ev: UIEvent) => any;
+ onbeforeactivate: (this: this, ev: UIEvent) => any;
+ onbeforecopy: (this: this, ev: ClipboardEvent) => any;
+ onbeforecut: (this: this, ev: ClipboardEvent) => any;
+ onbeforedeactivate: (this: this, ev: UIEvent) => any;
+ onbeforepaste: (this: this, ev: ClipboardEvent) => any;
+ onblur: (this: this, ev: FocusEvent) => any;
+ oncanplay: (this: this, ev: Event) => any;
+ oncanplaythrough: (this: this, ev: Event) => any;
+ onchange: (this: this, ev: Event) => any;
+ onclick: (this: this, ev: MouseEvent) => any;
+ oncontextmenu: (this: this, ev: PointerEvent) => any;
+ oncopy: (this: this, ev: ClipboardEvent) => any;
+ oncuechange: (this: this, ev: Event) => any;
+ oncut: (this: this, ev: ClipboardEvent) => any;
+ ondblclick: (this: this, ev: MouseEvent) => any;
+ ondeactivate: (this: this, ev: UIEvent) => any;
+ ondrag: (this: this, ev: DragEvent) => any;
+ ondragend: (this: this, ev: DragEvent) => any;
+ ondragenter: (this: this, ev: DragEvent) => any;
+ ondragleave: (this: this, ev: DragEvent) => any;
+ ondragover: (this: this, ev: DragEvent) => any;
+ ondragstart: (this: this, ev: DragEvent) => any;
+ ondrop: (this: this, ev: DragEvent) => any;
+ ondurationchange: (this: this, ev: Event) => any;
+ onemptied: (this: this, ev: Event) => any;
+ onended: (this: this, ev: MediaStreamErrorEvent) => any;
+ onerror: (this: this, ev: ErrorEvent) => any;
+ onfocus: (this: this, ev: FocusEvent) => any;
+ oninput: (this: this, ev: Event) => any;
+ oninvalid: (this: this, ev: Event) => any;
+ onkeydown: (this: this, ev: KeyboardEvent) => any;
+ onkeypress: (this: this, ev: KeyboardEvent) => any;
+ onkeyup: (this: this, ev: KeyboardEvent) => any;
+ onload: (this: this, ev: Event) => any;
+ onloadeddata: (this: this, ev: Event) => any;
+ onloadedmetadata: (this: this, ev: Event) => any;
+ onloadstart: (this: this, ev: Event) => any;
+ onmousedown: (this: this, ev: MouseEvent) => any;
+ onmouseenter: (this: this, ev: MouseEvent) => any;
+ onmouseleave: (this: this, ev: MouseEvent) => any;
+ onmousemove: (this: this, ev: MouseEvent) => any;
+ onmouseout: (this: this, ev: MouseEvent) => any;
+ onmouseover: (this: this, ev: MouseEvent) => any;
+ onmouseup: (this: this, ev: MouseEvent) => any;
+ onmousewheel: (this: this, ev: WheelEvent) => any;
+ onmscontentzoom: (this: this, ev: UIEvent) => any;
+ onmsmanipulationstatechanged: (this: this, ev: MSManipulationEvent) => any;
+ onpaste: (this: this, ev: ClipboardEvent) => any;
+ onpause: (this: this, ev: Event) => any;
+ onplay: (this: this, ev: Event) => any;
+ onplaying: (this: this, ev: Event) => any;
+ onprogress: (this: this, ev: ProgressEvent) => any;
+ onratechange: (this: this, ev: Event) => any;
+ onreset: (this: this, ev: Event) => any;
+ onscroll: (this: this, ev: UIEvent) => any;
+ onseeked: (this: this, ev: Event) => any;
+ onseeking: (this: this, ev: Event) => any;
+ onselect: (this: this, ev: UIEvent) => any;
+ onselectstart: (this: this, ev: Event) => any;
+ onstalled: (this: this, ev: Event) => any;
+ onsubmit: (this: this, ev: Event) => any;
+ onsuspend: (this: this, ev: Event) => any;
+ ontimeupdate: (this: this, ev: Event) => any;
+ onvolumechange: (this: this, ev: Event) => any;
+ onwaiting: (this: this, ev: Event) => any;
outerHTML: string;
outerText: string;
spellcheck: boolean;
- style: CSSStyleDeclaration;
+ readonly style: CSSStyleDeclaration;
tabIndex: number;
title: string;
blur(): void;
click(): void;
dragDrop(): boolean;
focus(): void;
- insertAdjacentElement(position: string, insertedElement: Element): Element;
- insertAdjacentHTML(where: string, html: string): void;
- insertAdjacentText(where: string, text: string): void;
msGetInputContext(): MSInputMethodContext;
- scrollIntoView(top?: boolean): void;
setActive(): void;
- addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSContentZoom", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureChange", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureDoubleTap", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureEnd", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureHold", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureStart", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureTap", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGotPointerCapture", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSInertiaStart", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSLostPointerCapture", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSManipulationStateChanged", listener: (this: this, ev: MSManipulationEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerCancel", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerDown", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerEnter", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerLeave", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerMove", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOut", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOver", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerUp", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "abort", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "activate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ariarequest", listener: (this: this, ev: AriaRequestEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforeactivate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforecopy", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforecut", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforedeactivate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforepaste", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "blur", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplay", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplaythrough", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "change", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "click", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "command", listener: (this: this, ev: CommandEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "contextmenu", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "copy", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "cuechange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "cut", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dblclick", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "deactivate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drag", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragend", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragenter", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragleave", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragover", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragstart", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drop", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "durationchange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "emptied", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "ended", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "focus", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "gotpointercapture", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "input", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "invalid", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "keydown", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keypress", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keyup", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadeddata", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadedmetadata", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadstart", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "lostpointercapture", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousedown", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseenter", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseleave", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousemove", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseout", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseover", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseup", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousewheel", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "paste", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pause", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "play", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "playing", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointercancel", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerdown", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerenter", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerleave", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointermove", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerout", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerover", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerup", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "progress", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ratechange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "reset", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "scroll", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeked", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeking", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "select", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "selectstart", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "stalled", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "submit", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "suspend", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "timeupdate", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchcancel", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchend", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchmove", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchstart", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "volumechange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "waiting", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenchange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenerror", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "wheel", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -9478,7 +10506,7 @@ interface HTMLEmbedElement extends HTMLElement, GetSVGDocument {
/**
* Gets the source associated with the media element for use by the PlayToManager.
*/
- msPlayToSource: any;
+ readonly msPlayToSource: any;
/**
* Sets or retrieves the name of the object.
*/
@@ -9486,12 +10514,12 @@ interface HTMLEmbedElement extends HTMLElement, GetSVGDocument {
/**
* Retrieves the palette used for the embedded document.
*/
- palette: string;
+ readonly palette: string;
/**
* Retrieves the URL of the plug-in used to view an embedded document.
*/
- pluginspage: string;
- readyState: string;
+ readonly pluginspage: string;
+ readonly readyState: string;
/**
* Sets or retrieves a URL to be loaded by the object.
*/
@@ -9521,19 +10549,19 @@ interface HTMLFieldSetElement extends HTMLElement {
/**
* Retrieves a reference to the form that the object is embedded in.
*/
- form: HTMLFormElement;
+ readonly form: HTMLFormElement;
/**
* Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
*/
- validationMessage: string;
+ readonly validationMessage: string;
/**
* Returns a ValidityState object that represents the validity states of an element.
*/
- validity: ValidityState;
+ readonly validity: ValidityState;
/**
* Returns whether an element will successfully validate based on forms validation rules and constraints.
*/
- willValidate: boolean;
+ readonly willValidate: boolean;
/**
* Returns whether a form will validate when it is submitted, without having to submit it.
*/
@@ -9579,7 +10607,7 @@ interface HTMLFormElement extends HTMLElement {
/**
* Retrieves a collection, in source order, of all controls in a given form.
*/
- elements: HTMLCollection;
+ readonly elements: HTMLCollection;
/**
* Sets or retrieves the MIME encoding for the form.
*/
@@ -9591,7 +10619,7 @@ interface HTMLFormElement extends HTMLElement {
/**
* Sets or retrieves the number of objects in a collection.
*/
- length: number;
+ readonly length: number;
/**
* Sets or retrieves how to send the form data to the server.
*/
@@ -9650,11 +10678,11 @@ interface HTMLFrameElement extends HTMLElement, GetSVGDocument {
/**
* Retrieves the document object of the page or frame.
*/
- contentDocument: Document;
+ readonly contentDocument: Document;
/**
* Retrieves the object of the specified.
*/
- contentWindow: Window;
+ readonly contentWindow: Window;
/**
* Sets or retrieves whether to display a border for the frame.
*/
@@ -9690,16 +10718,12 @@ interface HTMLFrameElement extends HTMLElement, GetSVGDocument {
/**
* Raised when the object has been completely received from the server.
*/
- onload: (ev: Event) => any;
+ onload: (this: this, ev: Event) => any;
/**
* Sets or retrieves whether the frame can be scrolled.
*/
scrolling: string;
/**
- * Sets the value indicating whether the source file of a frame or iframe has specific security restrictions applied.
- */
- security: any;
- /**
* Sets or retrieves a URL to be loaded by the object.
*/
src: string;
@@ -9707,109 +10731,110 @@ interface HTMLFrameElement extends HTMLElement, GetSVGDocument {
* Sets or retrieves the width of the object.
*/
width: string | number;
- addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSContentZoom", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureChange", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureDoubleTap", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureEnd", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureHold", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureStart", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureTap", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGotPointerCapture", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSInertiaStart", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSLostPointerCapture", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSManipulationStateChanged", listener: (this: this, ev: MSManipulationEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerCancel", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerDown", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerEnter", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerLeave", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerMove", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOut", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOver", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerUp", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "abort", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "activate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ariarequest", listener: (this: this, ev: AriaRequestEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforeactivate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforecopy", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforecut", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforedeactivate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforepaste", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "blur", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplay", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplaythrough", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "change", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "click", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "command", listener: (this: this, ev: CommandEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "contextmenu", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "copy", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "cuechange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "cut", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dblclick", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "deactivate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drag", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragend", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragenter", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragleave", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragover", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragstart", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drop", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "durationchange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "emptied", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "ended", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "focus", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "gotpointercapture", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "input", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "invalid", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "keydown", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keypress", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keyup", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadeddata", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadedmetadata", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadstart", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "lostpointercapture", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousedown", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseenter", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseleave", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousemove", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseout", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseover", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseup", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousewheel", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "paste", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pause", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "play", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "playing", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointercancel", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerdown", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerenter", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerleave", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointermove", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerout", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerover", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerup", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "progress", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ratechange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "reset", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "scroll", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeked", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeking", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "select", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "selectstart", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "stalled", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "submit", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "suspend", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "timeupdate", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchcancel", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchend", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchmove", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchstart", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "volumechange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "waiting", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenchange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenerror", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "wheel", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -9837,151 +10862,152 @@ interface HTMLFrameSetElement extends HTMLElement {
*/
frameSpacing: any;
name: string;
- onafterprint: (ev: Event) => any;
- onbeforeprint: (ev: Event) => any;
- onbeforeunload: (ev: BeforeUnloadEvent) => any;
+ onafterprint: (this: this, ev: Event) => any;
+ onbeforeprint: (this: this, ev: Event) => any;
+ onbeforeunload: (this: this, ev: BeforeUnloadEvent) => any;
/**
* Fires when the object loses the input focus.
*/
- onblur: (ev: FocusEvent) => any;
- onerror: (ev: Event) => any;
+ onblur: (this: this, ev: FocusEvent) => any;
+ onerror: (this: this, ev: ErrorEvent) => any;
/**
* Fires when the object receives focus.
*/
- onfocus: (ev: FocusEvent) => any;
- onhashchange: (ev: HashChangeEvent) => any;
- onload: (ev: Event) => any;
- onmessage: (ev: MessageEvent) => any;
- onoffline: (ev: Event) => any;
- ononline: (ev: Event) => any;
- onorientationchange: (ev: Event) => any;
- onpagehide: (ev: PageTransitionEvent) => any;
- onpageshow: (ev: PageTransitionEvent) => any;
- onresize: (ev: UIEvent) => any;
- onstorage: (ev: StorageEvent) => any;
- onunload: (ev: Event) => any;
+ onfocus: (this: this, ev: FocusEvent) => any;
+ onhashchange: (this: this, ev: HashChangeEvent) => any;
+ onload: (this: this, ev: Event) => any;
+ onmessage: (this: this, ev: MessageEvent) => any;
+ onoffline: (this: this, ev: Event) => any;
+ ononline: (this: this, ev: Event) => any;
+ onorientationchange: (this: this, ev: Event) => any;
+ onpagehide: (this: this, ev: PageTransitionEvent) => any;
+ onpageshow: (this: this, ev: PageTransitionEvent) => any;
+ onresize: (this: this, ev: UIEvent) => any;
+ onstorage: (this: this, ev: StorageEvent) => any;
+ onunload: (this: this, ev: Event) => any;
/**
* Sets or retrieves the frame heights of the object.
*/
rows: string;
- addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforeprint", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "beforeunload", listener: (ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "hashchange", listener: (ev: HashChangeEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "offline", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "online", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "orientationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "pagehide", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pageshow", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "resize", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "storage", listener: (ev: StorageEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "unload", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSContentZoom", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureChange", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureDoubleTap", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureEnd", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureHold", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureStart", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureTap", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGotPointerCapture", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSInertiaStart", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSLostPointerCapture", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSManipulationStateChanged", listener: (this: this, ev: MSManipulationEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerCancel", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerDown", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerEnter", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerLeave", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerMove", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOut", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOver", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerUp", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "abort", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "activate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ariarequest", listener: (this: this, ev: AriaRequestEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforeactivate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforecopy", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforecut", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforedeactivate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforepaste", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforeprint", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforeunload", listener: (this: this, ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "blur", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "blur", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplay", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplaythrough", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "change", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "click", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "command", listener: (this: this, ev: CommandEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "contextmenu", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "copy", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "cuechange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "cut", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dblclick", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "deactivate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drag", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragend", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragenter", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragleave", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragover", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragstart", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drop", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "durationchange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "emptied", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "ended", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "focus", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "focus", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "gotpointercapture", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "hashchange", listener: (this: this, ev: HashChangeEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "input", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "invalid", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "keydown", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keypress", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keyup", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadeddata", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadedmetadata", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadstart", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "lostpointercapture", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "message", listener: (this: this, ev: MessageEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousedown", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseenter", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseleave", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousemove", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseout", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseover", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseup", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousewheel", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "offline", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "online", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "orientationchange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "pagehide", listener: (this: this, ev: PageTransitionEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pageshow", listener: (this: this, ev: PageTransitionEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "paste", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pause", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "play", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "playing", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointercancel", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerdown", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerenter", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerleave", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointermove", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerout", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerover", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerup", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "progress", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ratechange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "reset", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "resize", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "scroll", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeked", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeking", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "select", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "selectstart", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "stalled", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "storage", listener: (this: this, ev: StorageEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "submit", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "suspend", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "timeupdate", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchcancel", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchend", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchmove", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchstart", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "unload", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "volumechange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "waiting", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenchange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenerror", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "wheel", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -10025,7 +11051,6 @@ interface HTMLHeadingElement extends HTMLElement {
* Sets or retrieves a value that indicates the table alignment.
*/
align: string;
- clear: string;
}
declare var HTMLHeadingElement: {
@@ -10058,11 +11083,11 @@ interface HTMLIFrameElement extends HTMLElement, GetSVGDocument {
/**
* Retrieves the document object of the page or frame.
*/
- contentDocument: Document;
+ readonly contentDocument: Document;
/**
* Retrieves the object of the specified.
*/
- contentWindow: Window;
+ readonly contentWindow: Window;
/**
* Sets or retrieves whether to display a border for the frame.
*/
@@ -10102,17 +11127,13 @@ interface HTMLIFrameElement extends HTMLElement, GetSVGDocument {
/**
* Raised when the object has been completely received from the server.
*/
- onload: (ev: Event) => any;
- sandbox: DOMSettableTokenList;
+ onload: (this: this, ev: Event) => any;
+ readonly sandbox: DOMSettableTokenList;
/**
* Sets or retrieves whether the frame can be scrolled.
*/
scrolling: string;
/**
- * Sets the value indicating whether the source file of a frame or iframe has specific security restrictions applied.
- */
- security: any;
- /**
* Sets or retrieves a URL to be loaded by the object.
*/
src: string;
@@ -10124,109 +11145,110 @@ interface HTMLIFrameElement extends HTMLElement, GetSVGDocument {
* Sets or retrieves the width of the object.
*/
width: string;
- addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSContentZoom", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureChange", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureDoubleTap", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureEnd", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureHold", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureStart", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureTap", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGotPointerCapture", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSInertiaStart", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSLostPointerCapture", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSManipulationStateChanged", listener: (this: this, ev: MSManipulationEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerCancel", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerDown", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerEnter", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerLeave", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerMove", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOut", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOver", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerUp", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "abort", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "activate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ariarequest", listener: (this: this, ev: AriaRequestEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforeactivate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforecopy", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforecut", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforedeactivate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforepaste", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "blur", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplay", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplaythrough", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "change", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "click", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "command", listener: (this: this, ev: CommandEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "contextmenu", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "copy", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "cuechange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "cut", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dblclick", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "deactivate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drag", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragend", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragenter", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragleave", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragover", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragstart", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drop", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "durationchange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "emptied", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "ended", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "focus", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "gotpointercapture", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "input", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "invalid", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "keydown", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keypress", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keyup", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadeddata", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadedmetadata", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadstart", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "lostpointercapture", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousedown", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseenter", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseleave", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousemove", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseout", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseover", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseup", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousewheel", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "paste", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pause", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "play", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "playing", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointercancel", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerdown", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerenter", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerleave", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointermove", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerout", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerover", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerup", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "progress", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ratechange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "reset", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "scroll", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeked", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeking", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "select", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "selectstart", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "stalled", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "submit", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "suspend", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "timeupdate", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchcancel", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchend", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchmove", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchstart", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "volumechange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "waiting", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenchange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenerror", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "wheel", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -10251,9 +11273,9 @@ interface HTMLImageElement extends HTMLElement {
/**
* Retrieves whether the object is fully loaded.
*/
- complete: boolean;
+ readonly complete: boolean;
crossOrigin: string;
- currentSrc: string;
+ readonly currentSrc: string;
/**
* Sets or retrieves the height of the object.
*/
@@ -10270,6 +11292,7 @@ interface HTMLImageElement extends HTMLElement {
* Sets or retrieves a Uniform Resource Identifier (URI) to a long description of the object.
*/
longDesc: string;
+ lowsrc: string;
/**
* Gets or sets whether the DLNA PlayTo device is available.
*/
@@ -10282,7 +11305,7 @@ interface HTMLImageElement extends HTMLElement {
/**
* Gets the source associated with the media element for use by the PlayToManager.
*/
- msPlayToSource: any;
+ readonly msPlayToSource: any;
/**
* Sets or retrieves the name of the object.
*/
@@ -10290,11 +11313,12 @@ interface HTMLImageElement extends HTMLElement {
/**
* The original height of the image resource before sizing.
*/
- naturalHeight: number;
+ readonly naturalHeight: number;
/**
* The original width of the image resource before sizing.
*/
- naturalWidth: number;
+ readonly naturalWidth: number;
+ sizes: string;
/**
* The address or URL of the a media resource that is to be considered.
*/
@@ -10312,8 +11336,8 @@ interface HTMLImageElement extends HTMLElement {
* Sets or retrieves the width of the object.
*/
width: number;
- x: number;
- y: number;
+ readonly x: number;
+ readonly y: number;
msGetAsCastingSource(): any;
}
@@ -10355,7 +11379,7 @@ interface HTMLInputElement extends HTMLElement {
/**
* Retrieves whether the object is fully loaded.
*/
- complete: boolean;
+ readonly complete: boolean;
/**
* Sets or retrieves the state of the check box or radio button.
*/
@@ -10368,11 +11392,11 @@ interface HTMLInputElement extends HTMLElement {
/**
* Returns a FileList object on a file type input object.
*/
- files: FileList;
+ readonly files: FileList | null;
/**
* Retrieves a reference to the form that the object is embedded in.
*/
- form: HTMLFormElement;
+ readonly form: HTMLFormElement;
/**
* Overrides the action attribute (where the data on a form is sent) on the parent form element.
*/
@@ -10405,7 +11429,7 @@ interface HTMLInputElement extends HTMLElement {
/**
* Specifies the ID of a pre-defined datalist of options for an input element.
*/
- list: HTMLElement;
+ readonly list: HTMLElement;
/**
* Defines the maximum acceptable value for an input element with type="number".When used with the min and step attributes, lets you control the range and increment (such as only even numbers) that the user can enter into an input field.
*/
@@ -10439,6 +11463,7 @@ interface HTMLInputElement extends HTMLElement {
* When present, marks an element that can't be submitted without a value.
*/
required: boolean;
+ selectionDirection: string;
/**
* Gets or sets the end position or offset of a text selection.
*/
@@ -10468,11 +11493,11 @@ interface HTMLInputElement extends HTMLElement {
/**
* Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
*/
- validationMessage: string;
+ readonly validationMessage: string;
/**
* Returns a ValidityState object that represents the validity states of an element.
*/
- validity: ValidityState;
+ readonly validity: ValidityState;
/**
* Returns the value of the data at the cursor's current position.
*/
@@ -10486,6 +11511,7 @@ interface HTMLInputElement extends HTMLElement {
* Sets or retrieves the vertical margin for the object.
*/
vspace: number;
+ webkitdirectory: boolean;
/**
* Sets or retrieves the width of the object.
*/
@@ -10493,16 +11519,13 @@ interface HTMLInputElement extends HTMLElement {
/**
* Returns whether an element will successfully validate based on forms validation rules and constraints.
*/
- willValidate: boolean;
+ readonly willValidate: boolean;
+ minLength: number;
/**
* Returns whether a form will validate when it is submitted, without having to submit it.
*/
checkValidity(): boolean;
/**
- * Creates a TextRange object for the element.
- */
- createTextRange(): TextRange;
- /**
* Makes the selection equal to the current object.
*/
select(): void;
@@ -10516,7 +11539,7 @@ interface HTMLInputElement extends HTMLElement {
* @param start The offset into the text field for the start of the selection.
* @param end The offset into the text field for the end of the selection.
*/
- setSelectionRange(start: number, end: number): void;
+ setSelectionRange(start?: number, end?: number, direction?: string): void;
/**
* Decrements a range input control's value by the value given by the Step attribute. If the optional parameter is used, it will decrement the input control's step value multiplied by the parameter's value.
* @param n Value to decrement the value by.
@@ -10534,23 +11557,6 @@ declare var HTMLInputElement: {
new(): HTMLInputElement;
}
-interface HTMLIsIndexElement extends HTMLElement {
- /**
- * Sets or retrieves the URL to which the form content is sent for processing.
- */
- action: string;
- /**
- * Retrieves a reference to the form that the object is embedded in.
- */
- form: HTMLFormElement;
- prompt: string;
-}
-
-declare var HTMLIsIndexElement: {
- prototype: HTMLIsIndexElement;
- new(): HTMLIsIndexElement;
-}
-
interface HTMLLIElement extends HTMLElement {
type: string;
/**
@@ -10568,7 +11574,7 @@ interface HTMLLabelElement extends HTMLElement {
/**
* Retrieves a reference to the form that the object is embedded in.
*/
- form: HTMLFormElement;
+ readonly form: HTMLFormElement;
/**
* Sets or retrieves the object to which the given label object is assigned.
*/
@@ -10588,7 +11594,7 @@ interface HTMLLegendElement extends HTMLElement {
/**
* Retrieves a reference to the form that the object is embedded in.
*/
- form: HTMLFormElement;
+ readonly form: HTMLFormElement;
}
declare var HTMLLegendElement: {
@@ -10630,6 +11636,8 @@ interface HTMLLinkElement extends HTMLElement, LinkStyle {
* Sets or retrieves the MIME type of the object.
*/
type: string;
+ import?: Document;
+ integrity: string;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -10642,7 +11650,7 @@ interface HTMLMapElement extends HTMLElement {
/**
* Retrieves a collection of the area objects defined for the given map object.
*/
- areas: HTMLAreasCollection;
+ readonly areas: HTMLAreasCollection;
/**
* Sets or retrieves the name of the object.
*/
@@ -10661,9 +11669,9 @@ interface HTMLMarqueeElement extends HTMLElement {
height: string;
hspace: number;
loop: number;
- onbounce: (ev: Event) => any;
- onfinish: (ev: Event) => any;
- onstart: (ev: Event) => any;
+ onbounce: (this: this, ev: Event) => any;
+ onfinish: (this: this, ev: Event) => any;
+ onstart: (this: this, ev: Event) => any;
scrollAmount: number;
scrollDelay: number;
trueSpeed: boolean;
@@ -10671,111 +11679,112 @@ interface HTMLMarqueeElement extends HTMLElement {
width: string;
start(): void;
stop(): void;
- addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "bounce", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "finish", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "start", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSContentZoom", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureChange", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureDoubleTap", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureEnd", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureHold", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureStart", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureTap", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGotPointerCapture", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSInertiaStart", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSLostPointerCapture", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSManipulationStateChanged", listener: (this: this, ev: MSManipulationEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerCancel", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerDown", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerEnter", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerLeave", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerMove", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOut", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOver", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerUp", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "abort", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "activate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ariarequest", listener: (this: this, ev: AriaRequestEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforeactivate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforecopy", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforecut", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforedeactivate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforepaste", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "blur", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "bounce", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplay", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplaythrough", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "change", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "click", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "command", listener: (this: this, ev: CommandEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "contextmenu", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "copy", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "cuechange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "cut", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dblclick", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "deactivate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drag", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragend", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragenter", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragleave", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragover", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragstart", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drop", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "durationchange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "emptied", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "ended", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "finish", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "focus", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "gotpointercapture", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "input", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "invalid", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "keydown", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keypress", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keyup", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadeddata", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadedmetadata", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadstart", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "lostpointercapture", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousedown", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseenter", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseleave", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousemove", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseout", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseover", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseup", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousewheel", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "paste", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pause", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "play", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "playing", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointercancel", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerdown", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerenter", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerleave", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointermove", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerout", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerover", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerup", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "progress", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ratechange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "reset", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "scroll", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeked", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeking", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "select", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "selectstart", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "stalled", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "start", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "submit", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "suspend", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "timeupdate", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchcancel", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchend", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchmove", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchstart", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "volumechange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "waiting", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenchange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenerror", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "wheel", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -10788,7 +11797,7 @@ interface HTMLMediaElement extends HTMLElement {
/**
* Returns an AudioTrackList object with the audio tracks for a given video element.
*/
- audioTracks: AudioTrackList;
+ readonly audioTracks: AudioTrackList;
/**
* Gets or sets a value that indicates whether to start playing the media automatically.
*/
@@ -10796,15 +11805,16 @@ interface HTMLMediaElement extends HTMLElement {
/**
* Gets a collection of buffered time ranges.
*/
- buffered: TimeRanges;
+ readonly buffered: TimeRanges;
/**
* Gets or sets a flag that indicates whether the client provides a set of controls for the media (in case the developer does not include controls for the player).
*/
controls: boolean;
+ crossOrigin: string;
/**
* Gets the address or URL of the current media resource that is selected by IHTMLMediaElement.
*/
- currentSrc: string;
+ readonly currentSrc: string;
/**
* Gets or sets the current playback position, in seconds.
*/
@@ -10817,19 +11827,20 @@ interface HTMLMediaElement extends HTMLElement {
/**
* Returns the duration in seconds of the current media resource. A NaN value is returned if duration is not available, or Infinity if the media resource is streaming.
*/
- duration: number;
+ readonly duration: number;
/**
* Gets information about whether the playback has ended or not.
*/
- ended: boolean;
+ readonly ended: boolean;
/**
* Returns an object representing the current error state of the audio or video element.
*/
- error: MediaError;
+ readonly error: MediaError;
/**
* Gets or sets a flag to specify whether playback should restart after it completes.
*/
loop: boolean;
+ readonly mediaKeys: MediaKeys | null;
/**
* Specifies the purpose of the audio or video media, such as background audio or alerts.
*/
@@ -10838,11 +11849,11 @@ interface HTMLMediaElement extends HTMLElement {
* Specifies the output device id that the audio will be sent to.
*/
msAudioDeviceType: string;
- msGraphicsTrustStatus: MSGraphicsTrust;
+ readonly msGraphicsTrustStatus: MSGraphicsTrust;
/**
* Gets the MSMediaKeys object, which is used for decrypting media data, that is associated with this media element.
*/
- msKeys: MSMediaKeys;
+ readonly msKeys: MSMediaKeys;
/**
* Gets or sets whether the DLNA PlayTo device is available.
*/
@@ -10858,7 +11869,7 @@ interface HTMLMediaElement extends HTMLElement {
/**
* Gets the source associated with the media element for use by the PlayToManager.
*/
- msPlayToSource: any;
+ readonly msPlayToSource: any;
/**
* Specifies whether or not to enable low-latency playback on the media element.
*/
@@ -10870,12 +11881,13 @@ interface HTMLMediaElement extends HTMLElement {
/**
* Gets the current network activity for the element.
*/
- networkState: number;
- onmsneedkey: (ev: MSMediaKeyNeededEvent) => any;
+ readonly networkState: number;
+ onencrypted: (this: this, ev: MediaEncryptedEvent) => any;
+ onmsneedkey: (this: this, ev: MSMediaKeyNeededEvent) => any;
/**
* Gets a flag that specifies whether playback is paused.
*/
- paused: boolean;
+ readonly paused: boolean;
/**
* Gets or sets the current rate of speed for the media resource to play. This speed is expressed as a multiple of the normal speed of the media resource.
*/
@@ -10883,7 +11895,7 @@ interface HTMLMediaElement extends HTMLElement {
/**
* Gets TimeRanges for the current media resource that has been played.
*/
- played: TimeRanges;
+ readonly played: TimeRanges;
/**
* Gets or sets the current playback position, in seconds.
*/
@@ -10892,17 +11904,18 @@ interface HTMLMediaElement extends HTMLElement {
/**
* Returns a TimeRanges object that represents the ranges of the current media resource that can be seeked.
*/
- seekable: TimeRanges;
+ readonly seekable: TimeRanges;
/**
* Gets a flag that indicates whether the the client is currently moving to a new playback position in the media resource.
*/
- seeking: boolean;
+ readonly seeking: boolean;
/**
* The address or URL of the a media resource that is to be considered.
*/
src: string;
- textTracks: TextTrackList;
- videoTracks: VideoTrackList;
+ srcObject: MediaStream | null;
+ readonly textTracks: TextTrackList;
+ readonly videoTracks: VideoTrackList;
/**
* Gets or sets the volume level for audio portions of the media element.
*/
@@ -10913,7 +11926,7 @@ interface HTMLMediaElement extends HTMLElement {
*/
canPlayType(type: string): string;
/**
- * Fires immediately after the client loads the object.
+ * Resets the audio or video object and loads a new media resource.
*/
load(): void;
/**
@@ -10938,133 +11951,136 @@ interface HTMLMediaElement extends HTMLElement {
* Loads and starts playback of a media resource.
*/
play(): void;
- HAVE_CURRENT_DATA: number;
- HAVE_ENOUGH_DATA: number;
- HAVE_FUTURE_DATA: number;
- HAVE_METADATA: number;
- HAVE_NOTHING: number;
- NETWORK_EMPTY: number;
- NETWORK_IDLE: number;
- NETWORK_LOADING: number;
- NETWORK_NO_SOURCE: number;
- addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "msneedkey", listener: (ev: MSMediaKeyNeededEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
+ setMediaKeys(mediaKeys: MediaKeys | null): PromiseLike<void>;
+ readonly HAVE_CURRENT_DATA: number;
+ readonly HAVE_ENOUGH_DATA: number;
+ readonly HAVE_FUTURE_DATA: number;
+ readonly HAVE_METADATA: number;
+ readonly HAVE_NOTHING: number;
+ readonly NETWORK_EMPTY: number;
+ readonly NETWORK_IDLE: number;
+ readonly NETWORK_LOADING: number;
+ readonly NETWORK_NO_SOURCE: number;
+ addEventListener(type: "MSContentZoom", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureChange", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureDoubleTap", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureEnd", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureHold", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureStart", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureTap", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGotPointerCapture", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSInertiaStart", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSLostPointerCapture", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSManipulationStateChanged", listener: (this: this, ev: MSManipulationEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerCancel", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerDown", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerEnter", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerLeave", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerMove", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOut", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOver", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerUp", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "abort", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "activate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ariarequest", listener: (this: this, ev: AriaRequestEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforeactivate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforecopy", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforecut", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforedeactivate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforepaste", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "blur", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplay", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplaythrough", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "change", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "click", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "command", listener: (this: this, ev: CommandEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "contextmenu", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "copy", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "cuechange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "cut", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dblclick", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "deactivate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drag", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragend", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragenter", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragleave", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragover", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragstart", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drop", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "durationchange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "emptied", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "encrypted", listener: (this: this, ev: MediaEncryptedEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ended", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "focus", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "gotpointercapture", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "input", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "invalid", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "keydown", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keypress", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keyup", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadeddata", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadedmetadata", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadstart", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "lostpointercapture", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousedown", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseenter", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseleave", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousemove", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseout", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseover", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseup", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousewheel", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "msneedkey", listener: (this: this, ev: MSMediaKeyNeededEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "paste", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pause", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "play", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "playing", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointercancel", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerdown", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerenter", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerleave", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointermove", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerout", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerover", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerup", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "progress", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ratechange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "reset", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "scroll", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeked", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeking", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "select", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "selectstart", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "stalled", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "submit", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "suspend", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "timeupdate", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchcancel", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchend", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchmove", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchstart", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "volumechange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "waiting", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenchange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenerror", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "wheel", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
declare var HTMLMediaElement: {
prototype: HTMLMediaElement;
new(): HTMLMediaElement;
- HAVE_CURRENT_DATA: number;
- HAVE_ENOUGH_DATA: number;
- HAVE_FUTURE_DATA: number;
- HAVE_METADATA: number;
- HAVE_NOTHING: number;
- NETWORK_EMPTY: number;
- NETWORK_IDLE: number;
- NETWORK_LOADING: number;
- NETWORK_NO_SOURCE: number;
+ readonly HAVE_CURRENT_DATA: number;
+ readonly HAVE_ENOUGH_DATA: number;
+ readonly HAVE_FUTURE_DATA: number;
+ readonly HAVE_METADATA: number;
+ readonly HAVE_NOTHING: number;
+ readonly NETWORK_EMPTY: number;
+ readonly NETWORK_IDLE: number;
+ readonly NETWORK_LOADING: number;
+ readonly NETWORK_NO_SOURCE: number;
}
interface HTMLMenuElement extends HTMLElement {
@@ -11109,6 +12125,20 @@ declare var HTMLMetaElement: {
new(): HTMLMetaElement;
}
+interface HTMLMeterElement extends HTMLElement {
+ high: number;
+ low: number;
+ max: number;
+ min: number;
+ optimum: number;
+ value: number;
+}
+
+declare var HTMLMeterElement: {
+ prototype: HTMLMeterElement;
+ new(): HTMLMeterElement;
+}
+
interface HTMLModElement extends HTMLElement {
/**
* Sets or retrieves reference information about the object.
@@ -11125,15 +12155,6 @@ declare var HTMLModElement: {
new(): HTMLModElement;
}
-interface HTMLNextIdElement extends HTMLElement {
- n: string;
-}
-
-declare var HTMLNextIdElement: {
- prototype: HTMLNextIdElement;
- new(): HTMLNextIdElement;
-}
-
interface HTMLOListElement extends HTMLElement {
compact: boolean;
/**
@@ -11152,7 +12173,7 @@ interface HTMLObjectElement extends HTMLElement, GetSVGDocument {
/**
* Retrieves a string of the URL where the object tag can be found. This is often the href of the document that the object is in, or the value set by a base element.
*/
- BaseHref: string;
+ readonly BaseHref: string;
align: string;
/**
* Sets or retrieves a text alternative to the graphic.
@@ -11182,7 +12203,7 @@ interface HTMLObjectElement extends HTMLElement, GetSVGDocument {
/**
* Retrieves the document object of the page or frame.
*/
- contentDocument: Document;
+ readonly contentDocument: Document;
/**
* Sets or retrieves the URL that references the data of the object.
*/
@@ -11191,7 +12212,7 @@ interface HTMLObjectElement extends HTMLElement, GetSVGDocument {
/**
* Retrieves a reference to the form that the object is embedded in.
*/
- form: HTMLFormElement;
+ readonly form: HTMLFormElement;
/**
* Sets or retrieves the height of the object.
*/
@@ -11212,7 +12233,7 @@ interface HTMLObjectElement extends HTMLElement, GetSVGDocument {
/**
* Gets the source associated with the media element for use by the PlayToManager.
*/
- msPlayToSource: any;
+ readonly msPlayToSource: any;
/**
* Sets or retrieves the name of the object.
*/
@@ -11220,8 +12241,8 @@ interface HTMLObjectElement extends HTMLElement, GetSVGDocument {
/**
* Retrieves the contained object.
*/
- object: any;
- readyState: number;
+ readonly object: any;
+ readonly readyState: number;
/**
* Sets or retrieves a message to be displayed while an object is loading.
*/
@@ -11237,11 +12258,11 @@ interface HTMLObjectElement extends HTMLElement, GetSVGDocument {
/**
* Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
*/
- validationMessage: string;
+ readonly validationMessage: string;
/**
* Returns a ValidityState object that represents the validity states of an element.
*/
- validity: ValidityState;
+ readonly validity: ValidityState;
vspace: number;
/**
* Sets or retrieves the width of the object.
@@ -11250,7 +12271,7 @@ interface HTMLObjectElement extends HTMLElement, GetSVGDocument {
/**
* Returns whether an element will successfully validate based on forms validation rules and constraints.
*/
- willValidate: boolean;
+ readonly willValidate: boolean;
/**
* Returns whether a form will validate when it is submitted, without having to submit it.
*/
@@ -11277,11 +12298,11 @@ interface HTMLOptGroupElement extends HTMLElement {
/**
* Retrieves a reference to the form that the object is embedded in.
*/
- form: HTMLFormElement;
+ readonly form: HTMLFormElement;
/**
* Sets or retrieves the ordinal position of an option in a list box.
*/
- index: number;
+ readonly index: number;
/**
* Sets or retrieves a value that you can use to implement your own label functionality for the object.
*/
@@ -11293,7 +12314,7 @@ interface HTMLOptGroupElement extends HTMLElement {
/**
* Sets or retrieves the text string specified by the option tag.
*/
- text: string;
+ readonly text: string;
/**
* Sets or retrieves the value which is returned to the server when the form control is submitted.
*/
@@ -11314,11 +12335,11 @@ interface HTMLOptionElement extends HTMLElement {
/**
* Retrieves a reference to the form that the object is embedded in.
*/
- form: HTMLFormElement;
+ readonly form: HTMLFormElement;
/**
* Sets or retrieves the ordinal position of an option in a list box.
*/
- index: number;
+ readonly index: number;
/**
* Sets or retrieves a value that you can use to implement your own label functionality for the object.
*/
@@ -11343,6 +12364,18 @@ declare var HTMLOptionElement: {
create(): HTMLOptionElement;
}
+interface HTMLOptionsCollection extends HTMLCollectionOf<HTMLOptionElement> {
+ length: number;
+ selectedIndex: number;
+ add(element: HTMLOptionElement | HTMLOptGroupElement, before?: HTMLElement | number): void;
+ remove(index: number): void;
+}
+
+declare var HTMLOptionsCollection: {
+ prototype: HTMLOptionsCollection;
+ new(): HTMLOptionsCollection;
+}
+
interface HTMLParagraphElement extends HTMLElement {
/**
* Sets or retrieves how the object is aligned with adjacent text.
@@ -11380,29 +12413,16 @@ declare var HTMLParamElement: {
new(): HTMLParamElement;
}
-interface HTMLPhraseElement extends HTMLElement {
- /**
- * Sets or retrieves reference information about the object.
- */
- cite: string;
- /**
- * Sets or retrieves the date and time of a modification to the object.
- */
- dateTime: string;
+interface HTMLPictureElement extends HTMLElement {
}
-declare var HTMLPhraseElement: {
- prototype: HTMLPhraseElement;
- new(): HTMLPhraseElement;
+declare var HTMLPictureElement: {
+ prototype: HTMLPictureElement;
+ new(): HTMLPictureElement;
}
interface HTMLPreElement extends HTMLElement {
/**
- * Indicates a citation by rendering text in italic type.
- */
- cite: string;
- clear: string;
- /**
* Sets or gets a value that you can use to implement your own width functionality for the object.
*/
width: number;
@@ -11417,7 +12437,7 @@ interface HTMLProgressElement extends HTMLElement {
/**
* Retrieves a reference to the form that the object is embedded in.
*/
- form: HTMLFormElement;
+ readonly form: HTMLFormElement;
/**
* Defines the maximum, or "done" value for a progress element.
*/
@@ -11425,7 +12445,7 @@ interface HTMLProgressElement extends HTMLElement {
/**
* Returns the quotient of value/max when the value attribute is set (determinate progress bar), or -1 when the value attribute is missing (indeterminate progress bar).
*/
- position: number;
+ readonly position: number;
/**
* Sets or gets the current value of a progress element. The value must be a non-negative number between 0 and the max value.
*/
@@ -11442,10 +12462,6 @@ interface HTMLQuoteElement extends HTMLElement {
* Sets or retrieves reference information about the object.
*/
cite: string;
- /**
- * Sets or retrieves the date and time of a modification to the object.
- */
- dateTime: string;
}
declare var HTMLQuoteElement: {
@@ -11483,6 +12499,7 @@ interface HTMLScriptElement extends HTMLElement {
* Sets or retrieves the MIME type for the associated scripting engine.
*/
type: string;
+ integrity: string;
}
declare var HTMLScriptElement: {
@@ -11499,7 +12516,7 @@ interface HTMLSelectElement extends HTMLElement {
/**
* Retrieves a reference to the form that the object is embedded in.
*/
- form: HTMLFormElement;
+ readonly form: HTMLFormElement;
/**
* Sets or retrieves the number of objects in a collection.
*/
@@ -11512,7 +12529,7 @@ interface HTMLSelectElement extends HTMLElement {
* Sets or retrieves the name of the object.
*/
name: string;
- options: HTMLCollection;
+ readonly options: HTMLOptionsCollection;
/**
* When present, marks an element that can't be submitted without a value.
*/
@@ -11521,6 +12538,7 @@ interface HTMLSelectElement extends HTMLElement {
* Sets or retrieves the index of the selected option in a select object.
*/
selectedIndex: number;
+ selectedOptions: HTMLCollectionOf<HTMLOptionElement>;
/**
* Sets or retrieves the number of rows in the list box.
*/
@@ -11528,15 +12546,15 @@ interface HTMLSelectElement extends HTMLElement {
/**
* Retrieves the type of select control based on the value of the MULTIPLE attribute.
*/
- type: string;
+ readonly type: string;
/**
* Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
*/
- validationMessage: string;
+ readonly validationMessage: string;
/**
* Returns a ValidityState object that represents the validity states of an element.
*/
- validity: ValidityState;
+ readonly validity: ValidityState;
/**
* Sets or retrieves the value which is returned to the server when the form control is submitted.
*/
@@ -11544,8 +12562,7 @@ interface HTMLSelectElement extends HTMLElement {
/**
* Returns whether an element will successfully validate based on forms validation rules and constraints.
*/
- willValidate: boolean;
- selectedOptions: HTMLCollection;
+ readonly willValidate: boolean;
/**
* Adds an element to the areas, controlRange, or options collection.
* @param element Variant of type Number that specifies the index position in the collection where the element is placed. If no value is given, the method places the element at the end of the collection.
@@ -11591,10 +12608,12 @@ interface HTMLSourceElement extends HTMLElement {
*/
media: string;
msKeySystem: string;
+ sizes: string;
/**
* The address or URL of the a media resource that is to be considered.
*/
src: string;
+ srcset: string;
/**
* Gets or sets the MIME type of a media resource.
*/
@@ -11615,6 +12634,7 @@ declare var HTMLSpanElement: {
}
interface HTMLStyleElement extends HTMLElement, LinkStyle {
+ disabled: boolean;
/**
* Sets or retrieves the media type.
*/
@@ -11664,7 +12684,7 @@ interface HTMLTableCellElement extends HTMLElement, HTMLTableAlignment {
/**
* Retrieves the position of the object in the cells collection of a row.
*/
- cellIndex: number;
+ readonly cellIndex: number;
/**
* Sets or retrieves the number columns in the table that the object should span.
*/
@@ -11771,7 +12791,7 @@ interface HTMLTableElement extends HTMLElement {
/**
* Sets or retrieves the number of horizontal rows contained in the object.
*/
- rows: HTMLCollection;
+ rows: HTMLCollectionOf<HTMLTableRowElement>;
/**
* Sets or retrieves which dividing lines (inner borders) are displayed.
*/
@@ -11783,7 +12803,7 @@ interface HTMLTableElement extends HTMLElement {
/**
* Retrieves a collection of all tBody objects in the table. Objects in this collection are in source order.
*/
- tBodies: HTMLCollection;
+ tBodies: HTMLCollectionOf<HTMLTableSectionElement>;
/**
* Retrieves the tFoot object of the table.
*/
@@ -11862,7 +12882,7 @@ interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {
/**
* Retrieves a collection of all cells in the table row.
*/
- cells: HTMLCollection;
+ cells: HTMLCollectionOf<HTMLTableDataCellElement | HTMLTableHeaderCellElement>;
/**
* Sets or retrieves the height of the object.
*/
@@ -11870,11 +12890,11 @@ interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {
/**
* Retrieves the position of the object in the rows collection for the table.
*/
- rowIndex: number;
+ readonly rowIndex: number;
/**
* Retrieves the position of the object in the collection.
*/
- sectionRowIndex: number;
+ readonly sectionRowIndex: number;
/**
* Removes the specified cell from the table row, as well as from the cells collection.
* @param index Number that specifies the zero-based position of the cell to remove from the table row. If no value is provided, the last cell in the cells collection is deleted.
@@ -11884,7 +12904,7 @@ interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment {
* Creates a new cell in the table row, and adds the cell to the cells collection.
* @param index Number that specifies where to insert the cell in the tr. The default value is -1, which appends the new cell to the end of the cells collection.
*/
- insertCell(index?: number): HTMLTableCellElement;
+ insertCell(index?: number): HTMLTableDataCellElement;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -11901,7 +12921,7 @@ interface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment {
/**
* Sets or retrieves the number of horizontal rows contained in the object.
*/
- rows: HTMLCollection;
+ rows: HTMLCollectionOf<HTMLTableRowElement>;
/**
* Removes the specified row (tr) from the element and from the rows collection.
* @param index Number that specifies the zero-based position in the rows collection of the row to remove.
@@ -11920,6 +12940,15 @@ declare var HTMLTableSectionElement: {
new(): HTMLTableSectionElement;
}
+interface HTMLTemplateElement extends HTMLElement {
+ readonly content: DocumentFragment;
+}
+
+declare var HTMLTemplateElement: {
+ prototype: HTMLTemplateElement;
+ new(): HTMLTemplateElement;
+}
+
interface HTMLTextAreaElement extends HTMLElement {
/**
* Provides a way to direct a user to a specific field when a document loads. This can provide both direction and convenience for a user, reducing the need to click or tab to a field when a page opens. This attribute is true when present on an element, and false when missing.
@@ -11937,7 +12966,7 @@ interface HTMLTextAreaElement extends HTMLElement {
/**
* Retrieves a reference to the form that the object is embedded in.
*/
- form: HTMLFormElement;
+ readonly form: HTMLFormElement;
/**
* Sets or retrieves the maximum number of characters that the user can enter in a text control.
*/
@@ -11977,15 +13006,15 @@ interface HTMLTextAreaElement extends HTMLElement {
/**
* Retrieves the type of control.
*/
- type: string;
+ readonly type: string;
/**
* Returns the error message that would be displayed if the user submits the form, or an empty string if no error message. It also triggers the standard error message, such as "this is a required field". The result is that the user sees validation messages without actually submitting.
*/
- validationMessage: string;
+ readonly validationMessage: string;
/**
* Returns a ValidityState object that represents the validity states of an element.
*/
- validity: ValidityState;
+ readonly validity: ValidityState;
/**
* Retrieves or sets the text in the entry field of the textArea element.
*/
@@ -11993,20 +13022,17 @@ interface HTMLTextAreaElement extends HTMLElement {
/**
* Returns whether an element will successfully validate based on forms validation rules and constraints.
*/
- willValidate: boolean;
+ readonly willValidate: boolean;
/**
* Sets or retrieves how to handle wordwrapping in the object.
*/
wrap: string;
+ minLength: number;
/**
* Returns whether a form will validate when it is submitted, without having to submit it.
*/
checkValidity(): boolean;
/**
- * Creates a TextRange object for the element.
- */
- createTextRange(): TextRange;
- /**
* Highlights the input area of a form element.
*/
select(): void;
@@ -12044,23 +13070,23 @@ interface HTMLTrackElement extends HTMLElement {
default: boolean;
kind: string;
label: string;
- readyState: number;
+ readonly readyState: number;
src: string;
srclang: string;
- track: TextTrack;
- ERROR: number;
- LOADED: number;
- LOADING: number;
- NONE: number;
+ readonly track: TextTrack;
+ readonly ERROR: number;
+ readonly LOADED: number;
+ readonly LOADING: number;
+ readonly NONE: number;
}
declare var HTMLTrackElement: {
prototype: HTMLTrackElement;
new(): HTMLTrackElement;
- ERROR: number;
- LOADED: number;
- LOADING: number;
- NONE: number;
+ readonly ERROR: number;
+ readonly LOADED: number;
+ readonly LOADING: number;
+ readonly NONE: number;
}
interface HTMLUListElement extends HTMLElement {
@@ -12087,14 +13113,14 @@ interface HTMLVideoElement extends HTMLMediaElement {
*/
height: number;
msHorizontalMirror: boolean;
- msIsLayoutOptimalForPlayback: boolean;
- msIsStereo3D: boolean;
+ readonly msIsLayoutOptimalForPlayback: boolean;
+ readonly msIsStereo3D: boolean;
msStereo3DPackingMode: string;
msStereo3DRenderMode: string;
msZoom: boolean;
- onMSVideoFormatChanged: (ev: Event) => any;
- onMSVideoFrameStepCompleted: (ev: Event) => any;
- onMSVideoOptimalLayoutChanged: (ev: Event) => any;
+ onMSVideoFormatChanged: (this: this, ev: Event) => any;
+ onMSVideoFrameStepCompleted: (this: this, ev: Event) => any;
+ onMSVideoOptimalLayoutChanged: (this: this, ev: Event) => any;
/**
* Gets or sets a URL of an image to display, for example, like a movie poster. This can be a still frame from the video, or another image if no video data is available.
*/
@@ -12102,13 +13128,13 @@ interface HTMLVideoElement extends HTMLMediaElement {
/**
* Gets the intrinsic height of a video in CSS pixels, or zero if the dimensions are not known.
*/
- videoHeight: number;
+ readonly videoHeight: number;
/**
* Gets the intrinsic width of a video in CSS pixels, or zero if the dimensions are not known.
*/
- videoWidth: number;
- webkitDisplayingFullscreen: boolean;
- webkitSupportsFullscreen: boolean;
+ readonly videoWidth: number;
+ readonly webkitDisplayingFullscreen: boolean;
+ readonly webkitSupportsFullscreen: boolean;
/**
* Gets or sets the width of the video element.
*/
@@ -12121,112 +13147,114 @@ interface HTMLVideoElement extends HTMLMediaElement {
webkitEnterFullscreen(): void;
webkitExitFullScreen(): void;
webkitExitFullscreen(): void;
- addEventListener(type: "MSContentZoom", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSManipulationStateChanged", listener: (ev: MSManipulationEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSVideoFormatChanged", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "MSVideoFrameStepCompleted", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "MSVideoOptimalLayoutChanged", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "activate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforecopy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforecut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforedeactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "beforepaste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "copy", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "cut", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "deactivate", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "msneedkey", listener: (ev: MSMediaKeyNeededEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "paste", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "selectstart", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSContentZoom", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureChange", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureDoubleTap", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureEnd", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureHold", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureStart", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureTap", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGotPointerCapture", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSInertiaStart", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSLostPointerCapture", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSManipulationStateChanged", listener: (this: this, ev: MSManipulationEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerCancel", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerDown", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerEnter", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerLeave", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerMove", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOut", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOver", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerUp", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSVideoFormatChanged", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSVideoFrameStepCompleted", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSVideoOptimalLayoutChanged", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "abort", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "activate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ariarequest", listener: (this: this, ev: AriaRequestEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforeactivate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforecopy", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforecut", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforedeactivate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforepaste", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "blur", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplay", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplaythrough", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "change", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "click", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "command", listener: (this: this, ev: CommandEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "contextmenu", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "copy", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "cuechange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "cut", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dblclick", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "deactivate", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drag", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragend", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragenter", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragleave", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragover", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragstart", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drop", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "durationchange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "emptied", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "encrypted", listener: (this: this, ev: MediaEncryptedEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ended", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "focus", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "gotpointercapture", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "input", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "invalid", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "keydown", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keypress", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keyup", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadeddata", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadedmetadata", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadstart", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "lostpointercapture", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousedown", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseenter", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseleave", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousemove", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseout", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseover", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseup", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousewheel", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "msneedkey", listener: (this: this, ev: MSMediaKeyNeededEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "paste", listener: (this: this, ev: ClipboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pause", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "play", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "playing", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointercancel", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerdown", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerenter", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerleave", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointermove", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerout", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerover", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerup", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "progress", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ratechange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "reset", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "scroll", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeked", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeking", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "select", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "selectstart", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "stalled", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "submit", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "suspend", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "timeupdate", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchcancel", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchend", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchmove", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchstart", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "volumechange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "waiting", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenchange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenerror", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "wheel", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -12236,8 +13264,8 @@ declare var HTMLVideoElement: {
}
interface HashChangeEvent extends Event {
- newURL: string;
- oldURL: string;
+ readonly newURL: string | null;
+ readonly oldURL: string | null;
}
declare var HashChangeEvent: {
@@ -12246,8 +13274,8 @@ declare var HashChangeEvent: {
}
interface History {
- length: number;
- state: any;
+ readonly length: number;
+ readonly state: any;
back(distance?: any): void;
forward(distance?: any): void;
go(delta?: any): void;
@@ -12261,31 +13289,31 @@ declare var History: {
}
interface IDBCursor {
- direction: string;
- key: any;
- primaryKey: any;
- source: any;
+ readonly direction: string;
+ key: IDBKeyRange | IDBValidKey;
+ readonly primaryKey: any;
+ source: IDBObjectStore | IDBIndex;
advance(count: number): void;
- continue(key?: any): void;
+ continue(key?: IDBKeyRange | IDBValidKey): void;
delete(): IDBRequest;
update(value: any): IDBRequest;
- NEXT: string;
- NEXT_NO_DUPLICATE: string;
- PREV: string;
- PREV_NO_DUPLICATE: string;
+ readonly NEXT: string;
+ readonly NEXT_NO_DUPLICATE: string;
+ readonly PREV: string;
+ readonly PREV_NO_DUPLICATE: string;
}
declare var IDBCursor: {
prototype: IDBCursor;
new(): IDBCursor;
- NEXT: string;
- NEXT_NO_DUPLICATE: string;
- PREV: string;
- PREV_NO_DUPLICATE: string;
+ readonly NEXT: string;
+ readonly NEXT_NO_DUPLICATE: string;
+ readonly PREV: string;
+ readonly PREV_NO_DUPLICATE: string;
}
interface IDBCursorWithValue extends IDBCursor {
- value: any;
+ readonly value: any;
}
declare var IDBCursorWithValue: {
@@ -12294,17 +13322,19 @@ declare var IDBCursorWithValue: {
}
interface IDBDatabase extends EventTarget {
- name: string;
- objectStoreNames: DOMStringList;
- onabort: (ev: Event) => any;
- onerror: (ev: Event) => any;
- version: string;
+ readonly name: string;
+ readonly objectStoreNames: DOMStringList;
+ onabort: (this: this, ev: Event) => any;
+ onerror: (this: this, ev: ErrorEvent) => any;
+ version: number;
+ onversionchange: (ev: IDBVersionChangeEvent) => any;
close(): void;
createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore;
deleteObjectStore(name: string): void;
- transaction(storeNames: any, mode?: string): IDBTransaction;
- addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
+ transaction(storeNames: string | string[], mode?: string): IDBTransaction;
+ addEventListener(type: "versionchange", listener: (ev: IDBVersionChangeEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "abort", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -12326,15 +13356,15 @@ declare var IDBFactory: {
interface IDBIndex {
keyPath: string | string[];
- name: string;
- objectStore: IDBObjectStore;
- unique: boolean;
+ readonly name: string;
+ readonly objectStore: IDBObjectStore;
+ readonly unique: boolean;
multiEntry: boolean;
- count(key?: any): IDBRequest;
- get(key: any): IDBRequest;
- getKey(key: any): IDBRequest;
- openCursor(range?: IDBKeyRange, direction?: string): IDBRequest;
- openKeyCursor(range?: IDBKeyRange, direction?: string): IDBRequest;
+ count(key?: IDBKeyRange | IDBValidKey): IDBRequest;
+ get(key: IDBKeyRange | IDBValidKey): IDBRequest;
+ getKey(key: IDBKeyRange | IDBValidKey): IDBRequest;
+ openCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
+ openKeyCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
}
declare var IDBIndex: {
@@ -12343,36 +13373,37 @@ declare var IDBIndex: {
}
interface IDBKeyRange {
- lower: any;
- lowerOpen: boolean;
- upper: any;
- upperOpen: boolean;
+ readonly lower: any;
+ readonly lowerOpen: boolean;
+ readonly upper: any;
+ readonly upperOpen: boolean;
}
declare var IDBKeyRange: {
prototype: IDBKeyRange;
new(): IDBKeyRange;
bound(lower: any, upper: any, lowerOpen?: boolean, upperOpen?: boolean): IDBKeyRange;
- lowerBound(bound: any, open?: boolean): IDBKeyRange;
+ lowerBound(lower: any, open?: boolean): IDBKeyRange;
only(value: any): IDBKeyRange;
- upperBound(bound: any, open?: boolean): IDBKeyRange;
+ upperBound(upper: any, open?: boolean): IDBKeyRange;
}
interface IDBObjectStore {
- indexNames: DOMStringList;
- keyPath: string;
- name: string;
- transaction: IDBTransaction;
- add(value: any, key?: any): IDBRequest;
+ readonly indexNames: DOMStringList;
+ keyPath: string | string[];
+ readonly name: string;
+ readonly transaction: IDBTransaction;
+ autoIncrement: boolean;
+ add(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest;
clear(): IDBRequest;
- count(key?: any): IDBRequest;
+ count(key?: IDBKeyRange | IDBValidKey): IDBRequest;
createIndex(name: string, keyPath: string | string[], optionalParameters?: IDBIndexParameters): IDBIndex;
- delete(key: any): IDBRequest;
+ delete(key: IDBKeyRange | IDBValidKey): IDBRequest;
deleteIndex(indexName: string): void;
get(key: any): IDBRequest;
index(name: string): IDBIndex;
- openCursor(range?: any, direction?: string): IDBRequest;
- put(value: any, key?: any): IDBRequest;
+ openCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest;
+ put(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest;
}
declare var IDBObjectStore: {
@@ -12381,12 +13412,12 @@ declare var IDBObjectStore: {
}
interface IDBOpenDBRequest extends IDBRequest {
- onblocked: (ev: Event) => any;
- onupgradeneeded: (ev: IDBVersionChangeEvent) => any;
- addEventListener(type: "blocked", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "success", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "upgradeneeded", listener: (ev: IDBVersionChangeEvent) => any, useCapture?: boolean): void;
+ onblocked: (this: this, ev: Event) => any;
+ onupgradeneeded: (this: this, ev: IDBVersionChangeEvent) => any;
+ addEventListener(type: "blocked", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "success", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "upgradeneeded", listener: (this: this, ev: IDBVersionChangeEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -12396,15 +13427,15 @@ declare var IDBOpenDBRequest: {
}
interface IDBRequest extends EventTarget {
- error: DOMError;
- onerror: (ev: Event) => any;
- onsuccess: (ev: Event) => any;
- readyState: string;
- result: any;
- source: any;
- transaction: IDBTransaction;
- addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "success", listener: (ev: Event) => any, useCapture?: boolean): void;
+ readonly error: DOMError;
+ onerror: (this: this, ev: ErrorEvent) => any;
+ onsuccess: (this: this, ev: Event) => any;
+ readonly readyState: string;
+ readonly result: any;
+ source: IDBObjectStore | IDBIndex | IDBCursor;
+ readonly transaction: IDBTransaction;
+ addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "success", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -12414,34 +13445,34 @@ declare var IDBRequest: {
}
interface IDBTransaction extends EventTarget {
- db: IDBDatabase;
- error: DOMError;
- mode: string;
- onabort: (ev: Event) => any;
- oncomplete: (ev: Event) => any;
- onerror: (ev: Event) => any;
+ readonly db: IDBDatabase;
+ readonly error: DOMError;
+ readonly mode: string;
+ onabort: (this: this, ev: Event) => any;
+ oncomplete: (this: this, ev: Event) => any;
+ onerror: (this: this, ev: ErrorEvent) => any;
abort(): void;
objectStore(name: string): IDBObjectStore;
- READ_ONLY: string;
- READ_WRITE: string;
- VERSION_CHANGE: string;
- addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "complete", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
+ readonly READ_ONLY: string;
+ readonly READ_WRITE: string;
+ readonly VERSION_CHANGE: string;
+ addEventListener(type: "abort", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "complete", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
declare var IDBTransaction: {
prototype: IDBTransaction;
new(): IDBTransaction;
- READ_ONLY: string;
- READ_WRITE: string;
- VERSION_CHANGE: string;
+ readonly READ_ONLY: string;
+ readonly READ_WRITE: string;
+ readonly VERSION_CHANGE: string;
}
interface IDBVersionChangeEvent extends Event {
- newVersion: number;
- oldVersion: number;
+ readonly newVersion: number | null;
+ readonly oldVersion: number;
}
declare var IDBVersionChangeEvent: {
@@ -12451,8 +13482,8 @@ declare var IDBVersionChangeEvent: {
interface ImageData {
data: Uint8ClampedArray;
- height: number;
- width: number;
+ readonly height: number;
+ readonly width: number;
}
declare var ImageData: {
@@ -12462,37 +13493,48 @@ declare var ImageData: {
}
interface KeyboardEvent extends UIEvent {
- altKey: boolean;
- char: string;
- charCode: number;
- ctrlKey: boolean;
- key: string;
- keyCode: number;
- locale: string;
- location: number;
- metaKey: boolean;
- repeat: boolean;
- shiftKey: boolean;
- which: number;
+ readonly altKey: boolean;
+ readonly char: string | null;
+ readonly charCode: number;
+ readonly ctrlKey: boolean;
+ readonly key: string;
+ readonly keyCode: number;
+ readonly locale: string;
+ readonly location: number;
+ readonly metaKey: boolean;
+ readonly repeat: boolean;
+ readonly shiftKey: boolean;
+ readonly which: number;
+ readonly code: string;
getModifierState(keyArg: string): boolean;
initKeyboardEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, keyArg: string, locationArg: number, modifiersListArg: string, repeat: boolean, locale: string): void;
- DOM_KEY_LOCATION_JOYSTICK: number;
- DOM_KEY_LOCATION_LEFT: number;
- DOM_KEY_LOCATION_MOBILE: number;
- DOM_KEY_LOCATION_NUMPAD: number;
- DOM_KEY_LOCATION_RIGHT: number;
- DOM_KEY_LOCATION_STANDARD: number;
+ readonly DOM_KEY_LOCATION_JOYSTICK: number;
+ readonly DOM_KEY_LOCATION_LEFT: number;
+ readonly DOM_KEY_LOCATION_MOBILE: number;
+ readonly DOM_KEY_LOCATION_NUMPAD: number;
+ readonly DOM_KEY_LOCATION_RIGHT: number;
+ readonly DOM_KEY_LOCATION_STANDARD: number;
}
declare var KeyboardEvent: {
prototype: KeyboardEvent;
new(typeArg: string, eventInitDict?: KeyboardEventInit): KeyboardEvent;
- DOM_KEY_LOCATION_JOYSTICK: number;
- DOM_KEY_LOCATION_LEFT: number;
- DOM_KEY_LOCATION_MOBILE: number;
- DOM_KEY_LOCATION_NUMPAD: number;
- DOM_KEY_LOCATION_RIGHT: number;
- DOM_KEY_LOCATION_STANDARD: number;
+ readonly DOM_KEY_LOCATION_JOYSTICK: number;
+ readonly DOM_KEY_LOCATION_LEFT: number;
+ readonly DOM_KEY_LOCATION_MOBILE: number;
+ readonly DOM_KEY_LOCATION_NUMPAD: number;
+ readonly DOM_KEY_LOCATION_RIGHT: number;
+ readonly DOM_KEY_LOCATION_STANDARD: number;
+}
+
+interface ListeningStateChangedEvent extends Event {
+ readonly label: string;
+ readonly state: string;
+}
+
+declare var ListeningStateChangedEvent: {
+ prototype: ListeningStateChangedEvent;
+ new(): ListeningStateChangedEvent;
}
interface Location {
@@ -12500,7 +13542,7 @@ interface Location {
host: string;
hostname: string;
href: string;
- origin: string;
+ readonly origin: string;
pathname: string;
port: string;
protocol: string;
@@ -12517,7 +13559,7 @@ declare var Location: {
}
interface LongRunningScriptDetectedEvent extends Event {
- executionTime: number;
+ readonly executionTime: number;
stopPageScriptExecution: boolean;
}
@@ -12536,40 +13578,50 @@ interface MSApp {
execAsyncAtPriority(asynchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): void;
execAtPriority(synchronousCallback: MSExecAtPriorityFunctionCallback, priority: string, ...args: any[]): any;
getCurrentPriority(): string;
- getHtmlPrintDocumentSourceAsync(htmlDoc: any): any;
+ getHtmlPrintDocumentSourceAsync(htmlDoc: any): PromiseLike<any>;
getViewId(view: any): any;
isTaskScheduledAtPriorityOrHigher(priority: string): boolean;
pageHandlesAllApplicationActivations(enabled: boolean): void;
suppressSubdownloadCredentialPrompts(suppress: boolean): void;
terminateApp(exceptionObject: any): void;
- CURRENT: string;
- HIGH: string;
- IDLE: string;
- NORMAL: string;
+ readonly CURRENT: string;
+ readonly HIGH: string;
+ readonly IDLE: string;
+ readonly NORMAL: string;
}
declare var MSApp: MSApp;
interface MSAppAsyncOperation extends EventTarget {
- error: DOMError;
- oncomplete: (ev: Event) => any;
- onerror: (ev: Event) => any;
- readyState: number;
- result: any;
+ readonly error: DOMError;
+ oncomplete: (this: this, ev: Event) => any;
+ onerror: (this: this, ev: ErrorEvent) => any;
+ readonly readyState: number;
+ readonly result: any;
start(): void;
- COMPLETED: number;
- ERROR: number;
- STARTED: number;
- addEventListener(type: "complete", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
+ readonly COMPLETED: number;
+ readonly ERROR: number;
+ readonly STARTED: number;
+ addEventListener(type: "complete", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
declare var MSAppAsyncOperation: {
prototype: MSAppAsyncOperation;
new(): MSAppAsyncOperation;
- COMPLETED: number;
- ERROR: number;
- STARTED: number;
+ readonly COMPLETED: number;
+ readonly ERROR: number;
+ readonly STARTED: number;
+}
+
+interface MSAssertion {
+ readonly id: string;
+ readonly type: string;
+}
+
+declare var MSAssertion: {
+ prototype: MSAssertion;
+ new(): MSAssertion;
}
interface MSBlobBuilder {
@@ -12582,44 +13634,46 @@ declare var MSBlobBuilder: {
new(): MSBlobBuilder;
}
-interface MSCSSMatrix {
- a: number;
- b: number;
- c: number;
- d: number;
- e: number;
- f: number;
- m11: number;
- m12: number;
- m13: number;
- m14: number;
- m21: number;
- m22: number;
- m23: number;
- m24: number;
- m31: number;
- m32: number;
- m33: number;
- m34: number;
- m41: number;
- m42: number;
- m43: number;
- m44: number;
- inverse(): MSCSSMatrix;
- multiply(secondMatrix: MSCSSMatrix): MSCSSMatrix;
- rotate(angleX: number, angleY?: number, angleZ?: number): MSCSSMatrix;
- rotateAxisAngle(x: number, y: number, z: number, angle: number): MSCSSMatrix;
- scale(scaleX: number, scaleY?: number, scaleZ?: number): MSCSSMatrix;
- setMatrixValue(value: string): void;
- skewX(angle: number): MSCSSMatrix;
- skewY(angle: number): MSCSSMatrix;
- toString(): string;
- translate(x: number, y: number, z?: number): MSCSSMatrix;
+interface MSCredentials {
+ getAssertion(challenge: string, filter?: MSCredentialFilter, params?: MSSignatureParameters): PromiseLike<MSAssertion>;
+ makeCredential(accountInfo: MSAccountInfo, params: MSCredentialParameters[], challenge?: string): PromiseLike<MSAssertion>;
+}
+
+declare var MSCredentials: {
+ prototype: MSCredentials;
+ new(): MSCredentials;
+}
+
+interface MSFIDOCredentialAssertion extends MSAssertion {
+ readonly algorithm: string | Algorithm;
+ readonly attestation: any;
+ readonly publicKey: string;
+ readonly transportHints: string[];
+}
+
+declare var MSFIDOCredentialAssertion: {
+ prototype: MSFIDOCredentialAssertion;
+ new(): MSFIDOCredentialAssertion;
+}
+
+interface MSFIDOSignature {
+ readonly authnrData: string;
+ readonly clientData: string;
+ readonly signature: string;
+}
+
+declare var MSFIDOSignature: {
+ prototype: MSFIDOSignature;
+ new(): MSFIDOSignature;
+}
+
+interface MSFIDOSignatureAssertion extends MSAssertion {
+ readonly signature: MSFIDOSignature;
}
-declare var MSCSSMatrix: {
- prototype: MSCSSMatrix;
- new(text?: string): MSCSSMatrix;
+declare var MSFIDOSignatureAssertion: {
+ prototype: MSFIDOSignatureAssertion;
+ new(): MSFIDOSignatureAssertion;
}
interface MSGesture {
@@ -12634,44 +13688,44 @@ declare var MSGesture: {
}
interface MSGestureEvent extends UIEvent {
- clientX: number;
- clientY: number;
- expansion: number;
- gestureObject: any;
- hwTimestamp: number;
- offsetX: number;
- offsetY: number;
- rotation: number;
- scale: number;
- screenX: number;
- screenY: number;
- translationX: number;
- translationY: number;
- velocityAngular: number;
- velocityExpansion: number;
- velocityX: number;
- velocityY: number;
+ readonly clientX: number;
+ readonly clientY: number;
+ readonly expansion: number;
+ readonly gestureObject: any;
+ readonly hwTimestamp: number;
+ readonly offsetX: number;
+ readonly offsetY: number;
+ readonly rotation: number;
+ readonly scale: number;
+ readonly screenX: number;
+ readonly screenY: number;
+ readonly translationX: number;
+ readonly translationY: number;
+ readonly velocityAngular: number;
+ readonly velocityExpansion: number;
+ readonly velocityX: number;
+ readonly velocityY: number;
initGestureEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, offsetXArg: number, offsetYArg: number, translationXArg: number, translationYArg: number, scaleArg: number, expansionArg: number, rotationArg: number, velocityXArg: number, velocityYArg: number, velocityExpansionArg: number, velocityAngularArg: number, hwTimestampArg: number): void;
- MSGESTURE_FLAG_BEGIN: number;
- MSGESTURE_FLAG_CANCEL: number;
- MSGESTURE_FLAG_END: number;
- MSGESTURE_FLAG_INERTIA: number;
- MSGESTURE_FLAG_NONE: number;
+ readonly MSGESTURE_FLAG_BEGIN: number;
+ readonly MSGESTURE_FLAG_CANCEL: number;
+ readonly MSGESTURE_FLAG_END: number;
+ readonly MSGESTURE_FLAG_INERTIA: number;
+ readonly MSGESTURE_FLAG_NONE: number;
}
declare var MSGestureEvent: {
prototype: MSGestureEvent;
new(): MSGestureEvent;
- MSGESTURE_FLAG_BEGIN: number;
- MSGESTURE_FLAG_CANCEL: number;
- MSGESTURE_FLAG_END: number;
- MSGESTURE_FLAG_INERTIA: number;
- MSGESTURE_FLAG_NONE: number;
+ readonly MSGESTURE_FLAG_BEGIN: number;
+ readonly MSGESTURE_FLAG_CANCEL: number;
+ readonly MSGESTURE_FLAG_END: number;
+ readonly MSGESTURE_FLAG_INERTIA: number;
+ readonly MSGESTURE_FLAG_NONE: number;
}
interface MSGraphicsTrust {
- constrictionActive: boolean;
- status: string;
+ readonly constrictionActive: boolean;
+ readonly status: string;
}
declare var MSGraphicsTrust: {
@@ -12680,12 +13734,12 @@ declare var MSGraphicsTrust: {
}
interface MSHTMLWebViewElement extends HTMLElement {
- canGoBack: boolean;
- canGoForward: boolean;
- containsFullScreenElement: boolean;
- documentTitle: string;
+ readonly canGoBack: boolean;
+ readonly canGoForward: boolean;
+ readonly containsFullScreenElement: boolean;
+ readonly documentTitle: string;
height: number;
- settings: MSWebViewSettings;
+ readonly settings: MSWebViewSettings;
src: string;
width: number;
addWebAllowedObject(name: string, applicationObject: any): void;
@@ -12711,19 +13765,19 @@ declare var MSHTMLWebViewElement: {
}
interface MSInputMethodContext extends EventTarget {
- compositionEndOffset: number;
- compositionStartOffset: number;
- oncandidatewindowhide: (ev: Event) => any;
- oncandidatewindowshow: (ev: Event) => any;
- oncandidatewindowupdate: (ev: Event) => any;
- target: HTMLElement;
+ readonly compositionEndOffset: number;
+ readonly compositionStartOffset: number;
+ oncandidatewindowhide: (this: this, ev: Event) => any;
+ oncandidatewindowshow: (this: this, ev: Event) => any;
+ oncandidatewindowupdate: (this: this, ev: Event) => any;
+ readonly target: HTMLElement;
getCandidateWindowClientRect(): ClientRect;
getCompositionAlternatives(): string[];
hasComposition(): boolean;
isCandidateWindowVisible(): boolean;
- addEventListener(type: "MSCandidateWindowHide", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "MSCandidateWindowShow", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "MSCandidateWindowUpdate", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSCandidateWindowHide", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSCandidateWindowShow", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSCandidateWindowUpdate", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -12733,59 +13787,59 @@ declare var MSInputMethodContext: {
}
interface MSManipulationEvent extends UIEvent {
- currentState: number;
- inertiaDestinationX: number;
- inertiaDestinationY: number;
- lastState: number;
+ readonly currentState: number;
+ readonly inertiaDestinationX: number;
+ readonly inertiaDestinationY: number;
+ readonly lastState: number;
initMSManipulationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, lastState: number, currentState: number): void;
- MS_MANIPULATION_STATE_ACTIVE: number;
- MS_MANIPULATION_STATE_CANCELLED: number;
- MS_MANIPULATION_STATE_COMMITTED: number;
- MS_MANIPULATION_STATE_DRAGGING: number;
- MS_MANIPULATION_STATE_INERTIA: number;
- MS_MANIPULATION_STATE_PRESELECT: number;
- MS_MANIPULATION_STATE_SELECTING: number;
- MS_MANIPULATION_STATE_STOPPED: number;
+ readonly MS_MANIPULATION_STATE_ACTIVE: number;
+ readonly MS_MANIPULATION_STATE_CANCELLED: number;
+ readonly MS_MANIPULATION_STATE_COMMITTED: number;
+ readonly MS_MANIPULATION_STATE_DRAGGING: number;
+ readonly MS_MANIPULATION_STATE_INERTIA: number;
+ readonly MS_MANIPULATION_STATE_PRESELECT: number;
+ readonly MS_MANIPULATION_STATE_SELECTING: number;
+ readonly MS_MANIPULATION_STATE_STOPPED: number;
}
declare var MSManipulationEvent: {
prototype: MSManipulationEvent;
new(): MSManipulationEvent;
- MS_MANIPULATION_STATE_ACTIVE: number;
- MS_MANIPULATION_STATE_CANCELLED: number;
- MS_MANIPULATION_STATE_COMMITTED: number;
- MS_MANIPULATION_STATE_DRAGGING: number;
- MS_MANIPULATION_STATE_INERTIA: number;
- MS_MANIPULATION_STATE_PRESELECT: number;
- MS_MANIPULATION_STATE_SELECTING: number;
- MS_MANIPULATION_STATE_STOPPED: number;
+ readonly MS_MANIPULATION_STATE_ACTIVE: number;
+ readonly MS_MANIPULATION_STATE_CANCELLED: number;
+ readonly MS_MANIPULATION_STATE_COMMITTED: number;
+ readonly MS_MANIPULATION_STATE_DRAGGING: number;
+ readonly MS_MANIPULATION_STATE_INERTIA: number;
+ readonly MS_MANIPULATION_STATE_PRESELECT: number;
+ readonly MS_MANIPULATION_STATE_SELECTING: number;
+ readonly MS_MANIPULATION_STATE_STOPPED: number;
}
interface MSMediaKeyError {
- code: number;
- systemCode: number;
- MS_MEDIA_KEYERR_CLIENT: number;
- MS_MEDIA_KEYERR_DOMAIN: number;
- MS_MEDIA_KEYERR_HARDWARECHANGE: number;
- MS_MEDIA_KEYERR_OUTPUT: number;
- MS_MEDIA_KEYERR_SERVICE: number;
- MS_MEDIA_KEYERR_UNKNOWN: number;
+ readonly code: number;
+ readonly systemCode: number;
+ readonly MS_MEDIA_KEYERR_CLIENT: number;
+ readonly MS_MEDIA_KEYERR_DOMAIN: number;
+ readonly MS_MEDIA_KEYERR_HARDWARECHANGE: number;
+ readonly MS_MEDIA_KEYERR_OUTPUT: number;
+ readonly MS_MEDIA_KEYERR_SERVICE: number;
+ readonly MS_MEDIA_KEYERR_UNKNOWN: number;
}
declare var MSMediaKeyError: {
prototype: MSMediaKeyError;
new(): MSMediaKeyError;
- MS_MEDIA_KEYERR_CLIENT: number;
- MS_MEDIA_KEYERR_DOMAIN: number;
- MS_MEDIA_KEYERR_HARDWARECHANGE: number;
- MS_MEDIA_KEYERR_OUTPUT: number;
- MS_MEDIA_KEYERR_SERVICE: number;
- MS_MEDIA_KEYERR_UNKNOWN: number;
+ readonly MS_MEDIA_KEYERR_CLIENT: number;
+ readonly MS_MEDIA_KEYERR_DOMAIN: number;
+ readonly MS_MEDIA_KEYERR_HARDWARECHANGE: number;
+ readonly MS_MEDIA_KEYERR_OUTPUT: number;
+ readonly MS_MEDIA_KEYERR_SERVICE: number;
+ readonly MS_MEDIA_KEYERR_UNKNOWN: number;
}
interface MSMediaKeyMessageEvent extends Event {
- destinationURL: string;
- message: Uint8Array;
+ readonly destinationURL: string | null;
+ readonly message: Uint8Array;
}
declare var MSMediaKeyMessageEvent: {
@@ -12794,7 +13848,7 @@ declare var MSMediaKeyMessageEvent: {
}
interface MSMediaKeyNeededEvent extends Event {
- initData: Uint8Array;
+ readonly initData: Uint8Array | null;
}
declare var MSMediaKeyNeededEvent: {
@@ -12803,9 +13857,9 @@ declare var MSMediaKeyNeededEvent: {
}
interface MSMediaKeySession extends EventTarget {
- error: MSMediaKeyError;
- keySystem: string;
- sessionId: string;
+ readonly error: MSMediaKeyError | null;
+ readonly keySystem: string;
+ readonly sessionId: string;
close(): void;
update(key: Uint8Array): void;
}
@@ -12816,7 +13870,7 @@ declare var MSMediaKeySession: {
}
interface MSMediaKeys {
- keySystem: string;
+ readonly keySystem: string;
createSession(type: string, initData: Uint8Array, cdmData?: Uint8Array): MSMediaKeySession;
}
@@ -12824,40 +13878,22 @@ declare var MSMediaKeys: {
prototype: MSMediaKeys;
new(keySystem: string): MSMediaKeys;
isTypeSupported(keySystem: string, type?: string): boolean;
-}
-
-interface MSMimeTypesCollection {
- length: number;
-}
-
-declare var MSMimeTypesCollection: {
- prototype: MSMimeTypesCollection;
- new(): MSMimeTypesCollection;
-}
-
-interface MSPluginsCollection {
- length: number;
- refresh(reload?: boolean): void;
-}
-
-declare var MSPluginsCollection: {
- prototype: MSPluginsCollection;
- new(): MSPluginsCollection;
+ isTypeSupportedWithFeatures(keySystem: string, type?: string): string;
}
interface MSPointerEvent extends MouseEvent {
- currentPoint: any;
- height: number;
- hwTimestamp: number;
- intermediatePoints: any;
- isPrimary: boolean;
- pointerId: number;
- pointerType: any;
- pressure: number;
- rotation: number;
- tiltX: number;
- tiltY: number;
- width: number;
+ readonly currentPoint: any;
+ readonly height: number;
+ readonly hwTimestamp: number;
+ readonly intermediatePoints: any;
+ readonly isPrimary: boolean;
+ readonly pointerId: number;
+ readonly pointerType: any;
+ readonly pressure: number;
+ readonly rotation: number;
+ readonly tiltX: number;
+ readonly tiltY: number;
+ readonly width: number;
getCurrentPoint(element: Element): void;
getIntermediatePoints(element: Element): void;
initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void;
@@ -12869,7 +13905,7 @@ declare var MSPointerEvent: {
}
interface MSRangeCollection {
- length: number;
+ readonly length: number;
item(index: number): Range;
[index: number]: Range;
}
@@ -12880,8 +13916,8 @@ declare var MSRangeCollection: {
}
interface MSSiteModeEvent extends Event {
- actionURL: string;
- buttonID: number;
+ readonly actionURL: string;
+ readonly buttonID: number;
}
declare var MSSiteModeEvent: {
@@ -12890,7 +13926,7 @@ declare var MSSiteModeEvent: {
}
interface MSStream {
- type: string;
+ readonly type: string;
msClose(): void;
msDetachStream(): any;
}
@@ -12901,7 +13937,7 @@ declare var MSStream: {
}
interface MSStreamReader extends EventTarget, MSBaseReader {
- error: DOMError;
+ readonly error: DOMError;
readAsArrayBuffer(stream: MSStream, size?: number): void;
readAsBinaryString(stream: MSStream, size?: number): void;
readAsBlob(stream: MSStream, size?: number): void;
@@ -12916,34 +13952,34 @@ declare var MSStreamReader: {
}
interface MSWebViewAsyncOperation extends EventTarget {
- error: DOMError;
- oncomplete: (ev: Event) => any;
- onerror: (ev: Event) => any;
- readyState: number;
- result: any;
- target: MSHTMLWebViewElement;
- type: number;
+ readonly error: DOMError;
+ oncomplete: (this: this, ev: Event) => any;
+ onerror: (this: this, ev: ErrorEvent) => any;
+ readonly readyState: number;
+ readonly result: any;
+ readonly target: MSHTMLWebViewElement;
+ readonly type: number;
start(): void;
- COMPLETED: number;
- ERROR: number;
- STARTED: number;
- TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number;
- TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number;
- TYPE_INVOKE_SCRIPT: number;
- addEventListener(type: "complete", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
+ readonly COMPLETED: number;
+ readonly ERROR: number;
+ readonly STARTED: number;
+ readonly TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number;
+ readonly TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number;
+ readonly TYPE_INVOKE_SCRIPT: number;
+ addEventListener(type: "complete", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
declare var MSWebViewAsyncOperation: {
prototype: MSWebViewAsyncOperation;
new(): MSWebViewAsyncOperation;
- COMPLETED: number;
- ERROR: number;
- STARTED: number;
- TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number;
- TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number;
- TYPE_INVOKE_SCRIPT: number;
+ readonly COMPLETED: number;
+ readonly ERROR: number;
+ readonly STARTED: number;
+ readonly TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number;
+ readonly TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number;
+ readonly TYPE_INVOKE_SCRIPT: number;
}
interface MSWebViewSettings {
@@ -12956,6 +13992,32 @@ declare var MSWebViewSettings: {
new(): MSWebViewSettings;
}
+interface MediaDeviceInfo {
+ readonly deviceId: string;
+ readonly groupId: string;
+ readonly kind: string;
+ readonly label: string;
+}
+
+declare var MediaDeviceInfo: {
+ prototype: MediaDeviceInfo;
+ new(): MediaDeviceInfo;
+}
+
+interface MediaDevices extends EventTarget {
+ ondevicechange: (this: this, ev: Event) => any;
+ enumerateDevices(): any;
+ getSupportedConstraints(): MediaTrackSupportedConstraints;
+ getUserMedia(constraints: MediaStreamConstraints): PromiseLike<MediaStream>;
+ addEventListener(type: "devicechange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MediaDevices: {
+ prototype: MediaDevices;
+ new(): MediaDevices;
+}
+
interface MediaElementAudioSourceNode extends AudioNode {
}
@@ -12964,28 +14026,98 @@ declare var MediaElementAudioSourceNode: {
new(): MediaElementAudioSourceNode;
}
+interface MediaEncryptedEvent extends Event {
+ readonly initData: ArrayBuffer | null;
+ readonly initDataType: string;
+}
+
+declare var MediaEncryptedEvent: {
+ prototype: MediaEncryptedEvent;
+ new(type: string, eventInitDict?: MediaEncryptedEventInit): MediaEncryptedEvent;
+}
+
interface MediaError {
- code: number;
- msExtendedCode: number;
- MEDIA_ERR_ABORTED: number;
- MEDIA_ERR_DECODE: number;
- MEDIA_ERR_NETWORK: number;
- MEDIA_ERR_SRC_NOT_SUPPORTED: number;
- MS_MEDIA_ERR_ENCRYPTED: number;
+ readonly code: number;
+ readonly msExtendedCode: number;
+ readonly MEDIA_ERR_ABORTED: number;
+ readonly MEDIA_ERR_DECODE: number;
+ readonly MEDIA_ERR_NETWORK: number;
+ readonly MEDIA_ERR_SRC_NOT_SUPPORTED: number;
+ readonly MS_MEDIA_ERR_ENCRYPTED: number;
}
declare var MediaError: {
prototype: MediaError;
new(): MediaError;
- MEDIA_ERR_ABORTED: number;
- MEDIA_ERR_DECODE: number;
- MEDIA_ERR_NETWORK: number;
- MEDIA_ERR_SRC_NOT_SUPPORTED: number;
- MS_MEDIA_ERR_ENCRYPTED: number;
+ readonly MEDIA_ERR_ABORTED: number;
+ readonly MEDIA_ERR_DECODE: number;
+ readonly MEDIA_ERR_NETWORK: number;
+ readonly MEDIA_ERR_SRC_NOT_SUPPORTED: number;
+ readonly MS_MEDIA_ERR_ENCRYPTED: number;
+}
+
+interface MediaKeyMessageEvent extends Event {
+ readonly message: ArrayBuffer;
+ readonly messageType: string;
+}
+
+declare var MediaKeyMessageEvent: {
+ prototype: MediaKeyMessageEvent;
+ new(type: string, eventInitDict?: MediaKeyMessageEventInit): MediaKeyMessageEvent;
+}
+
+interface MediaKeySession extends EventTarget {
+ readonly closed: PromiseLike<void>;
+ readonly expiration: number;
+ readonly keyStatuses: MediaKeyStatusMap;
+ readonly sessionId: string;
+ close(): PromiseLike<void>;
+ generateRequest(initDataType: string, initData: any): PromiseLike<void>;
+ load(sessionId: string): PromiseLike<boolean>;
+ remove(): PromiseLike<void>;
+ update(response: any): PromiseLike<void>;
+}
+
+declare var MediaKeySession: {
+ prototype: MediaKeySession;
+ new(): MediaKeySession;
+}
+
+interface MediaKeyStatusMap {
+ readonly size: number;
+ forEach(callback: ForEachCallback): void;
+ get(keyId: any): string;
+ has(keyId: any): boolean;
+}
+
+declare var MediaKeyStatusMap: {
+ prototype: MediaKeyStatusMap;
+ new(): MediaKeyStatusMap;
+}
+
+interface MediaKeySystemAccess {
+ readonly keySystem: string;
+ createMediaKeys(): PromiseLike<MediaKeys>;
+ getConfiguration(): MediaKeySystemConfiguration;
+}
+
+declare var MediaKeySystemAccess: {
+ prototype: MediaKeySystemAccess;
+ new(): MediaKeySystemAccess;
+}
+
+interface MediaKeys {
+ createSession(sessionType?: string): MediaKeySession;
+ setServerCertificate(serverCertificate: any): PromiseLike<void>;
+}
+
+declare var MediaKeys: {
+ prototype: MediaKeys;
+ new(): MediaKeys;
}
interface MediaList {
- length: number;
+ readonly length: number;
mediaText: string;
appendMedium(newMedium: string): void;
deleteMedium(oldMedium: string): void;
@@ -13000,8 +14132,8 @@ declare var MediaList: {
}
interface MediaQueryList {
- matches: boolean;
- media: string;
+ readonly matches: boolean;
+ readonly media: string;
addListener(listener: MediaQueryListListener): void;
removeListener(listener: MediaQueryListListener): void;
}
@@ -13012,10 +14144,10 @@ declare var MediaQueryList: {
}
interface MediaSource extends EventTarget {
- activeSourceBuffers: SourceBufferList;
+ readonly activeSourceBuffers: SourceBufferList;
duration: number;
- readyState: number;
- sourceBuffers: SourceBufferList;
+ readonly readyState: string;
+ readonly sourceBuffers: SourceBufferList;
addSourceBuffer(type: string): SourceBuffer;
endOfStream(error?: number): void;
removeSourceBuffer(sourceBuffer: SourceBuffer): void;
@@ -13027,9 +14159,104 @@ declare var MediaSource: {
isTypeSupported(type: string): boolean;
}
+interface MediaStream extends EventTarget {
+ readonly active: boolean;
+ readonly id: string;
+ onactive: (this: this, ev: Event) => any;
+ onaddtrack: (this: this, ev: TrackEvent) => any;
+ oninactive: (this: this, ev: Event) => any;
+ onremovetrack: (this: this, ev: TrackEvent) => any;
+ addTrack(track: MediaStreamTrack): void;
+ clone(): MediaStream;
+ getAudioTracks(): MediaStreamTrack[];
+ getTrackById(trackId: string): MediaStreamTrack | null;
+ getTracks(): MediaStreamTrack[];
+ getVideoTracks(): MediaStreamTrack[];
+ removeTrack(track: MediaStreamTrack): void;
+ stop(): void;
+ addEventListener(type: "active", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "addtrack", listener: (this: this, ev: TrackEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "inactive", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "removetrack", listener: (this: this, ev: TrackEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MediaStream: {
+ prototype: MediaStream;
+ new(streamOrTracks?: MediaStream | MediaStreamTrack[]): MediaStream;
+}
+
+interface MediaStreamAudioSourceNode extends AudioNode {
+}
+
+declare var MediaStreamAudioSourceNode: {
+ prototype: MediaStreamAudioSourceNode;
+ new(): MediaStreamAudioSourceNode;
+}
+
+interface MediaStreamError {
+ readonly constraintName: string | null;
+ readonly message: string | null;
+ readonly name: string;
+}
+
+declare var MediaStreamError: {
+ prototype: MediaStreamError;
+ new(): MediaStreamError;
+}
+
+interface MediaStreamErrorEvent extends Event {
+ readonly error: MediaStreamError | null;
+}
+
+declare var MediaStreamErrorEvent: {
+ prototype: MediaStreamErrorEvent;
+ new(type: string, eventInitDict?: MediaStreamErrorEventInit): MediaStreamErrorEvent;
+}
+
+interface MediaStreamTrack extends EventTarget {
+ enabled: boolean;
+ readonly id: string;
+ readonly kind: string;
+ readonly label: string;
+ readonly muted: boolean;
+ onended: (this: this, ev: MediaStreamErrorEvent) => any;
+ onmute: (this: this, ev: Event) => any;
+ onoverconstrained: (this: this, ev: MediaStreamErrorEvent) => any;
+ onunmute: (this: this, ev: Event) => any;
+ readonly readonly: boolean;
+ readonly readyState: string;
+ readonly remote: boolean;
+ applyConstraints(constraints: MediaTrackConstraints): PromiseLike<void>;
+ clone(): MediaStreamTrack;
+ getCapabilities(): MediaTrackCapabilities;
+ getConstraints(): MediaTrackConstraints;
+ getSettings(): MediaTrackSettings;
+ stop(): void;
+ addEventListener(type: "ended", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mute", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "overconstrained", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "unmute", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var MediaStreamTrack: {
+ prototype: MediaStreamTrack;
+ new(): MediaStreamTrack;
+}
+
+interface MediaStreamTrackEvent extends Event {
+ readonly track: MediaStreamTrack;
+}
+
+declare var MediaStreamTrackEvent: {
+ prototype: MediaStreamTrackEvent;
+ new(type: string, eventInitDict?: MediaStreamTrackEventInit): MediaStreamTrackEvent;
+}
+
interface MessageChannel {
- port1: MessagePort;
- port2: MessagePort;
+ readonly port1: MessagePort;
+ readonly port2: MessagePort;
}
declare var MessageChannel: {
@@ -13038,10 +14265,10 @@ declare var MessageChannel: {
}
interface MessageEvent extends Event {
- data: any;
- origin: string;
- ports: any;
- source: Window;
+ readonly data: any;
+ readonly origin: string;
+ readonly ports: any;
+ readonly source: Window;
initMessageEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, dataArg: any, originArg: string, lastEventIdArg: string, sourceArg: Window): void;
}
@@ -13051,11 +14278,11 @@ declare var MessageEvent: {
}
interface MessagePort extends EventTarget {
- onmessage: (ev: MessageEvent) => any;
+ onmessage: (this: this, ev: MessageEvent) => any;
close(): void;
postMessage(message?: any, ports?: any): void;
start(): void;
- addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "message", listener: (this: this, ev: MessageEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -13065,10 +14292,10 @@ declare var MessagePort: {
}
interface MimeType {
- description: string;
- enabledPlugin: Plugin;
- suffixes: string;
- type: string;
+ readonly description: string;
+ readonly enabledPlugin: Plugin;
+ readonly suffixes: string;
+ readonly type: string;
}
declare var MimeType: {
@@ -13077,7 +14304,7 @@ declare var MimeType: {
}
interface MimeTypeArray {
- length: number;
+ readonly length: number;
item(index: number): Plugin;
namedItem(type: string): Plugin;
[index: number]: Plugin;
@@ -13089,30 +14316,30 @@ declare var MimeTypeArray: {
}
interface MouseEvent extends UIEvent {
- altKey: boolean;
- button: number;
- buttons: number;
- clientX: number;
- clientY: number;
- ctrlKey: boolean;
- fromElement: Element;
- layerX: number;
- layerY: number;
- metaKey: boolean;
- movementX: number;
- movementY: number;
- offsetX: number;
- offsetY: number;
- pageX: number;
- pageY: number;
- relatedTarget: EventTarget;
- screenX: number;
- screenY: number;
- shiftKey: boolean;
- toElement: Element;
- which: number;
- x: number;
- y: number;
+ readonly altKey: boolean;
+ readonly button: number;
+ readonly buttons: number;
+ readonly clientX: number;
+ readonly clientY: number;
+ readonly ctrlKey: boolean;
+ readonly fromElement: Element;
+ readonly layerX: number;
+ readonly layerY: number;
+ readonly metaKey: boolean;
+ readonly movementX: number;
+ readonly movementY: number;
+ readonly offsetX: number;
+ readonly offsetY: number;
+ readonly pageX: number;
+ readonly pageY: number;
+ readonly relatedTarget: EventTarget;
+ readonly screenX: number;
+ readonly screenY: number;
+ readonly shiftKey: boolean;
+ readonly toElement: Element;
+ readonly which: number;
+ readonly x: number;
+ readonly y: number;
getModifierState(keyArg: string): boolean;
initMouseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget): void;
}
@@ -13122,36 +14349,24 @@ declare var MouseEvent: {
new(typeArg: string, eventInitDict?: MouseEventInit): MouseEvent;
}
-interface MouseWheelEvent extends MouseEvent {
- wheelDelta: number;
- wheelDeltaX: number;
- wheelDeltaY: number;
- initMouseWheelEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, buttonArg: number, relatedTargetArg: EventTarget, modifiersListArg: string, wheelDeltaArg: number): void;
-}
-
-declare var MouseWheelEvent: {
- prototype: MouseWheelEvent;
- new(): MouseWheelEvent;
-}
-
interface MutationEvent extends Event {
- attrChange: number;
- attrName: string;
- newValue: string;
- prevValue: string;
- relatedNode: Node;
+ readonly attrChange: number;
+ readonly attrName: string;
+ readonly newValue: string;
+ readonly prevValue: string;
+ readonly relatedNode: Node;
initMutationEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, relatedNodeArg: Node, prevValueArg: string, newValueArg: string, attrNameArg: string, attrChangeArg: number): void;
- ADDITION: number;
- MODIFICATION: number;
- REMOVAL: number;
+ readonly ADDITION: number;
+ readonly MODIFICATION: number;
+ readonly REMOVAL: number;
}
declare var MutationEvent: {
prototype: MutationEvent;
new(): MutationEvent;
- ADDITION: number;
- MODIFICATION: number;
- REMOVAL: number;
+ readonly ADDITION: number;
+ readonly MODIFICATION: number;
+ readonly REMOVAL: number;
}
interface MutationObserver {
@@ -13166,15 +14381,15 @@ declare var MutationObserver: {
}
interface MutationRecord {
- addedNodes: NodeList;
- attributeName: string;
- attributeNamespace: string;
- nextSibling: Node;
- oldValue: string;
- previousSibling: Node;
- removedNodes: NodeList;
- target: Node;
- type: string;
+ readonly addedNodes: NodeList;
+ readonly attributeName: string | null;
+ readonly attributeNamespace: string | null;
+ readonly nextSibling: Node | null;
+ readonly oldValue: string | null;
+ readonly previousSibling: Node | null;
+ readonly removedNodes: NodeList;
+ readonly target: Node;
+ readonly type: string;
}
declare var MutationRecord: {
@@ -13183,12 +14398,12 @@ declare var MutationRecord: {
}
interface NamedNodeMap {
- length: number;
+ readonly length: number;
getNamedItem(name: string): Attr;
- getNamedItemNS(namespaceURI: string, localName: string): Attr;
+ getNamedItemNS(namespaceURI: string | null, localName: string | null): Attr;
item(index: number): Attr;
removeNamedItem(name: string): Attr;
- removeNamedItemNS(namespaceURI: string, localName: string): Attr;
+ removeNamedItemNS(namespaceURI: string | null, localName: string | null): Attr;
setNamedItem(arg: Attr): Attr;
setNamedItemNS(arg: Attr): Attr;
[index: number]: Attr;
@@ -13200,8 +14415,8 @@ declare var NamedNodeMap: {
}
interface NavigationCompletedEvent extends NavigationEvent {
- isSuccess: boolean;
- webErrorStatus: number;
+ readonly isSuccess: boolean;
+ readonly webErrorStatus: number;
}
declare var NavigationCompletedEvent: {
@@ -13210,7 +14425,7 @@ declare var NavigationCompletedEvent: {
}
interface NavigationEvent extends Event {
- uri: string;
+ readonly uri: string;
}
declare var NavigationEvent: {
@@ -13219,7 +14434,7 @@ declare var NavigationEvent: {
}
interface NavigationEventWithReferrer extends NavigationEvent {
- referer: string;
+ readonly referer: string;
}
declare var NavigationEventWithReferrer: {
@@ -13227,27 +14442,22 @@ declare var NavigationEventWithReferrer: {
new(): NavigationEventWithReferrer;
}
-interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorContentUtils, NavigatorStorageUtils, NavigatorGeolocation, MSNavigatorDoNotTrack, MSFileSaver {
- appCodeName: string;
- appMinorVersion: string;
- browserLanguage: string;
- connectionSpeed: number;
- cookieEnabled: boolean;
- cpuClass: string;
- language: string;
- maxTouchPoints: number;
- mimeTypes: MSMimeTypesCollection;
- msManipulationViewsEnabled: boolean;
- msMaxTouchPoints: number;
- msPointerEnabled: boolean;
- plugins: MSPluginsCollection;
- pointerEnabled: boolean;
- systemLanguage: string;
- userLanguage: string;
- webdriver: boolean;
+interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorContentUtils, NavigatorStorageUtils, NavigatorGeolocation, MSNavigatorDoNotTrack, MSFileSaver, NavigatorUserMedia {
+ readonly appCodeName: string;
+ readonly cookieEnabled: boolean;
+ readonly language: string;
+ readonly maxTouchPoints: number;
+ readonly mimeTypes: MimeTypeArray;
+ readonly msManipulationViewsEnabled: boolean;
+ readonly msMaxTouchPoints: number;
+ readonly msPointerEnabled: boolean;
+ readonly plugins: PluginArray;
+ readonly pointerEnabled: boolean;
+ readonly webdriver: boolean;
getGamepads(): Gamepad[];
javaEnabled(): boolean;
msLaunchUri(uri: string, successCallback?: MSLaunchUriCallback, noHandlerCallback?: MSLaunchUriCallback): void;
+ requestMediaKeySystemAccess(keySystem: string, supportedConfigurations: MediaKeySystemConfiguration[]): PromiseLike<MediaKeySystemAccess>;
vibrate(pattern: number | number[]): boolean;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -13258,79 +14468,78 @@ declare var Navigator: {
}
interface Node extends EventTarget {
- attributes: NamedNodeMap;
- baseURI: string;
- childNodes: NodeList;
- firstChild: Node;
- lastChild: Node;
- localName: string;
- namespaceURI: string;
- nextSibling: Node;
- nodeName: string;
- nodeType: number;
- nodeValue: string;
- ownerDocument: Document;
- parentElement: HTMLElement;
- parentNode: Node;
- prefix: string;
- previousSibling: Node;
- textContent: string;
+ readonly attributes: NamedNodeMap;
+ readonly baseURI: string | null;
+ readonly childNodes: NodeList;
+ readonly firstChild: Node;
+ readonly lastChild: Node;
+ readonly localName: string | null;
+ readonly namespaceURI: string | null;
+ readonly nextSibling: Node;
+ readonly nodeName: string;
+ readonly nodeType: number;
+ nodeValue: string | null;
+ readonly ownerDocument: Document;
+ readonly parentElement: HTMLElement;
+ readonly parentNode: Node;
+ readonly previousSibling: Node;
+ textContent: string | null;
appendChild(newChild: Node): Node;
cloneNode(deep?: boolean): Node;
compareDocumentPosition(other: Node): number;
+ contains(child: Node): boolean;
hasAttributes(): boolean;
hasChildNodes(): boolean;
- insertBefore(newChild: Node, refChild?: Node): Node;
- isDefaultNamespace(namespaceURI: string): boolean;
+ insertBefore(newChild: Node, refChild: Node | null): Node;
+ isDefaultNamespace(namespaceURI: string | null): boolean;
isEqualNode(arg: Node): boolean;
isSameNode(other: Node): boolean;
- lookupNamespaceURI(prefix: string): string;
- lookupPrefix(namespaceURI: string): string;
+ lookupNamespaceURI(prefix: string | null): string | null;
+ lookupPrefix(namespaceURI: string | null): string | null;
normalize(): void;
removeChild(oldChild: Node): Node;
replaceChild(newChild: Node, oldChild: Node): Node;
- contains(node: Node): boolean;
- ATTRIBUTE_NODE: number;
- CDATA_SECTION_NODE: number;
- COMMENT_NODE: number;
- DOCUMENT_FRAGMENT_NODE: number;
- DOCUMENT_NODE: number;
- DOCUMENT_POSITION_CONTAINED_BY: number;
- DOCUMENT_POSITION_CONTAINS: number;
- DOCUMENT_POSITION_DISCONNECTED: number;
- DOCUMENT_POSITION_FOLLOWING: number;
- DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
- DOCUMENT_POSITION_PRECEDING: number;
- DOCUMENT_TYPE_NODE: number;
- ELEMENT_NODE: number;
- ENTITY_NODE: number;
- ENTITY_REFERENCE_NODE: number;
- NOTATION_NODE: number;
- PROCESSING_INSTRUCTION_NODE: number;
- TEXT_NODE: number;
+ readonly ATTRIBUTE_NODE: number;
+ readonly CDATA_SECTION_NODE: number;
+ readonly COMMENT_NODE: number;
+ readonly DOCUMENT_FRAGMENT_NODE: number;
+ readonly DOCUMENT_NODE: number;
+ readonly DOCUMENT_POSITION_CONTAINED_BY: number;
+ readonly DOCUMENT_POSITION_CONTAINS: number;
+ readonly DOCUMENT_POSITION_DISCONNECTED: number;
+ readonly DOCUMENT_POSITION_FOLLOWING: number;
+ readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
+ readonly DOCUMENT_POSITION_PRECEDING: number;
+ readonly DOCUMENT_TYPE_NODE: number;
+ readonly ELEMENT_NODE: number;
+ readonly ENTITY_NODE: number;
+ readonly ENTITY_REFERENCE_NODE: number;
+ readonly NOTATION_NODE: number;
+ readonly PROCESSING_INSTRUCTION_NODE: number;
+ readonly TEXT_NODE: number;
}
declare var Node: {
prototype: Node;
new(): Node;
- ATTRIBUTE_NODE: number;
- CDATA_SECTION_NODE: number;
- COMMENT_NODE: number;
- DOCUMENT_FRAGMENT_NODE: number;
- DOCUMENT_NODE: number;
- DOCUMENT_POSITION_CONTAINED_BY: number;
- DOCUMENT_POSITION_CONTAINS: number;
- DOCUMENT_POSITION_DISCONNECTED: number;
- DOCUMENT_POSITION_FOLLOWING: number;
- DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
- DOCUMENT_POSITION_PRECEDING: number;
- DOCUMENT_TYPE_NODE: number;
- ELEMENT_NODE: number;
- ENTITY_NODE: number;
- ENTITY_REFERENCE_NODE: number;
- NOTATION_NODE: number;
- PROCESSING_INSTRUCTION_NODE: number;
- TEXT_NODE: number;
+ readonly ATTRIBUTE_NODE: number;
+ readonly CDATA_SECTION_NODE: number;
+ readonly COMMENT_NODE: number;
+ readonly DOCUMENT_FRAGMENT_NODE: number;
+ readonly DOCUMENT_NODE: number;
+ readonly DOCUMENT_POSITION_CONTAINED_BY: number;
+ readonly DOCUMENT_POSITION_CONTAINS: number;
+ readonly DOCUMENT_POSITION_DISCONNECTED: number;
+ readonly DOCUMENT_POSITION_FOLLOWING: number;
+ readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC: number;
+ readonly DOCUMENT_POSITION_PRECEDING: number;
+ readonly DOCUMENT_TYPE_NODE: number;
+ readonly ELEMENT_NODE: number;
+ readonly ENTITY_NODE: number;
+ readonly ENTITY_REFERENCE_NODE: number;
+ readonly NOTATION_NODE: number;
+ readonly PROCESSING_INSTRUCTION_NODE: number;
+ readonly TEXT_NODE: number;
}
interface NodeFilter {
@@ -13338,29 +14547,29 @@ interface NodeFilter {
}
declare var NodeFilter: {
- FILTER_ACCEPT: number;
- FILTER_REJECT: number;
- FILTER_SKIP: number;
- SHOW_ALL: number;
- SHOW_ATTRIBUTE: number;
- SHOW_CDATA_SECTION: number;
- SHOW_COMMENT: number;
- SHOW_DOCUMENT: number;
- SHOW_DOCUMENT_FRAGMENT: number;
- SHOW_DOCUMENT_TYPE: number;
- SHOW_ELEMENT: number;
- SHOW_ENTITY: number;
- SHOW_ENTITY_REFERENCE: number;
- SHOW_NOTATION: number;
- SHOW_PROCESSING_INSTRUCTION: number;
- SHOW_TEXT: number;
+ readonly FILTER_ACCEPT: number;
+ readonly FILTER_REJECT: number;
+ readonly FILTER_SKIP: number;
+ readonly SHOW_ALL: number;
+ readonly SHOW_ATTRIBUTE: number;
+ readonly SHOW_CDATA_SECTION: number;
+ readonly SHOW_COMMENT: number;
+ readonly SHOW_DOCUMENT: number;
+ readonly SHOW_DOCUMENT_FRAGMENT: number;
+ readonly SHOW_DOCUMENT_TYPE: number;
+ readonly SHOW_ELEMENT: number;
+ readonly SHOW_ENTITY: number;
+ readonly SHOW_ENTITY_REFERENCE: number;
+ readonly SHOW_NOTATION: number;
+ readonly SHOW_PROCESSING_INSTRUCTION: number;
+ readonly SHOW_TEXT: number;
}
interface NodeIterator {
- expandEntityReferences: boolean;
- filter: NodeFilter;
- root: Node;
- whatToShow: number;
+ readonly expandEntityReferences: boolean;
+ readonly filter: NodeFilter;
+ readonly root: Node;
+ readonly whatToShow: number;
detach(): void;
nextNode(): Node;
previousNode(): Node;
@@ -13372,7 +14581,7 @@ declare var NodeIterator: {
}
interface NodeList {
- length: number;
+ readonly length: number;
item(index: number): Node;
[index: number]: Node;
}
@@ -13391,13 +14600,13 @@ declare var OES_element_index_uint: {
}
interface OES_standard_derivatives {
- FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;
+ readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;
}
declare var OES_standard_derivatives: {
prototype: OES_standard_derivatives;
new(): OES_standard_derivatives;
- FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;
+ readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number;
}
interface OES_texture_float {
@@ -13417,7 +14626,7 @@ declare var OES_texture_float_linear: {
}
interface OfflineAudioCompletionEvent extends Event {
- renderedBuffer: AudioBuffer;
+ readonly renderedBuffer: AudioBuffer;
}
declare var OfflineAudioCompletionEvent: {
@@ -13426,9 +14635,9 @@ declare var OfflineAudioCompletionEvent: {
}
interface OfflineAudioContext extends AudioContext {
- oncomplete: (ev: Event) => any;
- startRendering(): void;
- addEventListener(type: "complete", listener: (ev: Event) => any, useCapture?: boolean): void;
+ oncomplete: (this: this, ev: Event) => any;
+ startRendering(): PromiseLike<AudioBuffer>;
+ addEventListener(type: "complete", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -13438,14 +14647,14 @@ declare var OfflineAudioContext: {
}
interface OscillatorNode extends AudioNode {
- detune: AudioParam;
- frequency: AudioParam;
- onended: (ev: Event) => any;
+ readonly detune: AudioParam;
+ readonly frequency: AudioParam;
+ onended: (this: this, ev: MediaStreamErrorEvent) => any;
type: string;
setPeriodicWave(periodicWave: PeriodicWave): void;
start(when?: number): void;
stop(when?: number): void;
- addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "ended", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -13454,8 +14663,25 @@ declare var OscillatorNode: {
new(): OscillatorNode;
}
+interface OverflowEvent extends UIEvent {
+ readonly horizontalOverflow: boolean;
+ readonly orient: number;
+ readonly verticalOverflow: boolean;
+ readonly BOTH: number;
+ readonly HORIZONTAL: number;
+ readonly VERTICAL: number;
+}
+
+declare var OverflowEvent: {
+ prototype: OverflowEvent;
+ new(): OverflowEvent;
+ readonly BOTH: number;
+ readonly HORIZONTAL: number;
+ readonly VERTICAL: number;
+}
+
interface PageTransitionEvent extends Event {
- persisted: boolean;
+ readonly persisted: boolean;
}
declare var PageTransitionEvent: {
@@ -13483,24 +14709,24 @@ declare var PannerNode: {
}
interface PerfWidgetExternal {
- activeNetworkRequestCount: number;
- averageFrameTime: number;
- averagePaintTime: number;
- extraInformationEnabled: boolean;
- independentRenderingEnabled: boolean;
- irDisablingContentString: string;
- irStatusAvailable: boolean;
- maxCpuSpeed: number;
- paintRequestsPerSecond: number;
- performanceCounter: number;
- performanceCounterFrequency: number;
+ readonly activeNetworkRequestCount: number;
+ readonly averageFrameTime: number;
+ readonly averagePaintTime: number;
+ readonly extraInformationEnabled: boolean;
+ readonly independentRenderingEnabled: boolean;
+ readonly irDisablingContentString: string;
+ readonly irStatusAvailable: boolean;
+ readonly maxCpuSpeed: number;
+ readonly paintRequestsPerSecond: number;
+ readonly performanceCounter: number;
+ readonly performanceCounterFrequency: number;
addEventListener(eventType: string, callback: Function): void;
getMemoryUsage(): number;
getProcessCpuUsage(): number;
- getRecentCpuUsage(last: number): any;
- getRecentFrames(last: number): any;
- getRecentMemoryUsage(last: number): any;
- getRecentPaintRequests(last: number): any;
+ getRecentCpuUsage(last: number | null): any;
+ getRecentFrames(last: number | null): any;
+ getRecentMemoryUsage(last: number | null): any;
+ getRecentPaintRequests(last: number | null): any;
removeEventListener(eventType: string, callback: Function): void;
repositionWindow(x: number, y: number): void;
resizeWindow(width: number, height: number): void;
@@ -13512,8 +14738,8 @@ declare var PerfWidgetExternal: {
}
interface Performance {
- navigation: PerformanceNavigation;
- timing: PerformanceTiming;
+ readonly navigation: PerformanceNavigation;
+ readonly timing: PerformanceTiming;
clearMarks(markName?: string): void;
clearMeasures(measureName?: string): void;
clearResourceTimings(): void;
@@ -13535,10 +14761,10 @@ declare var Performance: {
}
interface PerformanceEntry {
- duration: number;
- entryType: string;
- name: string;
- startTime: number;
+ readonly duration: number;
+ readonly entryType: string;
+ readonly name: string;
+ readonly startTime: number;
}
declare var PerformanceEntry: {
@@ -13563,47 +14789,47 @@ declare var PerformanceMeasure: {
}
interface PerformanceNavigation {
- redirectCount: number;
- type: number;
+ readonly redirectCount: number;
+ readonly type: number;
toJSON(): any;
- TYPE_BACK_FORWARD: number;
- TYPE_NAVIGATE: number;
- TYPE_RELOAD: number;
- TYPE_RESERVED: number;
+ readonly TYPE_BACK_FORWARD: number;
+ readonly TYPE_NAVIGATE: number;
+ readonly TYPE_RELOAD: number;
+ readonly TYPE_RESERVED: number;
}
declare var PerformanceNavigation: {
prototype: PerformanceNavigation;
new(): PerformanceNavigation;
- TYPE_BACK_FORWARD: number;
- TYPE_NAVIGATE: number;
- TYPE_RELOAD: number;
- TYPE_RESERVED: number;
+ readonly TYPE_BACK_FORWARD: number;
+ readonly TYPE_NAVIGATE: number;
+ readonly TYPE_RELOAD: number;
+ readonly TYPE_RESERVED: number;
}
interface PerformanceNavigationTiming extends PerformanceEntry {
- connectEnd: number;
- connectStart: number;
- domComplete: number;
- domContentLoadedEventEnd: number;
- domContentLoadedEventStart: number;
- domInteractive: number;
- domLoading: number;
- domainLookupEnd: number;
- domainLookupStart: number;
- fetchStart: number;
- loadEventEnd: number;
- loadEventStart: number;
- navigationStart: number;
- redirectCount: number;
- redirectEnd: number;
- redirectStart: number;
- requestStart: number;
- responseEnd: number;
- responseStart: number;
- type: string;
- unloadEventEnd: number;
- unloadEventStart: number;
+ readonly connectEnd: number;
+ readonly connectStart: number;
+ readonly domComplete: number;
+ readonly domContentLoadedEventEnd: number;
+ readonly domContentLoadedEventStart: number;
+ readonly domInteractive: number;
+ readonly domLoading: number;
+ readonly domainLookupEnd: number;
+ readonly domainLookupStart: number;
+ readonly fetchStart: number;
+ readonly loadEventEnd: number;
+ readonly loadEventStart: number;
+ readonly navigationStart: number;
+ readonly redirectCount: number;
+ readonly redirectEnd: number;
+ readonly redirectStart: number;
+ readonly requestStart: number;
+ readonly responseEnd: number;
+ readonly responseStart: number;
+ readonly type: string;
+ readonly unloadEventEnd: number;
+ readonly unloadEventStart: number;
}
declare var PerformanceNavigationTiming: {
@@ -13612,17 +14838,17 @@ declare var PerformanceNavigationTiming: {
}
interface PerformanceResourceTiming extends PerformanceEntry {
- connectEnd: number;
- connectStart: number;
- domainLookupEnd: number;
- domainLookupStart: number;
- fetchStart: number;
- initiatorType: string;
- redirectEnd: number;
- redirectStart: number;
- requestStart: number;
- responseEnd: number;
- responseStart: number;
+ readonly connectEnd: number;
+ readonly connectStart: number;
+ readonly domainLookupEnd: number;
+ readonly domainLookupStart: number;
+ readonly fetchStart: number;
+ readonly initiatorType: string;
+ readonly redirectEnd: number;
+ readonly redirectStart: number;
+ readonly requestStart: number;
+ readonly responseEnd: number;
+ readonly responseStart: number;
}
declare var PerformanceResourceTiming: {
@@ -13631,27 +14857,28 @@ declare var PerformanceResourceTiming: {
}
interface PerformanceTiming {
- connectEnd: number;
- connectStart: number;
- domComplete: number;
- domContentLoadedEventEnd: number;
- domContentLoadedEventStart: number;
- domInteractive: number;
- domLoading: number;
- domainLookupEnd: number;
- domainLookupStart: number;
- fetchStart: number;
- loadEventEnd: number;
- loadEventStart: number;
- msFirstPaint: number;
- navigationStart: number;
- redirectEnd: number;
- redirectStart: number;
- requestStart: number;
- responseEnd: number;
- responseStart: number;
- unloadEventEnd: number;
- unloadEventStart: number;
+ readonly connectEnd: number;
+ readonly connectStart: number;
+ readonly domComplete: number;
+ readonly domContentLoadedEventEnd: number;
+ readonly domContentLoadedEventStart: number;
+ readonly domInteractive: number;
+ readonly domLoading: number;
+ readonly domainLookupEnd: number;
+ readonly domainLookupStart: number;
+ readonly fetchStart: number;
+ readonly loadEventEnd: number;
+ readonly loadEventStart: number;
+ readonly msFirstPaint: number;
+ readonly navigationStart: number;
+ readonly redirectEnd: number;
+ readonly redirectStart: number;
+ readonly requestStart: number;
+ readonly responseEnd: number;
+ readonly responseStart: number;
+ readonly unloadEventEnd: number;
+ readonly unloadEventStart: number;
+ readonly secureConnectionStart: number;
toJSON(): any;
}
@@ -13669,7 +14896,7 @@ declare var PeriodicWave: {
}
interface PermissionRequest extends DeferredPermissionRequest {
- state: string;
+ readonly state: string;
defer(): void;
}
@@ -13679,7 +14906,7 @@ declare var PermissionRequest: {
}
interface PermissionRequestedEvent extends Event {
- permissionRequest: PermissionRequest;
+ readonly permissionRequest: PermissionRequest;
}
declare var PermissionRequestedEvent: {
@@ -13688,11 +14915,11 @@ declare var PermissionRequestedEvent: {
}
interface Plugin {
- description: string;
- filename: string;
- length: number;
- name: string;
- version: string;
+ readonly description: string;
+ readonly filename: string;
+ readonly length: number;
+ readonly name: string;
+ readonly version: string;
item(index: number): MimeType;
namedItem(type: string): MimeType;
[index: number]: MimeType;
@@ -13704,7 +14931,7 @@ declare var Plugin: {
}
interface PluginArray {
- length: number;
+ readonly length: number;
item(index: number): Plugin;
namedItem(name: string): Plugin;
refresh(reload?: boolean): void;
@@ -13717,18 +14944,18 @@ declare var PluginArray: {
}
interface PointerEvent extends MouseEvent {
- currentPoint: any;
- height: number;
- hwTimestamp: number;
- intermediatePoints: any;
- isPrimary: boolean;
- pointerId: number;
- pointerType: any;
- pressure: number;
- rotation: number;
- tiltX: number;
- tiltY: number;
- width: number;
+ readonly currentPoint: any;
+ readonly height: number;
+ readonly hwTimestamp: number;
+ readonly intermediatePoints: any;
+ readonly isPrimary: boolean;
+ readonly pointerId: number;
+ readonly pointerType: any;
+ readonly pressure: number;
+ readonly rotation: number;
+ readonly tiltX: number;
+ readonly tiltY: number;
+ readonly width: number;
getCurrentPoint(element: Element): void;
getIntermediatePoints(element: Element): void;
initPointerEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, ctrlKeyArg: boolean, altKeyArg: boolean, shiftKeyArg: boolean, metaKeyArg: boolean, buttonArg: number, relatedTargetArg: EventTarget, offsetXArg: number, offsetYArg: number, widthArg: number, heightArg: number, pressure: number, rotation: number, tiltX: number, tiltY: number, pointerIdArg: number, pointerType: any, hwTimestampArg: number, isPrimary: boolean): void;
@@ -13740,7 +14967,7 @@ declare var PointerEvent: {
}
interface PopStateEvent extends Event {
- state: any;
+ readonly state: any;
initPopStateEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, stateArg: any): void;
}
@@ -13750,8 +14977,8 @@ declare var PopStateEvent: {
}
interface Position {
- coords: Coordinates;
- timestamp: number;
+ readonly coords: Coordinates;
+ readonly timestamp: number;
}
declare var Position: {
@@ -13760,24 +14987,24 @@ declare var Position: {
}
interface PositionError {
- code: number;
- message: string;
+ readonly code: number;
+ readonly message: string;
toString(): string;
- PERMISSION_DENIED: number;
- POSITION_UNAVAILABLE: number;
- TIMEOUT: number;
+ readonly PERMISSION_DENIED: number;
+ readonly POSITION_UNAVAILABLE: number;
+ readonly TIMEOUT: number;
}
declare var PositionError: {
prototype: PositionError;
new(): PositionError;
- PERMISSION_DENIED: number;
- POSITION_UNAVAILABLE: number;
- TIMEOUT: number;
+ readonly PERMISSION_DENIED: number;
+ readonly POSITION_UNAVAILABLE: number;
+ readonly TIMEOUT: number;
}
interface ProcessingInstruction extends CharacterData {
- target: string;
+ readonly target: string;
}
declare var ProcessingInstruction: {
@@ -13786,9 +15013,9 @@ declare var ProcessingInstruction: {
}
interface ProgressEvent extends Event {
- lengthComputable: boolean;
- loaded: number;
- total: number;
+ readonly lengthComputable: boolean;
+ readonly loaded: number;
+ readonly total: number;
initProgressEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, lengthComputableArg: boolean, loadedArg: number, totalArg: number): void;
}
@@ -13797,13 +15024,210 @@ declare var ProgressEvent: {
new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent;
}
+interface RTCDTMFToneChangeEvent extends Event {
+ readonly tone: string;
+}
+
+declare var RTCDTMFToneChangeEvent: {
+ prototype: RTCDTMFToneChangeEvent;
+ new(type: string, eventInitDict: RTCDTMFToneChangeEventInit): RTCDTMFToneChangeEvent;
+}
+
+interface RTCDtlsTransport extends RTCStatsProvider {
+ ondtlsstatechange: ((this: this, ev: RTCDtlsTransportStateChangedEvent) => any) | null;
+ onerror: ((this: this, ev: ErrorEvent) => any) | null;
+ readonly state: string;
+ readonly transport: RTCIceTransport;
+ getLocalParameters(): RTCDtlsParameters;
+ getRemoteCertificates(): ArrayBuffer[];
+ getRemoteParameters(): RTCDtlsParameters | null;
+ start(remoteParameters: RTCDtlsParameters): void;
+ stop(): void;
+ addEventListener(type: "dtlsstatechange", listener: (this: this, ev: RTCDtlsTransportStateChangedEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var RTCDtlsTransport: {
+ prototype: RTCDtlsTransport;
+ new(transport: RTCIceTransport): RTCDtlsTransport;
+}
+
+interface RTCDtlsTransportStateChangedEvent extends Event {
+ readonly state: string;
+}
+
+declare var RTCDtlsTransportStateChangedEvent: {
+ prototype: RTCDtlsTransportStateChangedEvent;
+ new(): RTCDtlsTransportStateChangedEvent;
+}
+
+interface RTCDtmfSender extends EventTarget {
+ readonly canInsertDTMF: boolean;
+ readonly duration: number;
+ readonly interToneGap: number;
+ ontonechange: (this: this, ev: RTCDTMFToneChangeEvent) => any;
+ readonly sender: RTCRtpSender;
+ readonly toneBuffer: string;
+ insertDTMF(tones: string, duration?: number, interToneGap?: number): void;
+ addEventListener(type: "tonechange", listener: (this: this, ev: RTCDTMFToneChangeEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var RTCDtmfSender: {
+ prototype: RTCDtmfSender;
+ new(sender: RTCRtpSender): RTCDtmfSender;
+}
+
+interface RTCIceCandidatePairChangedEvent extends Event {
+ readonly pair: RTCIceCandidatePair;
+}
+
+declare var RTCIceCandidatePairChangedEvent: {
+ prototype: RTCIceCandidatePairChangedEvent;
+ new(): RTCIceCandidatePairChangedEvent;
+}
+
+interface RTCIceGatherer extends RTCStatsProvider {
+ readonly component: string;
+ onerror: ((this: this, ev: ErrorEvent) => any) | null;
+ onlocalcandidate: ((this: this, ev: RTCIceGathererEvent) => any) | null;
+ createAssociatedGatherer(): RTCIceGatherer;
+ getLocalCandidates(): RTCIceCandidate[];
+ getLocalParameters(): RTCIceParameters;
+ addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "localcandidate", listener: (this: this, ev: RTCIceGathererEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var RTCIceGatherer: {
+ prototype: RTCIceGatherer;
+ new(options: RTCIceGatherOptions): RTCIceGatherer;
+}
+
+interface RTCIceGathererEvent extends Event {
+ readonly candidate: RTCIceCandidate | RTCIceCandidateComplete;
+}
+
+declare var RTCIceGathererEvent: {
+ prototype: RTCIceGathererEvent;
+ new(): RTCIceGathererEvent;
+}
+
+interface RTCIceTransport extends RTCStatsProvider {
+ readonly component: string;
+ readonly iceGatherer: RTCIceGatherer | null;
+ oncandidatepairchange: ((this: this, ev: RTCIceCandidatePairChangedEvent) => any) | null;
+ onicestatechange: ((this: this, ev: RTCIceTransportStateChangedEvent) => any) | null;
+ readonly role: string;
+ readonly state: string;
+ addRemoteCandidate(remoteCandidate: RTCIceCandidate | RTCIceCandidateComplete): void;
+ createAssociatedTransport(): RTCIceTransport;
+ getNominatedCandidatePair(): RTCIceCandidatePair | null;
+ getRemoteCandidates(): RTCIceCandidate[];
+ getRemoteParameters(): RTCIceParameters | null;
+ setRemoteCandidates(remoteCandidates: RTCIceCandidate[]): void;
+ start(gatherer: RTCIceGatherer, remoteParameters: RTCIceParameters, role?: string): void;
+ stop(): void;
+ addEventListener(type: "candidatepairchange", listener: (this: this, ev: RTCIceCandidatePairChangedEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "icestatechange", listener: (this: this, ev: RTCIceTransportStateChangedEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var RTCIceTransport: {
+ prototype: RTCIceTransport;
+ new(): RTCIceTransport;
+}
+
+interface RTCIceTransportStateChangedEvent extends Event {
+ readonly state: string;
+}
+
+declare var RTCIceTransportStateChangedEvent: {
+ prototype: RTCIceTransportStateChangedEvent;
+ new(): RTCIceTransportStateChangedEvent;
+}
+
+interface RTCRtpReceiver extends RTCStatsProvider {
+ onerror: ((this: this, ev: ErrorEvent) => any) | null;
+ readonly rtcpTransport: RTCDtlsTransport;
+ readonly track: MediaStreamTrack | null;
+ readonly transport: RTCDtlsTransport | RTCSrtpSdesTransport;
+ getContributingSources(): RTCRtpContributingSource[];
+ receive(parameters: RTCRtpParameters): void;
+ requestSendCSRC(csrc: number): void;
+ setTransport(transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): void;
+ stop(): void;
+ addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var RTCRtpReceiver: {
+ prototype: RTCRtpReceiver;
+ new(transport: RTCDtlsTransport | RTCSrtpSdesTransport, kind: string, rtcpTransport?: RTCDtlsTransport): RTCRtpReceiver;
+ getCapabilities(kind?: string): RTCRtpCapabilities;
+}
+
+interface RTCRtpSender extends RTCStatsProvider {
+ onerror: ((this: this, ev: ErrorEvent) => any) | null;
+ onssrcconflict: ((this: this, ev: RTCSsrcConflictEvent) => any) | null;
+ readonly rtcpTransport: RTCDtlsTransport;
+ readonly track: MediaStreamTrack;
+ readonly transport: RTCDtlsTransport | RTCSrtpSdesTransport;
+ send(parameters: RTCRtpParameters): void;
+ setTrack(track: MediaStreamTrack): void;
+ setTransport(transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): void;
+ stop(): void;
+ addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ssrcconflict", listener: (this: this, ev: RTCSsrcConflictEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var RTCRtpSender: {
+ prototype: RTCRtpSender;
+ new(track: MediaStreamTrack, transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): RTCRtpSender;
+ getCapabilities(kind?: string): RTCRtpCapabilities;
+}
+
+interface RTCSrtpSdesTransport extends EventTarget {
+ onerror: ((this: this, ev: ErrorEvent) => any) | null;
+ readonly transport: RTCIceTransport;
+ addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+}
+
+declare var RTCSrtpSdesTransport: {
+ prototype: RTCSrtpSdesTransport;
+ new(transport: RTCIceTransport, encryptParameters: RTCSrtpSdesParameters, decryptParameters: RTCSrtpSdesParameters): RTCSrtpSdesTransport;
+ getLocalParameters(): RTCSrtpSdesParameters[];
+}
+
+interface RTCSsrcConflictEvent extends Event {
+ readonly ssrc: number;
+}
+
+declare var RTCSsrcConflictEvent: {
+ prototype: RTCSsrcConflictEvent;
+ new(): RTCSsrcConflictEvent;
+}
+
+interface RTCStatsProvider extends EventTarget {
+ getStats(): PromiseLike<RTCStatsReport>;
+ msGetStats(): PromiseLike<RTCStatsReport>;
+}
+
+declare var RTCStatsProvider: {
+ prototype: RTCStatsProvider;
+ new(): RTCStatsProvider;
+}
+
interface Range {
- collapsed: boolean;
- commonAncestorContainer: Node;
- endContainer: Node;
- endOffset: number;
- startContainer: Node;
- startOffset: number;
+ readonly collapsed: boolean;
+ readonly commonAncestorContainer: Node;
+ readonly endContainer: Node;
+ readonly endOffset: number;
+ readonly startContainer: Node;
+ readonly startOffset: number;
cloneContents(): DocumentFragment;
cloneRange(): Range;
collapse(toStart: boolean): void;
@@ -13826,23 +15250,23 @@ interface Range {
setStartBefore(refNode: Node): void;
surroundContents(newParent: Node): void;
toString(): string;
- END_TO_END: number;
- END_TO_START: number;
- START_TO_END: number;
- START_TO_START: number;
+ readonly END_TO_END: number;
+ readonly END_TO_START: number;
+ readonly START_TO_END: number;
+ readonly START_TO_START: number;
}
declare var Range: {
prototype: Range;
new(): Range;
- END_TO_END: number;
- END_TO_START: number;
- START_TO_END: number;
- START_TO_START: number;
+ readonly END_TO_END: number;
+ readonly END_TO_START: number;
+ readonly START_TO_END: number;
+ readonly START_TO_START: number;
}
interface SVGAElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGURIReference {
- target: SVGAnimatedString;
+ readonly target: SVGAnimatedString;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -13852,32 +15276,32 @@ declare var SVGAElement: {
}
interface SVGAngle {
- unitType: number;
+ readonly unitType: number;
value: number;
valueAsString: string;
valueInSpecifiedUnits: number;
convertToSpecifiedUnits(unitType: number): void;
newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void;
- SVG_ANGLETYPE_DEG: number;
- SVG_ANGLETYPE_GRAD: number;
- SVG_ANGLETYPE_RAD: number;
- SVG_ANGLETYPE_UNKNOWN: number;
- SVG_ANGLETYPE_UNSPECIFIED: number;
+ readonly SVG_ANGLETYPE_DEG: number;
+ readonly SVG_ANGLETYPE_GRAD: number;
+ readonly SVG_ANGLETYPE_RAD: number;
+ readonly SVG_ANGLETYPE_UNKNOWN: number;
+ readonly SVG_ANGLETYPE_UNSPECIFIED: number;
}
declare var SVGAngle: {
prototype: SVGAngle;
new(): SVGAngle;
- SVG_ANGLETYPE_DEG: number;
- SVG_ANGLETYPE_GRAD: number;
- SVG_ANGLETYPE_RAD: number;
- SVG_ANGLETYPE_UNKNOWN: number;
- SVG_ANGLETYPE_UNSPECIFIED: number;
+ readonly SVG_ANGLETYPE_DEG: number;
+ readonly SVG_ANGLETYPE_GRAD: number;
+ readonly SVG_ANGLETYPE_RAD: number;
+ readonly SVG_ANGLETYPE_UNKNOWN: number;
+ readonly SVG_ANGLETYPE_UNSPECIFIED: number;
}
interface SVGAnimatedAngle {
- animVal: SVGAngle;
- baseVal: SVGAngle;
+ readonly animVal: SVGAngle;
+ readonly baseVal: SVGAngle;
}
declare var SVGAnimatedAngle: {
@@ -13886,7 +15310,7 @@ declare var SVGAnimatedAngle: {
}
interface SVGAnimatedBoolean {
- animVal: boolean;
+ readonly animVal: boolean;
baseVal: boolean;
}
@@ -13896,7 +15320,7 @@ declare var SVGAnimatedBoolean: {
}
interface SVGAnimatedEnumeration {
- animVal: number;
+ readonly animVal: number;
baseVal: number;
}
@@ -13906,7 +15330,7 @@ declare var SVGAnimatedEnumeration: {
}
interface SVGAnimatedInteger {
- animVal: number;
+ readonly animVal: number;
baseVal: number;
}
@@ -13916,8 +15340,8 @@ declare var SVGAnimatedInteger: {
}
interface SVGAnimatedLength {
- animVal: SVGLength;
- baseVal: SVGLength;
+ readonly animVal: SVGLength;
+ readonly baseVal: SVGLength;
}
declare var SVGAnimatedLength: {
@@ -13926,8 +15350,8 @@ declare var SVGAnimatedLength: {
}
interface SVGAnimatedLengthList {
- animVal: SVGLengthList;
- baseVal: SVGLengthList;
+ readonly animVal: SVGLengthList;
+ readonly baseVal: SVGLengthList;
}
declare var SVGAnimatedLengthList: {
@@ -13936,7 +15360,7 @@ declare var SVGAnimatedLengthList: {
}
interface SVGAnimatedNumber {
- animVal: number;
+ readonly animVal: number;
baseVal: number;
}
@@ -13946,8 +15370,8 @@ declare var SVGAnimatedNumber: {
}
interface SVGAnimatedNumberList {
- animVal: SVGNumberList;
- baseVal: SVGNumberList;
+ readonly animVal: SVGNumberList;
+ readonly baseVal: SVGNumberList;
}
declare var SVGAnimatedNumberList: {
@@ -13956,8 +15380,8 @@ declare var SVGAnimatedNumberList: {
}
interface SVGAnimatedPreserveAspectRatio {
- animVal: SVGPreserveAspectRatio;
- baseVal: SVGPreserveAspectRatio;
+ readonly animVal: SVGPreserveAspectRatio;
+ readonly baseVal: SVGPreserveAspectRatio;
}
declare var SVGAnimatedPreserveAspectRatio: {
@@ -13966,8 +15390,8 @@ declare var SVGAnimatedPreserveAspectRatio: {
}
interface SVGAnimatedRect {
- animVal: SVGRect;
- baseVal: SVGRect;
+ readonly animVal: SVGRect;
+ readonly baseVal: SVGRect;
}
declare var SVGAnimatedRect: {
@@ -13976,7 +15400,7 @@ declare var SVGAnimatedRect: {
}
interface SVGAnimatedString {
- animVal: string;
+ readonly animVal: string;
baseVal: string;
}
@@ -13986,8 +15410,8 @@ declare var SVGAnimatedString: {
}
interface SVGAnimatedTransformList {
- animVal: SVGTransformList;
- baseVal: SVGTransformList;
+ readonly animVal: SVGTransformList;
+ readonly baseVal: SVGTransformList;
}
declare var SVGAnimatedTransformList: {
@@ -13996,9 +15420,9 @@ declare var SVGAnimatedTransformList: {
}
interface SVGCircleElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
- cx: SVGAnimatedLength;
- cy: SVGAnimatedLength;
- r: SVGAnimatedLength;
+ readonly cx: SVGAnimatedLength;
+ readonly cy: SVGAnimatedLength;
+ readonly r: SVGAnimatedLength;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -14008,7 +15432,7 @@ declare var SVGCircleElement: {
}
interface SVGClipPathElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGUnitTypes {
- clipPathUnits: SVGAnimatedEnumeration;
+ readonly clipPathUnits: SVGAnimatedEnumeration;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -14018,30 +15442,30 @@ declare var SVGClipPathElement: {
}
interface SVGComponentTransferFunctionElement extends SVGElement {
- amplitude: SVGAnimatedNumber;
- exponent: SVGAnimatedNumber;
- intercept: SVGAnimatedNumber;
- offset: SVGAnimatedNumber;
- slope: SVGAnimatedNumber;
- tableValues: SVGAnimatedNumberList;
- type: SVGAnimatedEnumeration;
- SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;
- SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;
- SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;
- SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;
- SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;
- SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;
+ readonly amplitude: SVGAnimatedNumber;
+ readonly exponent: SVGAnimatedNumber;
+ readonly intercept: SVGAnimatedNumber;
+ readonly offset: SVGAnimatedNumber;
+ readonly slope: SVGAnimatedNumber;
+ readonly tableValues: SVGAnimatedNumberList;
+ readonly type: SVGAnimatedEnumeration;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;
}
declare var SVGComponentTransferFunctionElement: {
prototype: SVGComponentTransferFunctionElement;
new(): SVGComponentTransferFunctionElement;
- SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;
- SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;
- SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;
- SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;
- SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;
- SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_GAMMA: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number;
+ readonly SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number;
}
interface SVGDefsElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
@@ -14063,67 +15487,66 @@ declare var SVGDescElement: {
}
interface SVGElement extends Element {
- id: string;
- onclick: (ev: MouseEvent) => any;
- ondblclick: (ev: MouseEvent) => any;
- onfocusin: (ev: FocusEvent) => any;
- onfocusout: (ev: FocusEvent) => any;
- onload: (ev: Event) => any;
- onmousedown: (ev: MouseEvent) => any;
- onmousemove: (ev: MouseEvent) => any;
- onmouseout: (ev: MouseEvent) => any;
- onmouseover: (ev: MouseEvent) => any;
- onmouseup: (ev: MouseEvent) => any;
- ownerSVGElement: SVGSVGElement;
- viewportElement: SVGElement;
+ onclick: (this: this, ev: MouseEvent) => any;
+ ondblclick: (this: this, ev: MouseEvent) => any;
+ onfocusin: (this: this, ev: FocusEvent) => any;
+ onfocusout: (this: this, ev: FocusEvent) => any;
+ onload: (this: this, ev: Event) => any;
+ onmousedown: (this: this, ev: MouseEvent) => any;
+ onmousemove: (this: this, ev: MouseEvent) => any;
+ onmouseout: (this: this, ev: MouseEvent) => any;
+ onmouseover: (this: this, ev: MouseEvent) => any;
+ onmouseup: (this: this, ev: MouseEvent) => any;
+ readonly ownerSVGElement: SVGSVGElement;
+ readonly viewportElement: SVGElement;
xmlbase: string;
className: any;
- addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "focusin", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "focusout", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureChange", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureDoubleTap", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureEnd", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureHold", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureStart", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureTap", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGotPointerCapture", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSInertiaStart", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSLostPointerCapture", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerCancel", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerDown", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerEnter", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerLeave", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerMove", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOut", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOver", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerUp", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ariarequest", listener: (this: this, ev: AriaRequestEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "click", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "command", listener: (this: this, ev: CommandEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dblclick", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "focusin", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "focusout", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "gotpointercapture", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "lostpointercapture", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousedown", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousemove", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseout", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseover", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseup", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointercancel", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerdown", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerenter", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerleave", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointermove", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerout", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerover", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerup", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchcancel", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchend", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchmove", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchstart", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenchange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenerror", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "wheel", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -14133,14 +15556,14 @@ declare var SVGElement: {
}
interface SVGElementInstance extends EventTarget {
- childNodes: SVGElementInstanceList;
- correspondingElement: SVGElement;
- correspondingUseElement: SVGUseElement;
- firstChild: SVGElementInstance;
- lastChild: SVGElementInstance;
- nextSibling: SVGElementInstance;
- parentNode: SVGElementInstance;
- previousSibling: SVGElementInstance;
+ readonly childNodes: SVGElementInstanceList;
+ readonly correspondingElement: SVGElement;
+ readonly correspondingUseElement: SVGUseElement;
+ readonly firstChild: SVGElementInstance;
+ readonly lastChild: SVGElementInstance;
+ readonly nextSibling: SVGElementInstance;
+ readonly parentNode: SVGElementInstance;
+ readonly previousSibling: SVGElementInstance;
}
declare var SVGElementInstance: {
@@ -14149,7 +15572,7 @@ declare var SVGElementInstance: {
}
interface SVGElementInstanceList {
- length: number;
+ readonly length: number;
item(index: number): SVGElementInstance;
}
@@ -14159,10 +15582,10 @@ declare var SVGElementInstanceList: {
}
interface SVGEllipseElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
- cx: SVGAnimatedLength;
- cy: SVGAnimatedLength;
- rx: SVGAnimatedLength;
- ry: SVGAnimatedLength;
+ readonly cx: SVGAnimatedLength;
+ readonly cy: SVGAnimatedLength;
+ readonly rx: SVGAnimatedLength;
+ readonly ry: SVGAnimatedLength;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -14172,75 +15595,75 @@ declare var SVGEllipseElement: {
}
interface SVGFEBlendElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- in1: SVGAnimatedString;
- in2: SVGAnimatedString;
- mode: SVGAnimatedEnumeration;
- SVG_FEBLEND_MODE_COLOR: number;
- SVG_FEBLEND_MODE_COLOR_BURN: number;
- SVG_FEBLEND_MODE_COLOR_DODGE: number;
- SVG_FEBLEND_MODE_DARKEN: number;
- SVG_FEBLEND_MODE_DIFFERENCE: number;
- SVG_FEBLEND_MODE_EXCLUSION: number;
- SVG_FEBLEND_MODE_HARD_LIGHT: number;
- SVG_FEBLEND_MODE_HUE: number;
- SVG_FEBLEND_MODE_LIGHTEN: number;
- SVG_FEBLEND_MODE_LUMINOSITY: number;
- SVG_FEBLEND_MODE_MULTIPLY: number;
- SVG_FEBLEND_MODE_NORMAL: number;
- SVG_FEBLEND_MODE_OVERLAY: number;
- SVG_FEBLEND_MODE_SATURATION: number;
- SVG_FEBLEND_MODE_SCREEN: number;
- SVG_FEBLEND_MODE_SOFT_LIGHT: number;
- SVG_FEBLEND_MODE_UNKNOWN: number;
+ readonly in1: SVGAnimatedString;
+ readonly in2: SVGAnimatedString;
+ readonly mode: SVGAnimatedEnumeration;
+ readonly SVG_FEBLEND_MODE_COLOR: number;
+ readonly SVG_FEBLEND_MODE_COLOR_BURN: number;
+ readonly SVG_FEBLEND_MODE_COLOR_DODGE: number;
+ readonly SVG_FEBLEND_MODE_DARKEN: number;
+ readonly SVG_FEBLEND_MODE_DIFFERENCE: number;
+ readonly SVG_FEBLEND_MODE_EXCLUSION: number;
+ readonly SVG_FEBLEND_MODE_HARD_LIGHT: number;
+ readonly SVG_FEBLEND_MODE_HUE: number;
+ readonly SVG_FEBLEND_MODE_LIGHTEN: number;
+ readonly SVG_FEBLEND_MODE_LUMINOSITY: number;
+ readonly SVG_FEBLEND_MODE_MULTIPLY: number;
+ readonly SVG_FEBLEND_MODE_NORMAL: number;
+ readonly SVG_FEBLEND_MODE_OVERLAY: number;
+ readonly SVG_FEBLEND_MODE_SATURATION: number;
+ readonly SVG_FEBLEND_MODE_SCREEN: number;
+ readonly SVG_FEBLEND_MODE_SOFT_LIGHT: number;
+ readonly SVG_FEBLEND_MODE_UNKNOWN: number;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
declare var SVGFEBlendElement: {
prototype: SVGFEBlendElement;
new(): SVGFEBlendElement;
- SVG_FEBLEND_MODE_COLOR: number;
- SVG_FEBLEND_MODE_COLOR_BURN: number;
- SVG_FEBLEND_MODE_COLOR_DODGE: number;
- SVG_FEBLEND_MODE_DARKEN: number;
- SVG_FEBLEND_MODE_DIFFERENCE: number;
- SVG_FEBLEND_MODE_EXCLUSION: number;
- SVG_FEBLEND_MODE_HARD_LIGHT: number;
- SVG_FEBLEND_MODE_HUE: number;
- SVG_FEBLEND_MODE_LIGHTEN: number;
- SVG_FEBLEND_MODE_LUMINOSITY: number;
- SVG_FEBLEND_MODE_MULTIPLY: number;
- SVG_FEBLEND_MODE_NORMAL: number;
- SVG_FEBLEND_MODE_OVERLAY: number;
- SVG_FEBLEND_MODE_SATURATION: number;
- SVG_FEBLEND_MODE_SCREEN: number;
- SVG_FEBLEND_MODE_SOFT_LIGHT: number;
- SVG_FEBLEND_MODE_UNKNOWN: number;
+ readonly SVG_FEBLEND_MODE_COLOR: number;
+ readonly SVG_FEBLEND_MODE_COLOR_BURN: number;
+ readonly SVG_FEBLEND_MODE_COLOR_DODGE: number;
+ readonly SVG_FEBLEND_MODE_DARKEN: number;
+ readonly SVG_FEBLEND_MODE_DIFFERENCE: number;
+ readonly SVG_FEBLEND_MODE_EXCLUSION: number;
+ readonly SVG_FEBLEND_MODE_HARD_LIGHT: number;
+ readonly SVG_FEBLEND_MODE_HUE: number;
+ readonly SVG_FEBLEND_MODE_LIGHTEN: number;
+ readonly SVG_FEBLEND_MODE_LUMINOSITY: number;
+ readonly SVG_FEBLEND_MODE_MULTIPLY: number;
+ readonly SVG_FEBLEND_MODE_NORMAL: number;
+ readonly SVG_FEBLEND_MODE_OVERLAY: number;
+ readonly SVG_FEBLEND_MODE_SATURATION: number;
+ readonly SVG_FEBLEND_MODE_SCREEN: number;
+ readonly SVG_FEBLEND_MODE_SOFT_LIGHT: number;
+ readonly SVG_FEBLEND_MODE_UNKNOWN: number;
}
interface SVGFEColorMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- in1: SVGAnimatedString;
- type: SVGAnimatedEnumeration;
- values: SVGAnimatedNumberList;
- SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;
- SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;
- SVG_FECOLORMATRIX_TYPE_MATRIX: number;
- SVG_FECOLORMATRIX_TYPE_SATURATE: number;
- SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;
+ readonly in1: SVGAnimatedString;
+ readonly type: SVGAnimatedEnumeration;
+ readonly values: SVGAnimatedNumberList;
+ readonly SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;
+ readonly SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;
+ readonly SVG_FECOLORMATRIX_TYPE_MATRIX: number;
+ readonly SVG_FECOLORMATRIX_TYPE_SATURATE: number;
+ readonly SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
declare var SVGFEColorMatrixElement: {
prototype: SVGFEColorMatrixElement;
new(): SVGFEColorMatrixElement;
- SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;
- SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;
- SVG_FECOLORMATRIX_TYPE_MATRIX: number;
- SVG_FECOLORMATRIX_TYPE_SATURATE: number;
- SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;
+ readonly SVG_FECOLORMATRIX_TYPE_HUEROTATE: number;
+ readonly SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA: number;
+ readonly SVG_FECOLORMATRIX_TYPE_MATRIX: number;
+ readonly SVG_FECOLORMATRIX_TYPE_SATURATE: number;
+ readonly SVG_FECOLORMATRIX_TYPE_UNKNOWN: number;
}
interface SVGFEComponentTransferElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- in1: SVGAnimatedString;
+ readonly in1: SVGAnimatedString;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -14250,70 +15673,70 @@ declare var SVGFEComponentTransferElement: {
}
interface SVGFECompositeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- in1: SVGAnimatedString;
- in2: SVGAnimatedString;
- k1: SVGAnimatedNumber;
- k2: SVGAnimatedNumber;
- k3: SVGAnimatedNumber;
- k4: SVGAnimatedNumber;
- operator: SVGAnimatedEnumeration;
- SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;
- SVG_FECOMPOSITE_OPERATOR_ATOP: number;
- SVG_FECOMPOSITE_OPERATOR_IN: number;
- SVG_FECOMPOSITE_OPERATOR_OUT: number;
- SVG_FECOMPOSITE_OPERATOR_OVER: number;
- SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;
- SVG_FECOMPOSITE_OPERATOR_XOR: number;
+ readonly in1: SVGAnimatedString;
+ readonly in2: SVGAnimatedString;
+ readonly k1: SVGAnimatedNumber;
+ readonly k2: SVGAnimatedNumber;
+ readonly k3: SVGAnimatedNumber;
+ readonly k4: SVGAnimatedNumber;
+ readonly operator: SVGAnimatedEnumeration;
+ readonly SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_ATOP: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_IN: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_OUT: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_OVER: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_XOR: number;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
declare var SVGFECompositeElement: {
prototype: SVGFECompositeElement;
new(): SVGFECompositeElement;
- SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;
- SVG_FECOMPOSITE_OPERATOR_ATOP: number;
- SVG_FECOMPOSITE_OPERATOR_IN: number;
- SVG_FECOMPOSITE_OPERATOR_OUT: number;
- SVG_FECOMPOSITE_OPERATOR_OVER: number;
- SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;
- SVG_FECOMPOSITE_OPERATOR_XOR: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_ARITHMETIC: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_ATOP: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_IN: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_OUT: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_OVER: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number;
+ readonly SVG_FECOMPOSITE_OPERATOR_XOR: number;
}
interface SVGFEConvolveMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- bias: SVGAnimatedNumber;
- divisor: SVGAnimatedNumber;
- edgeMode: SVGAnimatedEnumeration;
- in1: SVGAnimatedString;
- kernelMatrix: SVGAnimatedNumberList;
- kernelUnitLengthX: SVGAnimatedNumber;
- kernelUnitLengthY: SVGAnimatedNumber;
- orderX: SVGAnimatedInteger;
- orderY: SVGAnimatedInteger;
- preserveAlpha: SVGAnimatedBoolean;
- targetX: SVGAnimatedInteger;
- targetY: SVGAnimatedInteger;
- SVG_EDGEMODE_DUPLICATE: number;
- SVG_EDGEMODE_NONE: number;
- SVG_EDGEMODE_UNKNOWN: number;
- SVG_EDGEMODE_WRAP: number;
+ readonly bias: SVGAnimatedNumber;
+ readonly divisor: SVGAnimatedNumber;
+ readonly edgeMode: SVGAnimatedEnumeration;
+ readonly in1: SVGAnimatedString;
+ readonly kernelMatrix: SVGAnimatedNumberList;
+ readonly kernelUnitLengthX: SVGAnimatedNumber;
+ readonly kernelUnitLengthY: SVGAnimatedNumber;
+ readonly orderX: SVGAnimatedInteger;
+ readonly orderY: SVGAnimatedInteger;
+ readonly preserveAlpha: SVGAnimatedBoolean;
+ readonly targetX: SVGAnimatedInteger;
+ readonly targetY: SVGAnimatedInteger;
+ readonly SVG_EDGEMODE_DUPLICATE: number;
+ readonly SVG_EDGEMODE_NONE: number;
+ readonly SVG_EDGEMODE_UNKNOWN: number;
+ readonly SVG_EDGEMODE_WRAP: number;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
declare var SVGFEConvolveMatrixElement: {
prototype: SVGFEConvolveMatrixElement;
new(): SVGFEConvolveMatrixElement;
- SVG_EDGEMODE_DUPLICATE: number;
- SVG_EDGEMODE_NONE: number;
- SVG_EDGEMODE_UNKNOWN: number;
- SVG_EDGEMODE_WRAP: number;
+ readonly SVG_EDGEMODE_DUPLICATE: number;
+ readonly SVG_EDGEMODE_NONE: number;
+ readonly SVG_EDGEMODE_UNKNOWN: number;
+ readonly SVG_EDGEMODE_WRAP: number;
}
interface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- diffuseConstant: SVGAnimatedNumber;
- in1: SVGAnimatedString;
- kernelUnitLengthX: SVGAnimatedNumber;
- kernelUnitLengthY: SVGAnimatedNumber;
- surfaceScale: SVGAnimatedNumber;
+ readonly diffuseConstant: SVGAnimatedNumber;
+ readonly in1: SVGAnimatedString;
+ readonly kernelUnitLengthX: SVGAnimatedNumber;
+ readonly kernelUnitLengthY: SVGAnimatedNumber;
+ readonly surfaceScale: SVGAnimatedNumber;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -14323,32 +15746,32 @@ declare var SVGFEDiffuseLightingElement: {
}
interface SVGFEDisplacementMapElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- in1: SVGAnimatedString;
- in2: SVGAnimatedString;
- scale: SVGAnimatedNumber;
- xChannelSelector: SVGAnimatedEnumeration;
- yChannelSelector: SVGAnimatedEnumeration;
- SVG_CHANNEL_A: number;
- SVG_CHANNEL_B: number;
- SVG_CHANNEL_G: number;
- SVG_CHANNEL_R: number;
- SVG_CHANNEL_UNKNOWN: number;
+ readonly in1: SVGAnimatedString;
+ readonly in2: SVGAnimatedString;
+ readonly scale: SVGAnimatedNumber;
+ readonly xChannelSelector: SVGAnimatedEnumeration;
+ readonly yChannelSelector: SVGAnimatedEnumeration;
+ readonly SVG_CHANNEL_A: number;
+ readonly SVG_CHANNEL_B: number;
+ readonly SVG_CHANNEL_G: number;
+ readonly SVG_CHANNEL_R: number;
+ readonly SVG_CHANNEL_UNKNOWN: number;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
declare var SVGFEDisplacementMapElement: {
prototype: SVGFEDisplacementMapElement;
new(): SVGFEDisplacementMapElement;
- SVG_CHANNEL_A: number;
- SVG_CHANNEL_B: number;
- SVG_CHANNEL_G: number;
- SVG_CHANNEL_R: number;
- SVG_CHANNEL_UNKNOWN: number;
+ readonly SVG_CHANNEL_A: number;
+ readonly SVG_CHANNEL_B: number;
+ readonly SVG_CHANNEL_G: number;
+ readonly SVG_CHANNEL_R: number;
+ readonly SVG_CHANNEL_UNKNOWN: number;
}
interface SVGFEDistantLightElement extends SVGElement {
- azimuth: SVGAnimatedNumber;
- elevation: SVGAnimatedNumber;
+ readonly azimuth: SVGAnimatedNumber;
+ readonly elevation: SVGAnimatedNumber;
}
declare var SVGFEDistantLightElement: {
@@ -14398,9 +15821,9 @@ declare var SVGFEFuncRElement: {
}
interface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- in1: SVGAnimatedString;
- stdDeviationX: SVGAnimatedNumber;
- stdDeviationY: SVGAnimatedNumber;
+ readonly in1: SVGAnimatedString;
+ readonly stdDeviationX: SVGAnimatedNumber;
+ readonly stdDeviationY: SVGAnimatedNumber;
setStdDeviation(stdDeviationX: number, stdDeviationY: number): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -14411,7 +15834,7 @@ declare var SVGFEGaussianBlurElement: {
}
interface SVGFEImageElement extends SVGElement, SVGFilterPrimitiveStandardAttributes, SVGLangSpace, SVGURIReference, SVGExternalResourcesRequired {
- preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
+ readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -14430,7 +15853,7 @@ declare var SVGFEMergeElement: {
}
interface SVGFEMergeNodeElement extends SVGElement {
- in1: SVGAnimatedString;
+ readonly in1: SVGAnimatedString;
}
declare var SVGFEMergeNodeElement: {
@@ -14439,28 +15862,28 @@ declare var SVGFEMergeNodeElement: {
}
interface SVGFEMorphologyElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- in1: SVGAnimatedString;
- operator: SVGAnimatedEnumeration;
- radiusX: SVGAnimatedNumber;
- radiusY: SVGAnimatedNumber;
- SVG_MORPHOLOGY_OPERATOR_DILATE: number;
- SVG_MORPHOLOGY_OPERATOR_ERODE: number;
- SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;
+ readonly in1: SVGAnimatedString;
+ readonly operator: SVGAnimatedEnumeration;
+ readonly radiusX: SVGAnimatedNumber;
+ readonly radiusY: SVGAnimatedNumber;
+ readonly SVG_MORPHOLOGY_OPERATOR_DILATE: number;
+ readonly SVG_MORPHOLOGY_OPERATOR_ERODE: number;
+ readonly SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
declare var SVGFEMorphologyElement: {
prototype: SVGFEMorphologyElement;
new(): SVGFEMorphologyElement;
- SVG_MORPHOLOGY_OPERATOR_DILATE: number;
- SVG_MORPHOLOGY_OPERATOR_ERODE: number;
- SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;
+ readonly SVG_MORPHOLOGY_OPERATOR_DILATE: number;
+ readonly SVG_MORPHOLOGY_OPERATOR_ERODE: number;
+ readonly SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number;
}
interface SVGFEOffsetElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- dx: SVGAnimatedNumber;
- dy: SVGAnimatedNumber;
- in1: SVGAnimatedString;
+ readonly dx: SVGAnimatedNumber;
+ readonly dy: SVGAnimatedNumber;
+ readonly in1: SVGAnimatedString;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -14470,9 +15893,9 @@ declare var SVGFEOffsetElement: {
}
interface SVGFEPointLightElement extends SVGElement {
- x: SVGAnimatedNumber;
- y: SVGAnimatedNumber;
- z: SVGAnimatedNumber;
+ readonly x: SVGAnimatedNumber;
+ readonly y: SVGAnimatedNumber;
+ readonly z: SVGAnimatedNumber;
}
declare var SVGFEPointLightElement: {
@@ -14481,12 +15904,12 @@ declare var SVGFEPointLightElement: {
}
interface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- in1: SVGAnimatedString;
- kernelUnitLengthX: SVGAnimatedNumber;
- kernelUnitLengthY: SVGAnimatedNumber;
- specularConstant: SVGAnimatedNumber;
- specularExponent: SVGAnimatedNumber;
- surfaceScale: SVGAnimatedNumber;
+ readonly in1: SVGAnimatedString;
+ readonly kernelUnitLengthX: SVGAnimatedNumber;
+ readonly kernelUnitLengthY: SVGAnimatedNumber;
+ readonly specularConstant: SVGAnimatedNumber;
+ readonly specularExponent: SVGAnimatedNumber;
+ readonly surfaceScale: SVGAnimatedNumber;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -14496,14 +15919,14 @@ declare var SVGFESpecularLightingElement: {
}
interface SVGFESpotLightElement extends SVGElement {
- limitingConeAngle: SVGAnimatedNumber;
- pointsAtX: SVGAnimatedNumber;
- pointsAtY: SVGAnimatedNumber;
- pointsAtZ: SVGAnimatedNumber;
- specularExponent: SVGAnimatedNumber;
- x: SVGAnimatedNumber;
- y: SVGAnimatedNumber;
- z: SVGAnimatedNumber;
+ readonly limitingConeAngle: SVGAnimatedNumber;
+ readonly pointsAtX: SVGAnimatedNumber;
+ readonly pointsAtY: SVGAnimatedNumber;
+ readonly pointsAtZ: SVGAnimatedNumber;
+ readonly specularExponent: SVGAnimatedNumber;
+ readonly x: SVGAnimatedNumber;
+ readonly y: SVGAnimatedNumber;
+ readonly z: SVGAnimatedNumber;
}
declare var SVGFESpotLightElement: {
@@ -14512,7 +15935,7 @@ declare var SVGFESpotLightElement: {
}
interface SVGFETileElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- in1: SVGAnimatedString;
+ readonly in1: SVGAnimatedString;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -14522,41 +15945,41 @@ declare var SVGFETileElement: {
}
interface SVGFETurbulenceElement extends SVGElement, SVGFilterPrimitiveStandardAttributes {
- baseFrequencyX: SVGAnimatedNumber;
- baseFrequencyY: SVGAnimatedNumber;
- numOctaves: SVGAnimatedInteger;
- seed: SVGAnimatedNumber;
- stitchTiles: SVGAnimatedEnumeration;
- type: SVGAnimatedEnumeration;
- SVG_STITCHTYPE_NOSTITCH: number;
- SVG_STITCHTYPE_STITCH: number;
- SVG_STITCHTYPE_UNKNOWN: number;
- SVG_TURBULENCE_TYPE_FRACTALNOISE: number;
- SVG_TURBULENCE_TYPE_TURBULENCE: number;
- SVG_TURBULENCE_TYPE_UNKNOWN: number;
+ readonly baseFrequencyX: SVGAnimatedNumber;
+ readonly baseFrequencyY: SVGAnimatedNumber;
+ readonly numOctaves: SVGAnimatedInteger;
+ readonly seed: SVGAnimatedNumber;
+ readonly stitchTiles: SVGAnimatedEnumeration;
+ readonly type: SVGAnimatedEnumeration;
+ readonly SVG_STITCHTYPE_NOSTITCH: number;
+ readonly SVG_STITCHTYPE_STITCH: number;
+ readonly SVG_STITCHTYPE_UNKNOWN: number;
+ readonly SVG_TURBULENCE_TYPE_FRACTALNOISE: number;
+ readonly SVG_TURBULENCE_TYPE_TURBULENCE: number;
+ readonly SVG_TURBULENCE_TYPE_UNKNOWN: number;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
declare var SVGFETurbulenceElement: {
prototype: SVGFETurbulenceElement;
new(): SVGFETurbulenceElement;
- SVG_STITCHTYPE_NOSTITCH: number;
- SVG_STITCHTYPE_STITCH: number;
- SVG_STITCHTYPE_UNKNOWN: number;
- SVG_TURBULENCE_TYPE_FRACTALNOISE: number;
- SVG_TURBULENCE_TYPE_TURBULENCE: number;
- SVG_TURBULENCE_TYPE_UNKNOWN: number;
+ readonly SVG_STITCHTYPE_NOSTITCH: number;
+ readonly SVG_STITCHTYPE_STITCH: number;
+ readonly SVG_STITCHTYPE_UNKNOWN: number;
+ readonly SVG_TURBULENCE_TYPE_FRACTALNOISE: number;
+ readonly SVG_TURBULENCE_TYPE_TURBULENCE: number;
+ readonly SVG_TURBULENCE_TYPE_UNKNOWN: number;
}
interface SVGFilterElement extends SVGElement, SVGUnitTypes, SVGStylable, SVGLangSpace, SVGURIReference, SVGExternalResourcesRequired {
- filterResX: SVGAnimatedInteger;
- filterResY: SVGAnimatedInteger;
- filterUnits: SVGAnimatedEnumeration;
- height: SVGAnimatedLength;
- primitiveUnits: SVGAnimatedEnumeration;
- width: SVGAnimatedLength;
- x: SVGAnimatedLength;
- y: SVGAnimatedLength;
+ readonly filterResX: SVGAnimatedInteger;
+ readonly filterResY: SVGAnimatedInteger;
+ readonly filterUnits: SVGAnimatedEnumeration;
+ readonly height: SVGAnimatedLength;
+ readonly primitiveUnits: SVGAnimatedEnumeration;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
setFilterRes(filterResX: number, filterResY: number): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -14567,10 +15990,10 @@ declare var SVGFilterElement: {
}
interface SVGForeignObjectElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
- height: SVGAnimatedLength;
- width: SVGAnimatedLength;
- x: SVGAnimatedLength;
- y: SVGAnimatedLength;
+ readonly height: SVGAnimatedLength;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -14589,31 +16012,31 @@ declare var SVGGElement: {
}
interface SVGGradientElement extends SVGElement, SVGStylable, SVGExternalResourcesRequired, SVGURIReference, SVGUnitTypes {
- gradientTransform: SVGAnimatedTransformList;
- gradientUnits: SVGAnimatedEnumeration;
- spreadMethod: SVGAnimatedEnumeration;
- SVG_SPREADMETHOD_PAD: number;
- SVG_SPREADMETHOD_REFLECT: number;
- SVG_SPREADMETHOD_REPEAT: number;
- SVG_SPREADMETHOD_UNKNOWN: number;
+ readonly gradientTransform: SVGAnimatedTransformList;
+ readonly gradientUnits: SVGAnimatedEnumeration;
+ readonly spreadMethod: SVGAnimatedEnumeration;
+ readonly SVG_SPREADMETHOD_PAD: number;
+ readonly SVG_SPREADMETHOD_REFLECT: number;
+ readonly SVG_SPREADMETHOD_REPEAT: number;
+ readonly SVG_SPREADMETHOD_UNKNOWN: number;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
declare var SVGGradientElement: {
prototype: SVGGradientElement;
new(): SVGGradientElement;
- SVG_SPREADMETHOD_PAD: number;
- SVG_SPREADMETHOD_REFLECT: number;
- SVG_SPREADMETHOD_REPEAT: number;
- SVG_SPREADMETHOD_UNKNOWN: number;
+ readonly SVG_SPREADMETHOD_PAD: number;
+ readonly SVG_SPREADMETHOD_REFLECT: number;
+ readonly SVG_SPREADMETHOD_REPEAT: number;
+ readonly SVG_SPREADMETHOD_UNKNOWN: number;
}
interface SVGImageElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGURIReference {
- height: SVGAnimatedLength;
- preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
- width: SVGAnimatedLength;
- x: SVGAnimatedLength;
- y: SVGAnimatedLength;
+ readonly height: SVGAnimatedLength;
+ readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -14623,43 +16046,43 @@ declare var SVGImageElement: {
}
interface SVGLength {
- unitType: number;
+ readonly unitType: number;
value: number;
valueAsString: string;
valueInSpecifiedUnits: number;
convertToSpecifiedUnits(unitType: number): void;
newValueSpecifiedUnits(unitType: number, valueInSpecifiedUnits: number): void;
- SVG_LENGTHTYPE_CM: number;
- SVG_LENGTHTYPE_EMS: number;
- SVG_LENGTHTYPE_EXS: number;
- SVG_LENGTHTYPE_IN: number;
- SVG_LENGTHTYPE_MM: number;
- SVG_LENGTHTYPE_NUMBER: number;
- SVG_LENGTHTYPE_PC: number;
- SVG_LENGTHTYPE_PERCENTAGE: number;
- SVG_LENGTHTYPE_PT: number;
- SVG_LENGTHTYPE_PX: number;
- SVG_LENGTHTYPE_UNKNOWN: number;
+ readonly SVG_LENGTHTYPE_CM: number;
+ readonly SVG_LENGTHTYPE_EMS: number;
+ readonly SVG_LENGTHTYPE_EXS: number;
+ readonly SVG_LENGTHTYPE_IN: number;
+ readonly SVG_LENGTHTYPE_MM: number;
+ readonly SVG_LENGTHTYPE_NUMBER: number;
+ readonly SVG_LENGTHTYPE_PC: number;
+ readonly SVG_LENGTHTYPE_PERCENTAGE: number;
+ readonly SVG_LENGTHTYPE_PT: number;
+ readonly SVG_LENGTHTYPE_PX: number;
+ readonly SVG_LENGTHTYPE_UNKNOWN: number;
}
declare var SVGLength: {
prototype: SVGLength;
new(): SVGLength;
- SVG_LENGTHTYPE_CM: number;
- SVG_LENGTHTYPE_EMS: number;
- SVG_LENGTHTYPE_EXS: number;
- SVG_LENGTHTYPE_IN: number;
- SVG_LENGTHTYPE_MM: number;
- SVG_LENGTHTYPE_NUMBER: number;
- SVG_LENGTHTYPE_PC: number;
- SVG_LENGTHTYPE_PERCENTAGE: number;
- SVG_LENGTHTYPE_PT: number;
- SVG_LENGTHTYPE_PX: number;
- SVG_LENGTHTYPE_UNKNOWN: number;
+ readonly SVG_LENGTHTYPE_CM: number;
+ readonly SVG_LENGTHTYPE_EMS: number;
+ readonly SVG_LENGTHTYPE_EXS: number;
+ readonly SVG_LENGTHTYPE_IN: number;
+ readonly SVG_LENGTHTYPE_MM: number;
+ readonly SVG_LENGTHTYPE_NUMBER: number;
+ readonly SVG_LENGTHTYPE_PC: number;
+ readonly SVG_LENGTHTYPE_PERCENTAGE: number;
+ readonly SVG_LENGTHTYPE_PT: number;
+ readonly SVG_LENGTHTYPE_PX: number;
+ readonly SVG_LENGTHTYPE_UNKNOWN: number;
}
interface SVGLengthList {
- numberOfItems: number;
+ readonly numberOfItems: number;
appendItem(newItem: SVGLength): SVGLength;
clear(): void;
getItem(index: number): SVGLength;
@@ -14675,10 +16098,10 @@ declare var SVGLengthList: {
}
interface SVGLineElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
- x1: SVGAnimatedLength;
- x2: SVGAnimatedLength;
- y1: SVGAnimatedLength;
- y2: SVGAnimatedLength;
+ readonly x1: SVGAnimatedLength;
+ readonly x2: SVGAnimatedLength;
+ readonly y1: SVGAnimatedLength;
+ readonly y2: SVGAnimatedLength;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -14688,10 +16111,10 @@ declare var SVGLineElement: {
}
interface SVGLinearGradientElement extends SVGGradientElement {
- x1: SVGAnimatedLength;
- x2: SVGAnimatedLength;
- y1: SVGAnimatedLength;
- y2: SVGAnimatedLength;
+ readonly x1: SVGAnimatedLength;
+ readonly x2: SVGAnimatedLength;
+ readonly y1: SVGAnimatedLength;
+ readonly y2: SVGAnimatedLength;
}
declare var SVGLinearGradientElement: {
@@ -14700,42 +16123,42 @@ declare var SVGLinearGradientElement: {
}
interface SVGMarkerElement extends SVGElement, SVGStylable, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox {
- markerHeight: SVGAnimatedLength;
- markerUnits: SVGAnimatedEnumeration;
- markerWidth: SVGAnimatedLength;
- orientAngle: SVGAnimatedAngle;
- orientType: SVGAnimatedEnumeration;
- refX: SVGAnimatedLength;
- refY: SVGAnimatedLength;
+ readonly markerHeight: SVGAnimatedLength;
+ readonly markerUnits: SVGAnimatedEnumeration;
+ readonly markerWidth: SVGAnimatedLength;
+ readonly orientAngle: SVGAnimatedAngle;
+ readonly orientType: SVGAnimatedEnumeration;
+ readonly refX: SVGAnimatedLength;
+ readonly refY: SVGAnimatedLength;
setOrientToAngle(angle: SVGAngle): void;
setOrientToAuto(): void;
- SVG_MARKERUNITS_STROKEWIDTH: number;
- SVG_MARKERUNITS_UNKNOWN: number;
- SVG_MARKERUNITS_USERSPACEONUSE: number;
- SVG_MARKER_ORIENT_ANGLE: number;
- SVG_MARKER_ORIENT_AUTO: number;
- SVG_MARKER_ORIENT_UNKNOWN: number;
+ readonly SVG_MARKERUNITS_STROKEWIDTH: number;
+ readonly SVG_MARKERUNITS_UNKNOWN: number;
+ readonly SVG_MARKERUNITS_USERSPACEONUSE: number;
+ readonly SVG_MARKER_ORIENT_ANGLE: number;
+ readonly SVG_MARKER_ORIENT_AUTO: number;
+ readonly SVG_MARKER_ORIENT_UNKNOWN: number;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
declare var SVGMarkerElement: {
prototype: SVGMarkerElement;
new(): SVGMarkerElement;
- SVG_MARKERUNITS_STROKEWIDTH: number;
- SVG_MARKERUNITS_UNKNOWN: number;
- SVG_MARKERUNITS_USERSPACEONUSE: number;
- SVG_MARKER_ORIENT_ANGLE: number;
- SVG_MARKER_ORIENT_AUTO: number;
- SVG_MARKER_ORIENT_UNKNOWN: number;
+ readonly SVG_MARKERUNITS_STROKEWIDTH: number;
+ readonly SVG_MARKERUNITS_UNKNOWN: number;
+ readonly SVG_MARKERUNITS_USERSPACEONUSE: number;
+ readonly SVG_MARKER_ORIENT_ANGLE: number;
+ readonly SVG_MARKER_ORIENT_AUTO: number;
+ readonly SVG_MARKER_ORIENT_UNKNOWN: number;
}
interface SVGMaskElement extends SVGElement, SVGStylable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGUnitTypes {
- height: SVGAnimatedLength;
- maskContentUnits: SVGAnimatedEnumeration;
- maskUnits: SVGAnimatedEnumeration;
- width: SVGAnimatedLength;
- x: SVGAnimatedLength;
- y: SVGAnimatedLength;
+ readonly height: SVGAnimatedLength;
+ readonly maskContentUnits: SVGAnimatedEnumeration;
+ readonly maskUnits: SVGAnimatedEnumeration;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -14787,7 +16210,7 @@ declare var SVGNumber: {
}
interface SVGNumberList {
- numberOfItems: number;
+ readonly numberOfItems: number;
appendItem(newItem: SVGNumber): SVGNumber;
clear(): void;
getItem(index: number): SVGNumber;
@@ -14834,53 +16257,53 @@ declare var SVGPathElement: {
}
interface SVGPathSeg {
- pathSegType: number;
- pathSegTypeAsLetter: string;
- PATHSEG_ARC_ABS: number;
- PATHSEG_ARC_REL: number;
- PATHSEG_CLOSEPATH: number;
- PATHSEG_CURVETO_CUBIC_ABS: number;
- PATHSEG_CURVETO_CUBIC_REL: number;
- PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number;
- PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number;
- PATHSEG_CURVETO_QUADRATIC_ABS: number;
- PATHSEG_CURVETO_QUADRATIC_REL: number;
- PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number;
- PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number;
- PATHSEG_LINETO_ABS: number;
- PATHSEG_LINETO_HORIZONTAL_ABS: number;
- PATHSEG_LINETO_HORIZONTAL_REL: number;
- PATHSEG_LINETO_REL: number;
- PATHSEG_LINETO_VERTICAL_ABS: number;
- PATHSEG_LINETO_VERTICAL_REL: number;
- PATHSEG_MOVETO_ABS: number;
- PATHSEG_MOVETO_REL: number;
- PATHSEG_UNKNOWN: number;
+ readonly pathSegType: number;
+ readonly pathSegTypeAsLetter: string;
+ readonly PATHSEG_ARC_ABS: number;
+ readonly PATHSEG_ARC_REL: number;
+ readonly PATHSEG_CLOSEPATH: number;
+ readonly PATHSEG_CURVETO_CUBIC_ABS: number;
+ readonly PATHSEG_CURVETO_CUBIC_REL: number;
+ readonly PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number;
+ readonly PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_ABS: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_REL: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number;
+ readonly PATHSEG_LINETO_ABS: number;
+ readonly PATHSEG_LINETO_HORIZONTAL_ABS: number;
+ readonly PATHSEG_LINETO_HORIZONTAL_REL: number;
+ readonly PATHSEG_LINETO_REL: number;
+ readonly PATHSEG_LINETO_VERTICAL_ABS: number;
+ readonly PATHSEG_LINETO_VERTICAL_REL: number;
+ readonly PATHSEG_MOVETO_ABS: number;
+ readonly PATHSEG_MOVETO_REL: number;
+ readonly PATHSEG_UNKNOWN: number;
}
declare var SVGPathSeg: {
prototype: SVGPathSeg;
new(): SVGPathSeg;
- PATHSEG_ARC_ABS: number;
- PATHSEG_ARC_REL: number;
- PATHSEG_CLOSEPATH: number;
- PATHSEG_CURVETO_CUBIC_ABS: number;
- PATHSEG_CURVETO_CUBIC_REL: number;
- PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number;
- PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number;
- PATHSEG_CURVETO_QUADRATIC_ABS: number;
- PATHSEG_CURVETO_QUADRATIC_REL: number;
- PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number;
- PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number;
- PATHSEG_LINETO_ABS: number;
- PATHSEG_LINETO_HORIZONTAL_ABS: number;
- PATHSEG_LINETO_HORIZONTAL_REL: number;
- PATHSEG_LINETO_REL: number;
- PATHSEG_LINETO_VERTICAL_ABS: number;
- PATHSEG_LINETO_VERTICAL_REL: number;
- PATHSEG_MOVETO_ABS: number;
- PATHSEG_MOVETO_REL: number;
- PATHSEG_UNKNOWN: number;
+ readonly PATHSEG_ARC_ABS: number;
+ readonly PATHSEG_ARC_REL: number;
+ readonly PATHSEG_CLOSEPATH: number;
+ readonly PATHSEG_CURVETO_CUBIC_ABS: number;
+ readonly PATHSEG_CURVETO_CUBIC_REL: number;
+ readonly PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: number;
+ readonly PATHSEG_CURVETO_CUBIC_SMOOTH_REL: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_ABS: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_REL: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: number;
+ readonly PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: number;
+ readonly PATHSEG_LINETO_ABS: number;
+ readonly PATHSEG_LINETO_HORIZONTAL_ABS: number;
+ readonly PATHSEG_LINETO_HORIZONTAL_REL: number;
+ readonly PATHSEG_LINETO_REL: number;
+ readonly PATHSEG_LINETO_VERTICAL_ABS: number;
+ readonly PATHSEG_LINETO_VERTICAL_REL: number;
+ readonly PATHSEG_MOVETO_ABS: number;
+ readonly PATHSEG_MOVETO_REL: number;
+ readonly PATHSEG_UNKNOWN: number;
}
interface SVGPathSegArcAbs extends SVGPathSeg {
@@ -15074,7 +16497,7 @@ declare var SVGPathSegLinetoVerticalRel: {
}
interface SVGPathSegList {
- numberOfItems: number;
+ readonly numberOfItems: number;
appendItem(newItem: SVGPathSeg): SVGPathSeg;
clear(): void;
getItem(index: number): SVGPathSeg;
@@ -15110,13 +16533,13 @@ declare var SVGPathSegMovetoRel: {
}
interface SVGPatternElement extends SVGElement, SVGStylable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGFitToViewBox, SVGURIReference, SVGUnitTypes {
- height: SVGAnimatedLength;
- patternContentUnits: SVGAnimatedEnumeration;
- patternTransform: SVGAnimatedTransformList;
- patternUnits: SVGAnimatedEnumeration;
- width: SVGAnimatedLength;
- x: SVGAnimatedLength;
- y: SVGAnimatedLength;
+ readonly height: SVGAnimatedLength;
+ readonly patternContentUnits: SVGAnimatedEnumeration;
+ readonly patternTransform: SVGAnimatedTransformList;
+ readonly patternUnits: SVGAnimatedEnumeration;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -15137,7 +16560,7 @@ declare var SVGPoint: {
}
interface SVGPointList {
- numberOfItems: number;
+ readonly numberOfItems: number;
appendItem(newItem: SVGPoint): SVGPoint;
clear(): void;
getItem(index: number): SVGPoint;
@@ -15173,47 +16596,47 @@ declare var SVGPolylineElement: {
interface SVGPreserveAspectRatio {
align: number;
meetOrSlice: number;
- SVG_MEETORSLICE_MEET: number;
- SVG_MEETORSLICE_SLICE: number;
- SVG_MEETORSLICE_UNKNOWN: number;
- SVG_PRESERVEASPECTRATIO_NONE: number;
- SVG_PRESERVEASPECTRATIO_UNKNOWN: number;
- SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;
- SVG_PRESERVEASPECTRATIO_XMAXYMID: number;
- SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;
- SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;
- SVG_PRESERVEASPECTRATIO_XMIDYMID: number;
- SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;
- SVG_PRESERVEASPECTRATIO_XMINYMAX: number;
- SVG_PRESERVEASPECTRATIO_XMINYMID: number;
- SVG_PRESERVEASPECTRATIO_XMINYMIN: number;
+ readonly SVG_MEETORSLICE_MEET: number;
+ readonly SVG_MEETORSLICE_SLICE: number;
+ readonly SVG_MEETORSLICE_UNKNOWN: number;
+ readonly SVG_PRESERVEASPECTRATIO_NONE: number;
+ readonly SVG_PRESERVEASPECTRATIO_UNKNOWN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMIN: number;
}
declare var SVGPreserveAspectRatio: {
prototype: SVGPreserveAspectRatio;
new(): SVGPreserveAspectRatio;
- SVG_MEETORSLICE_MEET: number;
- SVG_MEETORSLICE_SLICE: number;
- SVG_MEETORSLICE_UNKNOWN: number;
- SVG_PRESERVEASPECTRATIO_NONE: number;
- SVG_PRESERVEASPECTRATIO_UNKNOWN: number;
- SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;
- SVG_PRESERVEASPECTRATIO_XMAXYMID: number;
- SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;
- SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;
- SVG_PRESERVEASPECTRATIO_XMIDYMID: number;
- SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;
- SVG_PRESERVEASPECTRATIO_XMINYMAX: number;
- SVG_PRESERVEASPECTRATIO_XMINYMID: number;
- SVG_PRESERVEASPECTRATIO_XMINYMIN: number;
+ readonly SVG_MEETORSLICE_MEET: number;
+ readonly SVG_MEETORSLICE_SLICE: number;
+ readonly SVG_MEETORSLICE_UNKNOWN: number;
+ readonly SVG_PRESERVEASPECTRATIO_NONE: number;
+ readonly SVG_PRESERVEASPECTRATIO_UNKNOWN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMAXYMIN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMIDYMIN: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMAX: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMID: number;
+ readonly SVG_PRESERVEASPECTRATIO_XMINYMIN: number;
}
interface SVGRadialGradientElement extends SVGGradientElement {
- cx: SVGAnimatedLength;
- cy: SVGAnimatedLength;
- fx: SVGAnimatedLength;
- fy: SVGAnimatedLength;
- r: SVGAnimatedLength;
+ readonly cx: SVGAnimatedLength;
+ readonly cy: SVGAnimatedLength;
+ readonly fx: SVGAnimatedLength;
+ readonly fy: SVGAnimatedLength;
+ readonly r: SVGAnimatedLength;
}
declare var SVGRadialGradientElement: {
@@ -15234,12 +16657,12 @@ declare var SVGRect: {
}
interface SVGRectElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
- height: SVGAnimatedLength;
- rx: SVGAnimatedLength;
- ry: SVGAnimatedLength;
- width: SVGAnimatedLength;
- x: SVGAnimatedLength;
- y: SVGAnimatedLength;
+ readonly height: SVGAnimatedLength;
+ readonly rx: SVGAnimatedLength;
+ readonly ry: SVGAnimatedLength;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -15252,22 +16675,22 @@ interface SVGSVGElement extends SVGElement, DocumentEvent, SVGLocatable, SVGTest
contentScriptType: string;
contentStyleType: string;
currentScale: number;
- currentTranslate: SVGPoint;
- height: SVGAnimatedLength;
- onabort: (ev: Event) => any;
- onerror: (ev: Event) => any;
- onresize: (ev: UIEvent) => any;
- onscroll: (ev: UIEvent) => any;
- onunload: (ev: Event) => any;
- onzoom: (ev: SVGZoomEvent) => any;
- pixelUnitToMillimeterX: number;
- pixelUnitToMillimeterY: number;
- screenPixelToMillimeterX: number;
- screenPixelToMillimeterY: number;
- viewport: SVGRect;
- width: SVGAnimatedLength;
- x: SVGAnimatedLength;
- y: SVGAnimatedLength;
+ readonly currentTranslate: SVGPoint;
+ readonly height: SVGAnimatedLength;
+ onabort: (this: this, ev: Event) => any;
+ onerror: (this: this, ev: Event) => any;
+ onresize: (this: this, ev: UIEvent) => any;
+ onscroll: (this: this, ev: UIEvent) => any;
+ onunload: (this: this, ev: Event) => any;
+ onzoom: (this: this, ev: SVGZoomEvent) => any;
+ readonly pixelUnitToMillimeterX: number;
+ readonly pixelUnitToMillimeterY: number;
+ readonly screenPixelToMillimeterX: number;
+ readonly screenPixelToMillimeterY: number;
+ readonly viewport: SVGRect;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
checkEnclosure(element: SVGElement, rect: SVGRect): boolean;
checkIntersection(element: SVGElement, rect: SVGRect): boolean;
createSVGAngle(): SVGAngle;
@@ -15283,66 +16706,66 @@ interface SVGSVGElement extends SVGElement, DocumentEvent, SVGLocatable, SVGTest
getComputedStyle(elt: Element, pseudoElt?: string): CSSStyleDeclaration;
getCurrentTime(): number;
getElementById(elementId: string): Element;
- getEnclosureList(rect: SVGRect, referenceElement: SVGElement): NodeList;
- getIntersectionList(rect: SVGRect, referenceElement: SVGElement): NodeList;
+ getEnclosureList(rect: SVGRect, referenceElement: SVGElement): NodeListOf<SVGCircleElement | SVGEllipseElement | SVGImageElement | SVGLineElement | SVGPathElement | SVGPolygonElement | SVGPolylineElement | SVGRectElement | SVGTextElement | SVGUseElement>;
+ getIntersectionList(rect: SVGRect, referenceElement: SVGElement): NodeListOf<SVGCircleElement | SVGEllipseElement | SVGImageElement | SVGLineElement | SVGPathElement | SVGPolygonElement | SVGPolylineElement | SVGRectElement | SVGTextElement | SVGUseElement>;
pauseAnimations(): void;
setCurrentTime(seconds: number): void;
suspendRedraw(maxWaitMilliseconds: number): number;
unpauseAnimations(): void;
unsuspendRedraw(suspendHandleID: number): void;
unsuspendRedrawAll(): void;
- addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGotPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSLostPointerCapture", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "SVGAbort", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "SVGError", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "SVGUnload", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "SVGZoom", listener: (ev: SVGZoomEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "ariarequest", listener: (ev: AriaRequestEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "command", listener: (ev: CommandEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "focusin", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "focusout", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "gotpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "lostpointercapture", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "resize", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchcancel", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchend", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchmove", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "touchstart", listener: (ev: TouchEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "webkitfullscreenchange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "webkitfullscreenerror", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureChange", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureDoubleTap", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureEnd", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureHold", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureStart", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureTap", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGotPointerCapture", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSInertiaStart", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSLostPointerCapture", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerCancel", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerDown", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerEnter", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerLeave", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerMove", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOut", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOver", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerUp", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "SVGAbort", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "SVGError", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "SVGUnload", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "SVGZoom", listener: (this: this, ev: SVGZoomEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ariarequest", listener: (this: this, ev: AriaRequestEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "click", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "command", listener: (this: this, ev: CommandEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dblclick", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "focusin", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "focusout", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "gotpointercapture", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "lostpointercapture", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousedown", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousemove", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseout", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseover", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseup", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointercancel", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerdown", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerenter", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerleave", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointermove", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerout", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerover", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerup", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "resize", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "scroll", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchcancel", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchend", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchmove", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "touchstart", listener: (this: this, ev: TouchEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenchange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "webkitfullscreenerror", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "wheel", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -15362,7 +16785,7 @@ declare var SVGScriptElement: {
}
interface SVGStopElement extends SVGElement, SVGStylable {
- offset: SVGAnimatedNumber;
+ readonly offset: SVGAnimatedNumber;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -15372,7 +16795,7 @@ declare var SVGStopElement: {
}
interface SVGStringList {
- numberOfItems: number;
+ readonly numberOfItems: number;
appendItem(newItem: string): string;
clear(): void;
getItem(index: number): string;
@@ -15388,6 +16811,7 @@ declare var SVGStringList: {
}
interface SVGStyleElement extends SVGElement, SVGLangSpace {
+ disabled: boolean;
media: string;
title: string;
type: string;
@@ -15426,8 +16850,8 @@ declare var SVGTSpanElement: {
}
interface SVGTextContentElement extends SVGElement, SVGStylable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired {
- lengthAdjust: SVGAnimatedEnumeration;
- textLength: SVGAnimatedLength;
+ readonly lengthAdjust: SVGAnimatedEnumeration;
+ readonly textLength: SVGAnimatedLength;
getCharNumAtPosition(point: SVGPoint): number;
getComputedTextLength(): number;
getEndPositionOfChar(charnum: number): SVGPoint;
@@ -15437,18 +16861,18 @@ interface SVGTextContentElement extends SVGElement, SVGStylable, SVGTests, SVGLa
getStartPositionOfChar(charnum: number): SVGPoint;
getSubStringLength(charnum: number, nchars: number): number;
selectSubString(charnum: number, nchars: number): void;
- LENGTHADJUST_SPACING: number;
- LENGTHADJUST_SPACINGANDGLYPHS: number;
- LENGTHADJUST_UNKNOWN: number;
+ readonly LENGTHADJUST_SPACING: number;
+ readonly LENGTHADJUST_SPACINGANDGLYPHS: number;
+ readonly LENGTHADJUST_UNKNOWN: number;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
declare var SVGTextContentElement: {
prototype: SVGTextContentElement;
new(): SVGTextContentElement;
- LENGTHADJUST_SPACING: number;
- LENGTHADJUST_SPACINGANDGLYPHS: number;
- LENGTHADJUST_UNKNOWN: number;
+ readonly LENGTHADJUST_SPACING: number;
+ readonly LENGTHADJUST_SPACINGANDGLYPHS: number;
+ readonly LENGTHADJUST_UNKNOWN: number;
}
interface SVGTextElement extends SVGTextPositioningElement, SVGTransformable {
@@ -15461,35 +16885,35 @@ declare var SVGTextElement: {
}
interface SVGTextPathElement extends SVGTextContentElement, SVGURIReference {
- method: SVGAnimatedEnumeration;
- spacing: SVGAnimatedEnumeration;
- startOffset: SVGAnimatedLength;
- TEXTPATH_METHODTYPE_ALIGN: number;
- TEXTPATH_METHODTYPE_STRETCH: number;
- TEXTPATH_METHODTYPE_UNKNOWN: number;
- TEXTPATH_SPACINGTYPE_AUTO: number;
- TEXTPATH_SPACINGTYPE_EXACT: number;
- TEXTPATH_SPACINGTYPE_UNKNOWN: number;
+ readonly method: SVGAnimatedEnumeration;
+ readonly spacing: SVGAnimatedEnumeration;
+ readonly startOffset: SVGAnimatedLength;
+ readonly TEXTPATH_METHODTYPE_ALIGN: number;
+ readonly TEXTPATH_METHODTYPE_STRETCH: number;
+ readonly TEXTPATH_METHODTYPE_UNKNOWN: number;
+ readonly TEXTPATH_SPACINGTYPE_AUTO: number;
+ readonly TEXTPATH_SPACINGTYPE_EXACT: number;
+ readonly TEXTPATH_SPACINGTYPE_UNKNOWN: number;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
declare var SVGTextPathElement: {
prototype: SVGTextPathElement;
new(): SVGTextPathElement;
- TEXTPATH_METHODTYPE_ALIGN: number;
- TEXTPATH_METHODTYPE_STRETCH: number;
- TEXTPATH_METHODTYPE_UNKNOWN: number;
- TEXTPATH_SPACINGTYPE_AUTO: number;
- TEXTPATH_SPACINGTYPE_EXACT: number;
- TEXTPATH_SPACINGTYPE_UNKNOWN: number;
+ readonly TEXTPATH_METHODTYPE_ALIGN: number;
+ readonly TEXTPATH_METHODTYPE_STRETCH: number;
+ readonly TEXTPATH_METHODTYPE_UNKNOWN: number;
+ readonly TEXTPATH_SPACINGTYPE_AUTO: number;
+ readonly TEXTPATH_SPACINGTYPE_EXACT: number;
+ readonly TEXTPATH_SPACINGTYPE_UNKNOWN: number;
}
interface SVGTextPositioningElement extends SVGTextContentElement {
- dx: SVGAnimatedLengthList;
- dy: SVGAnimatedLengthList;
- rotate: SVGAnimatedNumberList;
- x: SVGAnimatedLengthList;
- y: SVGAnimatedLengthList;
+ readonly dx: SVGAnimatedLengthList;
+ readonly dy: SVGAnimatedLengthList;
+ readonly rotate: SVGAnimatedNumberList;
+ readonly x: SVGAnimatedLengthList;
+ readonly y: SVGAnimatedLengthList;
}
declare var SVGTextPositioningElement: {
@@ -15507,38 +16931,38 @@ declare var SVGTitleElement: {
}
interface SVGTransform {
- angle: number;
- matrix: SVGMatrix;
- type: number;
+ readonly angle: number;
+ readonly matrix: SVGMatrix;
+ readonly type: number;
setMatrix(matrix: SVGMatrix): void;
setRotate(angle: number, cx: number, cy: number): void;
setScale(sx: number, sy: number): void;
setSkewX(angle: number): void;
setSkewY(angle: number): void;
setTranslate(tx: number, ty: number): void;
- SVG_TRANSFORM_MATRIX: number;
- SVG_TRANSFORM_ROTATE: number;
- SVG_TRANSFORM_SCALE: number;
- SVG_TRANSFORM_SKEWX: number;
- SVG_TRANSFORM_SKEWY: number;
- SVG_TRANSFORM_TRANSLATE: number;
- SVG_TRANSFORM_UNKNOWN: number;
+ readonly SVG_TRANSFORM_MATRIX: number;
+ readonly SVG_TRANSFORM_ROTATE: number;
+ readonly SVG_TRANSFORM_SCALE: number;
+ readonly SVG_TRANSFORM_SKEWX: number;
+ readonly SVG_TRANSFORM_SKEWY: number;
+ readonly SVG_TRANSFORM_TRANSLATE: number;
+ readonly SVG_TRANSFORM_UNKNOWN: number;
}
declare var SVGTransform: {
prototype: SVGTransform;
new(): SVGTransform;
- SVG_TRANSFORM_MATRIX: number;
- SVG_TRANSFORM_ROTATE: number;
- SVG_TRANSFORM_SCALE: number;
- SVG_TRANSFORM_SKEWX: number;
- SVG_TRANSFORM_SKEWY: number;
- SVG_TRANSFORM_TRANSLATE: number;
- SVG_TRANSFORM_UNKNOWN: number;
+ readonly SVG_TRANSFORM_MATRIX: number;
+ readonly SVG_TRANSFORM_ROTATE: number;
+ readonly SVG_TRANSFORM_SCALE: number;
+ readonly SVG_TRANSFORM_SKEWX: number;
+ readonly SVG_TRANSFORM_SKEWY: number;
+ readonly SVG_TRANSFORM_TRANSLATE: number;
+ readonly SVG_TRANSFORM_UNKNOWN: number;
}
interface SVGTransformList {
- numberOfItems: number;
+ readonly numberOfItems: number;
appendItem(newItem: SVGTransform): SVGTransform;
clear(): void;
consolidate(): SVGTransform;
@@ -15556,19 +16980,19 @@ declare var SVGTransformList: {
}
interface SVGUnitTypes {
- SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: number;
- SVG_UNIT_TYPE_UNKNOWN: number;
- SVG_UNIT_TYPE_USERSPACEONUSE: number;
+ readonly SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: number;
+ readonly SVG_UNIT_TYPE_UNKNOWN: number;
+ readonly SVG_UNIT_TYPE_USERSPACEONUSE: number;
}
declare var SVGUnitTypes: SVGUnitTypes;
interface SVGUseElement extends SVGElement, SVGStylable, SVGTransformable, SVGTests, SVGLangSpace, SVGExternalResourcesRequired, SVGURIReference {
- animatedInstanceRoot: SVGElementInstance;
- height: SVGAnimatedLength;
- instanceRoot: SVGElementInstance;
- width: SVGAnimatedLength;
- x: SVGAnimatedLength;
- y: SVGAnimatedLength;
+ readonly animatedInstanceRoot: SVGElementInstance;
+ readonly height: SVGAnimatedLength;
+ readonly instanceRoot: SVGElementInstance;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -15578,7 +17002,7 @@ declare var SVGUseElement: {
}
interface SVGViewElement extends SVGElement, SVGExternalResourcesRequired, SVGFitToViewBox, SVGZoomAndPan {
- viewTarget: SVGStringList;
+ readonly viewTarget: SVGStringList;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -15588,18 +17012,21 @@ declare var SVGViewElement: {
}
interface SVGZoomAndPan {
- SVG_ZOOMANDPAN_DISABLE: number;
- SVG_ZOOMANDPAN_MAGNIFY: number;
- SVG_ZOOMANDPAN_UNKNOWN: number;
+ readonly zoomAndPan: number;
+}
+
+declare var SVGZoomAndPan: {
+ readonly SVG_ZOOMANDPAN_DISABLE: number;
+ readonly SVG_ZOOMANDPAN_MAGNIFY: number;
+ readonly SVG_ZOOMANDPAN_UNKNOWN: number;
}
-declare var SVGZoomAndPan: SVGZoomAndPan;
interface SVGZoomEvent extends UIEvent {
- newScale: number;
- newTranslate: SVGPoint;
- previousScale: number;
- previousTranslate: SVGPoint;
- zoomRectScreen: SVGRect;
+ readonly newScale: number;
+ readonly newTranslate: SVGPoint;
+ readonly previousScale: number;
+ readonly previousTranslate: SVGPoint;
+ readonly zoomRectScreen: SVGRect;
}
declare var SVGZoomEvent: {
@@ -15608,25 +17035,25 @@ declare var SVGZoomEvent: {
}
interface Screen extends EventTarget {
- availHeight: number;
- availWidth: number;
+ readonly availHeight: number;
+ readonly availWidth: number;
bufferDepth: number;
- colorDepth: number;
- deviceXDPI: number;
- deviceYDPI: number;
- fontSmoothingEnabled: boolean;
- height: number;
- logicalXDPI: number;
- logicalYDPI: number;
- msOrientation: string;
- onmsorientationchange: (ev: Event) => any;
- pixelDepth: number;
- systemXDPI: number;
- systemYDPI: number;
- width: number;
+ readonly colorDepth: number;
+ readonly deviceXDPI: number;
+ readonly deviceYDPI: number;
+ readonly fontSmoothingEnabled: boolean;
+ readonly height: number;
+ readonly logicalXDPI: number;
+ readonly logicalYDPI: number;
+ readonly msOrientation: string;
+ onmsorientationchange: (this: this, ev: Event) => any;
+ readonly pixelDepth: number;
+ readonly systemXDPI: number;
+ readonly systemYDPI: number;
+ readonly width: number;
msLockOrientation(orientations: string | string[]): boolean;
msUnlockOrientation(): void;
- addEventListener(type: "MSOrientationChange", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSOrientationChange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -15636,8 +17063,8 @@ declare var Screen: {
}
interface ScriptNotifyEvent extends Event {
- callingUri: string;
- value: string;
+ readonly callingUri: string;
+ readonly value: string;
}
declare var ScriptNotifyEvent: {
@@ -15646,9 +17073,9 @@ declare var ScriptNotifyEvent: {
}
interface ScriptProcessorNode extends AudioNode {
- bufferSize: number;
- onaudioprocess: (ev: AudioProcessingEvent) => any;
- addEventListener(type: "audioprocess", listener: (ev: AudioProcessingEvent) => any, useCapture?: boolean): void;
+ readonly bufferSize: number;
+ onaudioprocess: (this: this, ev: AudioProcessingEvent) => any;
+ addEventListener(type: "audioprocess", listener: (this: this, ev: AudioProcessingEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -15658,13 +17085,13 @@ declare var ScriptProcessorNode: {
}
interface Selection {
- anchorNode: Node;
- anchorOffset: number;
- focusNode: Node;
- focusOffset: number;
- isCollapsed: boolean;
- rangeCount: number;
- type: string;
+ readonly anchorNode: Node;
+ readonly anchorOffset: number;
+ readonly focusNode: Node;
+ readonly focusOffset: number;
+ readonly isCollapsed: boolean;
+ readonly rangeCount: number;
+ readonly type: string;
addRange(range: Range): void;
collapse(parentNode: Node, offset: number): void;
collapseToEnd(): void;
@@ -15689,12 +17116,12 @@ declare var Selection: {
interface SourceBuffer extends EventTarget {
appendWindowEnd: number;
appendWindowStart: number;
- audioTracks: AudioTrackList;
- buffered: TimeRanges;
+ readonly audioTracks: AudioTrackList;
+ readonly buffered: TimeRanges;
mode: string;
timestampOffset: number;
- updating: boolean;
- videoTracks: VideoTrackList;
+ readonly updating: boolean;
+ readonly videoTracks: VideoTrackList;
abort(): void;
appendBuffer(data: ArrayBuffer | ArrayBufferView): void;
appendStream(stream: MSStream, maxSize?: number): void;
@@ -15707,7 +17134,7 @@ declare var SourceBuffer: {
}
interface SourceBufferList extends EventTarget {
- length: number;
+ readonly length: number;
item(index: number): SourceBuffer;
[index: number]: SourceBuffer;
}
@@ -15718,7 +17145,7 @@ declare var SourceBufferList: {
}
interface StereoPannerNode extends AudioNode {
- pan: AudioParam;
+ readonly pan: AudioParam;
}
declare var StereoPannerNode: {
@@ -15727,10 +17154,10 @@ declare var StereoPannerNode: {
}
interface Storage {
- length: number;
+ readonly length: number;
clear(): void;
- getItem(key: string): any;
- key(index: number): string;
+ getItem(key: string): string | null;
+ key(index: number): string | null;
removeItem(key: string): void;
setItem(key: string, data: string): void;
[key: string]: any;
@@ -15743,21 +17170,20 @@ declare var Storage: {
}
interface StorageEvent extends Event {
- key: string;
- newValue: any;
- oldValue: any;
- storageArea: Storage;
- url: string;
- initStorageEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, keyArg: string, oldValueArg: any, newValueArg: any, urlArg: string, storageAreaArg: Storage): void;
+ readonly url: string;
+ key?: string;
+ oldValue?: string;
+ newValue?: string;
+ storageArea?: Storage;
}
declare var StorageEvent: {
prototype: StorageEvent;
- new(): StorageEvent;
+ new (type: string, eventInitDict?: StorageEventInit): StorageEvent;
}
interface StyleMedia {
- type: string;
+ readonly type: string;
matchMedium(mediaquery: string): boolean;
}
@@ -15768,12 +17194,12 @@ declare var StyleMedia: {
interface StyleSheet {
disabled: boolean;
- href: string;
- media: MediaList;
- ownerNode: Node;
- parentStyleSheet: StyleSheet;
- title: string;
- type: string;
+ readonly href: string;
+ readonly media: MediaList;
+ readonly ownerNode: Node;
+ readonly parentStyleSheet: StyleSheet;
+ readonly title: string;
+ readonly type: string;
}
declare var StyleSheet: {
@@ -15782,7 +17208,7 @@ declare var StyleSheet: {
}
interface StyleSheetList {
- length: number;
+ readonly length: number;
item(index?: number): StyleSheet;
[index: number]: StyleSheet;
}
@@ -15793,7 +17219,7 @@ declare var StyleSheetList: {
}
interface StyleSheetPageList {
- length: number;
+ readonly length: number;
item(index: number): CSSPageRule;
[index: number]: CSSPageRule;
}
@@ -15804,18 +17230,24 @@ declare var StyleSheetPageList: {
}
interface SubtleCrypto {
- decrypt(algorithm: string | Algorithm, key: CryptoKey, data: ArrayBufferView): any;
- deriveBits(algorithm: string | Algorithm, baseKey: CryptoKey, length: number): any;
- deriveKey(algorithm: string | Algorithm, baseKey: CryptoKey, derivedKeyType: string | Algorithm, extractable: boolean, keyUsages: string[]): any;
- digest(algorithm: string | Algorithm, data: ArrayBufferView): any;
- encrypt(algorithm: string | Algorithm, key: CryptoKey, data: ArrayBufferView): any;
- exportKey(format: string, key: CryptoKey): any;
- generateKey(algorithm: string | Algorithm, extractable: boolean, keyUsages: string[]): any;
- importKey(format: string, keyData: ArrayBufferView, algorithm: string | Algorithm, extractable: boolean, keyUsages: string[]): any;
- sign(algorithm: string | Algorithm, key: CryptoKey, data: ArrayBufferView): any;
- unwrapKey(format: string, wrappedKey: ArrayBufferView, unwrappingKey: CryptoKey, unwrapAlgorithm: string | Algorithm, unwrappedKeyAlgorithm: string | Algorithm, extractable: boolean, keyUsages: string[]): any;
- verify(algorithm: string | Algorithm, key: CryptoKey, signature: ArrayBufferView, data: ArrayBufferView): any;
- wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: string | Algorithm): any;
+ decrypt(algorithm: string | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: BufferSource): PromiseLike<ArrayBuffer>;
+ deriveBits(algorithm: string | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, length: number): PromiseLike<ArrayBuffer>;
+ deriveKey(algorithm: string | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: string | AesDerivedKeyParams | HmacImportParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
+ digest(algorithm: AlgorithmIdentifier, data: BufferSource): PromiseLike<ArrayBuffer>;
+ encrypt(algorithm: string | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: BufferSource): PromiseLike<ArrayBuffer>;
+ exportKey(format: "jwk", key: CryptoKey): PromiseLike<JsonWebKey>;
+ exportKey(format: "raw" | "pkcs8" | "spki", key: CryptoKey): PromiseLike<ArrayBuffer>;
+ exportKey(format: string, key: CryptoKey): PromiseLike<JsonWebKey | ArrayBuffer>;
+ generateKey(algorithm: string, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKeyPair | CryptoKey>;
+ generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams | DhKeyGenParams, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKeyPair>;
+ generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
+ importKey(format: "jwk", keyData: JsonWebKey, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable:boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
+ importKey(format: "raw" | "pkcs8" | "spki", keyData: BufferSource, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable:boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
+ importKey(format: string, keyData: JsonWebKey | BufferSource, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable:boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
+ sign(algorithm: string | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, data: BufferSource): PromiseLike<ArrayBuffer>;
+ unwrapKey(format: string, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier, unwrappedKeyAlgorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: string[]): PromiseLike<CryptoKey>;
+ verify(algorithm: string | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, signature: BufferSource, data: BufferSource): PromiseLike<boolean>;
+ wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier): PromiseLike<ArrayBuffer>;
}
declare var SubtleCrypto: {
@@ -15824,8 +17256,7 @@ declare var SubtleCrypto: {
}
interface Text extends CharacterData {
- wholeText: string;
- replaceWholeText(content: string): Text;
+ readonly wholeText: string;
splitText(offset: number): Text;
}
@@ -15835,39 +17266,39 @@ declare var Text: {
}
interface TextEvent extends UIEvent {
- data: string;
- inputMethod: number;
- locale: string;
+ readonly data: string;
+ readonly inputMethod: number;
+ readonly locale: string;
initTextEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, dataArg: string, inputMethod: number, locale: string): void;
- DOM_INPUT_METHOD_DROP: number;
- DOM_INPUT_METHOD_HANDWRITING: number;
- DOM_INPUT_METHOD_IME: number;
- DOM_INPUT_METHOD_KEYBOARD: number;
- DOM_INPUT_METHOD_MULTIMODAL: number;
- DOM_INPUT_METHOD_OPTION: number;
- DOM_INPUT_METHOD_PASTE: number;
- DOM_INPUT_METHOD_SCRIPT: number;
- DOM_INPUT_METHOD_UNKNOWN: number;
- DOM_INPUT_METHOD_VOICE: number;
+ readonly DOM_INPUT_METHOD_DROP: number;
+ readonly DOM_INPUT_METHOD_HANDWRITING: number;
+ readonly DOM_INPUT_METHOD_IME: number;
+ readonly DOM_INPUT_METHOD_KEYBOARD: number;
+ readonly DOM_INPUT_METHOD_MULTIMODAL: number;
+ readonly DOM_INPUT_METHOD_OPTION: number;
+ readonly DOM_INPUT_METHOD_PASTE: number;
+ readonly DOM_INPUT_METHOD_SCRIPT: number;
+ readonly DOM_INPUT_METHOD_UNKNOWN: number;
+ readonly DOM_INPUT_METHOD_VOICE: number;
}
declare var TextEvent: {
prototype: TextEvent;
new(): TextEvent;
- DOM_INPUT_METHOD_DROP: number;
- DOM_INPUT_METHOD_HANDWRITING: number;
- DOM_INPUT_METHOD_IME: number;
- DOM_INPUT_METHOD_KEYBOARD: number;
- DOM_INPUT_METHOD_MULTIMODAL: number;
- DOM_INPUT_METHOD_OPTION: number;
- DOM_INPUT_METHOD_PASTE: number;
- DOM_INPUT_METHOD_SCRIPT: number;
- DOM_INPUT_METHOD_UNKNOWN: number;
- DOM_INPUT_METHOD_VOICE: number;
+ readonly DOM_INPUT_METHOD_DROP: number;
+ readonly DOM_INPUT_METHOD_HANDWRITING: number;
+ readonly DOM_INPUT_METHOD_IME: number;
+ readonly DOM_INPUT_METHOD_KEYBOARD: number;
+ readonly DOM_INPUT_METHOD_MULTIMODAL: number;
+ readonly DOM_INPUT_METHOD_OPTION: number;
+ readonly DOM_INPUT_METHOD_PASTE: number;
+ readonly DOM_INPUT_METHOD_SCRIPT: number;
+ readonly DOM_INPUT_METHOD_UNKNOWN: number;
+ readonly DOM_INPUT_METHOD_VOICE: number;
}
interface TextMetrics {
- width: number;
+ readonly width: number;
}
declare var TextMetrics: {
@@ -15875,113 +17306,57 @@ declare var TextMetrics: {
new(): TextMetrics;
}
-interface TextRange {
- boundingHeight: number;
- boundingLeft: number;
- boundingTop: number;
- boundingWidth: number;
- htmlText: string;
- offsetLeft: number;
- offsetTop: number;
- text: string;
- collapse(start?: boolean): void;
- compareEndPoints(how: string, sourceRange: TextRange): number;
- duplicate(): TextRange;
- execCommand(cmdID: string, showUI?: boolean, value?: any): boolean;
- execCommandShowHelp(cmdID: string): boolean;
- expand(Unit: string): boolean;
- findText(string: string, count?: number, flags?: number): boolean;
- getBookmark(): string;
- getBoundingClientRect(): ClientRect;
- getClientRects(): ClientRectList;
- inRange(range: TextRange): boolean;
- isEqual(range: TextRange): boolean;
- move(unit: string, count?: number): number;
- moveEnd(unit: string, count?: number): number;
- moveStart(unit: string, count?: number): number;
- moveToBookmark(bookmark: string): boolean;
- moveToElementText(element: Element): void;
- moveToPoint(x: number, y: number): void;
- parentElement(): Element;
- pasteHTML(html: string): void;
- queryCommandEnabled(cmdID: string): boolean;
- queryCommandIndeterm(cmdID: string): boolean;
- queryCommandState(cmdID: string): boolean;
- queryCommandSupported(cmdID: string): boolean;
- queryCommandText(cmdID: string): string;
- queryCommandValue(cmdID: string): any;
- scrollIntoView(fStart?: boolean): void;
- select(): void;
- setEndPoint(how: string, SourceRange: TextRange): void;
-}
-
-declare var TextRange: {
- prototype: TextRange;
- new(): TextRange;
-}
-
-interface TextRangeCollection {
- length: number;
- item(index: number): TextRange;
- [index: number]: TextRange;
-}
-
-declare var TextRangeCollection: {
- prototype: TextRangeCollection;
- new(): TextRangeCollection;
-}
-
interface TextTrack extends EventTarget {
- activeCues: TextTrackCueList;
- cues: TextTrackCueList;
- inBandMetadataTrackDispatchType: string;
- kind: string;
- label: string;
- language: string;
+ readonly activeCues: TextTrackCueList;
+ readonly cues: TextTrackCueList;
+ readonly inBandMetadataTrackDispatchType: string;
+ readonly kind: string;
+ readonly label: string;
+ readonly language: string;
mode: any;
- oncuechange: (ev: Event) => any;
- onerror: (ev: Event) => any;
- onload: (ev: Event) => any;
- readyState: number;
+ oncuechange: (this: this, ev: Event) => any;
+ onerror: (this: this, ev: ErrorEvent) => any;
+ onload: (this: this, ev: Event) => any;
+ readonly readyState: number;
addCue(cue: TextTrackCue): void;
removeCue(cue: TextTrackCue): void;
- DISABLED: number;
- ERROR: number;
- HIDDEN: number;
- LOADED: number;
- LOADING: number;
- NONE: number;
- SHOWING: number;
- addEventListener(type: "cuechange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
+ readonly DISABLED: number;
+ readonly ERROR: number;
+ readonly HIDDEN: number;
+ readonly LOADED: number;
+ readonly LOADING: number;
+ readonly NONE: number;
+ readonly SHOWING: number;
+ addEventListener(type: "cuechange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
declare var TextTrack: {
prototype: TextTrack;
new(): TextTrack;
- DISABLED: number;
- ERROR: number;
- HIDDEN: number;
- LOADED: number;
- LOADING: number;
- NONE: number;
- SHOWING: number;
+ readonly DISABLED: number;
+ readonly ERROR: number;
+ readonly HIDDEN: number;
+ readonly LOADED: number;
+ readonly LOADING: number;
+ readonly NONE: number;
+ readonly SHOWING: number;
}
interface TextTrackCue extends EventTarget {
endTime: number;
id: string;
- onenter: (ev: Event) => any;
- onexit: (ev: Event) => any;
+ onenter: (this: this, ev: Event) => any;
+ onexit: (this: this, ev: Event) => any;
pauseOnExit: boolean;
startTime: number;
text: string;
- track: TextTrack;
+ readonly track: TextTrack;
getCueAsHTML(): DocumentFragment;
- addEventListener(type: "enter", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "exit", listener: (ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "enter", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "exit", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -15991,7 +17366,7 @@ declare var TextTrackCue: {
}
interface TextTrackCueList {
- length: number;
+ readonly length: number;
getCueById(id: string): TextTrackCue;
item(index: number): TextTrackCue;
[index: number]: TextTrackCue;
@@ -16003,10 +17378,10 @@ declare var TextTrackCueList: {
}
interface TextTrackList extends EventTarget {
- length: number;
- onaddtrack: (ev: TrackEvent) => any;
+ readonly length: number;
+ onaddtrack: ((this: this, ev: TrackEvent) => any) | null;
item(index: number): TextTrack;
- addEventListener(type: "addtrack", listener: (ev: TrackEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "addtrack", listener: (this: this, ev: TrackEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
[index: number]: TextTrack;
}
@@ -16017,7 +17392,7 @@ declare var TextTrackList: {
}
interface TimeRanges {
- length: number;
+ readonly length: number;
end(index: number): number;
start(index: number): number;
}
@@ -16028,14 +17403,14 @@ declare var TimeRanges: {
}
interface Touch {
- clientX: number;
- clientY: number;
- identifier: number;
- pageX: number;
- pageY: number;
- screenX: number;
- screenY: number;
- target: EventTarget;
+ readonly clientX: number;
+ readonly clientY: number;
+ readonly identifier: number;
+ readonly pageX: number;
+ readonly pageY: number;
+ readonly screenX: number;
+ readonly screenY: number;
+ readonly target: EventTarget;
}
declare var Touch: {
@@ -16044,13 +17419,13 @@ declare var Touch: {
}
interface TouchEvent extends UIEvent {
- altKey: boolean;
- changedTouches: TouchList;
- ctrlKey: boolean;
- metaKey: boolean;
- shiftKey: boolean;
- targetTouches: TouchList;
- touches: TouchList;
+ readonly altKey: boolean;
+ readonly changedTouches: TouchList;
+ readonly ctrlKey: boolean;
+ readonly metaKey: boolean;
+ readonly shiftKey: boolean;
+ readonly targetTouches: TouchList;
+ readonly touches: TouchList;
}
declare var TouchEvent: {
@@ -16059,8 +17434,8 @@ declare var TouchEvent: {
}
interface TouchList {
- length: number;
- item(index: number): Touch;
+ readonly length: number;
+ item(index: number): Touch | null;
[index: number]: Touch;
}
@@ -16070,7 +17445,7 @@ declare var TouchList: {
}
interface TrackEvent extends Event {
- track: any;
+ readonly track: any;
}
declare var TrackEvent: {
@@ -16079,8 +17454,8 @@ declare var TrackEvent: {
}
interface TransitionEvent extends Event {
- elapsedTime: number;
- propertyName: string;
+ readonly elapsedTime: number;
+ readonly propertyName: string;
initTransitionEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, propertyNameArg: string, elapsedTimeArg: number): void;
}
@@ -16091,10 +17466,10 @@ declare var TransitionEvent: {
interface TreeWalker {
currentNode: Node;
- expandEntityReferences: boolean;
- filter: NodeFilter;
- root: Node;
- whatToShow: number;
+ readonly expandEntityReferences: boolean;
+ readonly filter: NodeFilter;
+ readonly root: Node;
+ readonly whatToShow: number;
firstChild(): Node;
lastChild(): Node;
nextNode(): Node;
@@ -16110,8 +17485,8 @@ declare var TreeWalker: {
}
interface UIEvent extends Event {
- detail: number;
- view: Window;
+ readonly detail: number;
+ readonly view: Window;
initUIEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number): void;
}
@@ -16121,13 +17496,29 @@ declare var UIEvent: {
}
interface URL {
+ hash: string;
+ host: string;
+ hostname: string;
+ href: string;
+ readonly origin: string;
+ password: string;
+ pathname: string;
+ port: string;
+ protocol: string;
+ search: string;
+ username: string;
+ toString(): string;
+}
+
+declare var URL: {
+ prototype: URL;
+ new(url: string, base?: string): URL;
createObjectURL(object: any, options?: ObjectURLOptions): string;
revokeObjectURL(url: string): void;
}
-declare var URL: URL;
interface UnviewableContentIdentifiedEvent extends NavigationEventWithReferrer {
- mediaType: string;
+ readonly mediaType: string;
}
declare var UnviewableContentIdentifiedEvent: {
@@ -16136,16 +17527,16 @@ declare var UnviewableContentIdentifiedEvent: {
}
interface ValidityState {
- badInput: boolean;
- customError: boolean;
- patternMismatch: boolean;
- rangeOverflow: boolean;
- rangeUnderflow: boolean;
- stepMismatch: boolean;
- tooLong: boolean;
- typeMismatch: boolean;
- valid: boolean;
- valueMissing: boolean;
+ readonly badInput: boolean;
+ readonly customError: boolean;
+ readonly patternMismatch: boolean;
+ readonly rangeOverflow: boolean;
+ readonly rangeUnderflow: boolean;
+ readonly stepMismatch: boolean;
+ readonly tooLong: boolean;
+ readonly typeMismatch: boolean;
+ readonly valid: boolean;
+ readonly valueMissing: boolean;
}
declare var ValidityState: {
@@ -16154,11 +17545,11 @@ declare var ValidityState: {
}
interface VideoPlaybackQuality {
- corruptedVideoFrames: number;
- creationTime: number;
- droppedVideoFrames: number;
- totalFrameDelay: number;
- totalVideoFrames: number;
+ readonly corruptedVideoFrames: number;
+ readonly creationTime: number;
+ readonly droppedVideoFrames: number;
+ readonly totalFrameDelay: number;
+ readonly totalVideoFrames: number;
}
declare var VideoPlaybackQuality: {
@@ -16167,12 +17558,12 @@ declare var VideoPlaybackQuality: {
}
interface VideoTrack {
- id: string;
+ readonly id: string;
kind: string;
- label: string;
+ readonly label: string;
language: string;
selected: boolean;
- sourceBuffer: SourceBuffer;
+ readonly sourceBuffer: SourceBuffer;
}
declare var VideoTrack: {
@@ -16181,16 +17572,16 @@ declare var VideoTrack: {
}
interface VideoTrackList extends EventTarget {
- length: number;
- onaddtrack: (ev: TrackEvent) => any;
- onchange: (ev: Event) => any;
- onremovetrack: (ev: TrackEvent) => any;
- selectedIndex: number;
- getTrackById(id: string): VideoTrack;
+ readonly length: number;
+ onaddtrack: (this: this, ev: TrackEvent) => any;
+ onchange: (this: this, ev: Event) => any;
+ onremovetrack: (this: this, ev: TrackEvent) => any;
+ readonly selectedIndex: number;
+ getTrackById(id: string): VideoTrack | null;
item(index: number): VideoTrack;
- addEventListener(type: "addtrack", listener: (ev: TrackEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "removetrack", listener: (ev: TrackEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "addtrack", listener: (this: this, ev: TrackEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "change", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "removetrack", listener: (this: this, ev: TrackEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
[index: number]: VideoTrack;
}
@@ -16201,45 +17592,45 @@ declare var VideoTrackList: {
}
interface WEBGL_compressed_texture_s3tc {
- COMPRESSED_RGBA_S3TC_DXT1_EXT: number;
- COMPRESSED_RGBA_S3TC_DXT3_EXT: number;
- COMPRESSED_RGBA_S3TC_DXT5_EXT: number;
- COMPRESSED_RGB_S3TC_DXT1_EXT: number;
+ readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: number;
+ readonly COMPRESSED_RGBA_S3TC_DXT3_EXT: number;
+ readonly COMPRESSED_RGBA_S3TC_DXT5_EXT: number;
+ readonly COMPRESSED_RGB_S3TC_DXT1_EXT: number;
}
declare var WEBGL_compressed_texture_s3tc: {
prototype: WEBGL_compressed_texture_s3tc;
new(): WEBGL_compressed_texture_s3tc;
- COMPRESSED_RGBA_S3TC_DXT1_EXT: number;
- COMPRESSED_RGBA_S3TC_DXT3_EXT: number;
- COMPRESSED_RGBA_S3TC_DXT5_EXT: number;
- COMPRESSED_RGB_S3TC_DXT1_EXT: number;
+ readonly COMPRESSED_RGBA_S3TC_DXT1_EXT: number;
+ readonly COMPRESSED_RGBA_S3TC_DXT3_EXT: number;
+ readonly COMPRESSED_RGBA_S3TC_DXT5_EXT: number;
+ readonly COMPRESSED_RGB_S3TC_DXT1_EXT: number;
}
interface WEBGL_debug_renderer_info {
- UNMASKED_RENDERER_WEBGL: number;
- UNMASKED_VENDOR_WEBGL: number;
+ readonly UNMASKED_RENDERER_WEBGL: number;
+ readonly UNMASKED_VENDOR_WEBGL: number;
}
declare var WEBGL_debug_renderer_info: {
prototype: WEBGL_debug_renderer_info;
new(): WEBGL_debug_renderer_info;
- UNMASKED_RENDERER_WEBGL: number;
- UNMASKED_VENDOR_WEBGL: number;
+ readonly UNMASKED_RENDERER_WEBGL: number;
+ readonly UNMASKED_VENDOR_WEBGL: number;
}
interface WEBGL_depth_texture {
- UNSIGNED_INT_24_8_WEBGL: number;
+ readonly UNSIGNED_INT_24_8_WEBGL: number;
}
declare var WEBGL_depth_texture: {
prototype: WEBGL_depth_texture;
new(): WEBGL_depth_texture;
- UNSIGNED_INT_24_8_WEBGL: number;
+ readonly UNSIGNED_INT_24_8_WEBGL: number;
}
interface WaveShaperNode extends AudioNode {
- curve: Float32Array;
+ curve: Float32Array | null;
oversample: string;
}
@@ -16249,9 +17640,9 @@ declare var WaveShaperNode: {
}
interface WebGLActiveInfo {
- name: string;
- size: number;
- type: number;
+ readonly name: string;
+ readonly size: number;
+ readonly type: number;
}
declare var WebGLActiveInfo: {
@@ -16268,12 +17659,12 @@ declare var WebGLBuffer: {
}
interface WebGLContextEvent extends Event {
- statusMessage: string;
+ readonly statusMessage: string;
}
declare var WebGLContextEvent: {
prototype: WebGLContextEvent;
- new(): WebGLContextEvent;
+ new(type: string, eventInitDict?: WebGLContextEventInit): WebGLContextEvent;
}
interface WebGLFramebuffer extends WebGLObject {
@@ -16309,16 +17700,16 @@ declare var WebGLRenderbuffer: {
}
interface WebGLRenderingContext {
- canvas: HTMLCanvasElement;
- drawingBufferHeight: number;
- drawingBufferWidth: number;
+ readonly canvas: HTMLCanvasElement;
+ readonly drawingBufferHeight: number;
+ readonly drawingBufferWidth: number;
activeTexture(texture: number): void;
- attachShader(program: WebGLProgram, shader: WebGLShader): void;
- bindAttribLocation(program: WebGLProgram, index: number, name: string): void;
- bindBuffer(target: number, buffer: WebGLBuffer): void;
- bindFramebuffer(target: number, framebuffer: WebGLFramebuffer): void;
- bindRenderbuffer(target: number, renderbuffer: WebGLRenderbuffer): void;
- bindTexture(target: number, texture: WebGLTexture): void;
+ attachShader(program: WebGLProgram | null, shader: WebGLShader | null): void;
+ bindAttribLocation(program: WebGLProgram | null, index: number, name: string): void;
+ bindBuffer(target: number, buffer: WebGLBuffer | null): void;
+ bindFramebuffer(target: number, framebuffer: WebGLFramebuffer | null): void;
+ bindRenderbuffer(target: number, renderbuffer: WebGLRenderbuffer | null): void;
+ bindTexture(target: number, texture: WebGLTexture | null): void;
blendColor(red: number, green: number, blue: number, alpha: number): void;
blendEquation(mode: number): void;
blendEquationSeparate(modeRGB: number, modeAlpha: number): void;
@@ -16332,28 +17723,28 @@ interface WebGLRenderingContext {
clearDepth(depth: number): void;
clearStencil(s: number): void;
colorMask(red: boolean, green: boolean, blue: boolean, alpha: boolean): void;
- compileShader(shader: WebGLShader): void;
+ compileShader(shader: WebGLShader | null): void;
compressedTexImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, data: ArrayBufferView): void;
compressedTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, data: ArrayBufferView): void;
copyTexImage2D(target: number, level: number, internalformat: number, x: number, y: number, width: number, height: number, border: number): void;
copyTexSubImage2D(target: number, level: number, xoffset: number, yoffset: number, x: number, y: number, width: number, height: number): void;
- createBuffer(): WebGLBuffer;
- createFramebuffer(): WebGLFramebuffer;
- createProgram(): WebGLProgram;
- createRenderbuffer(): WebGLRenderbuffer;
- createShader(type: number): WebGLShader;
- createTexture(): WebGLTexture;
+ createBuffer(): WebGLBuffer | null;
+ createFramebuffer(): WebGLFramebuffer | null;
+ createProgram(): WebGLProgram | null;
+ createRenderbuffer(): WebGLRenderbuffer | null;
+ createShader(type: number): WebGLShader | null;
+ createTexture(): WebGLTexture | null;
cullFace(mode: number): void;
- deleteBuffer(buffer: WebGLBuffer): void;
- deleteFramebuffer(framebuffer: WebGLFramebuffer): void;
- deleteProgram(program: WebGLProgram): void;
- deleteRenderbuffer(renderbuffer: WebGLRenderbuffer): void;
- deleteShader(shader: WebGLShader): void;
- deleteTexture(texture: WebGLTexture): void;
+ deleteBuffer(buffer: WebGLBuffer | null): void;
+ deleteFramebuffer(framebuffer: WebGLFramebuffer | null): void;
+ deleteProgram(program: WebGLProgram | null): void;
+ deleteRenderbuffer(renderbuffer: WebGLRenderbuffer | null): void;
+ deleteShader(shader: WebGLShader | null): void;
+ deleteTexture(texture: WebGLTexture | null): void;
depthFunc(func: number): void;
depthMask(flag: boolean): void;
depthRange(zNear: number, zFar: number): void;
- detachShader(program: WebGLProgram, shader: WebGLShader): void;
+ detachShader(program: WebGLProgram | null, shader: WebGLShader | null): void;
disable(cap: number): void;
disableVertexAttribArray(index: number): void;
drawArrays(mode: number, first: number, count: number): void;
@@ -16362,699 +17753,693 @@ interface WebGLRenderingContext {
enableVertexAttribArray(index: number): void;
finish(): void;
flush(): void;
- framebufferRenderbuffer(target: number, attachment: number, renderbuffertarget: number, renderbuffer: WebGLRenderbuffer): void;
- framebufferTexture2D(target: number, attachment: number, textarget: number, texture: WebGLTexture, level: number): void;
+ framebufferRenderbuffer(target: number, attachment: number, renderbuffertarget: number, renderbuffer: WebGLRenderbuffer | null): void;
+ framebufferTexture2D(target: number, attachment: number, textarget: number, texture: WebGLTexture | null, level: number): void;
frontFace(mode: number): void;
generateMipmap(target: number): void;
- getActiveAttrib(program: WebGLProgram, index: number): WebGLActiveInfo;
- getActiveUniform(program: WebGLProgram, index: number): WebGLActiveInfo;
- getAttachedShaders(program: WebGLProgram): WebGLShader[];
- getAttribLocation(program: WebGLProgram, name: string): number;
+ getActiveAttrib(program: WebGLProgram | null, index: number): WebGLActiveInfo | null;
+ getActiveUniform(program: WebGLProgram | null, index: number): WebGLActiveInfo | null;
+ getAttachedShaders(program: WebGLProgram | null): WebGLShader[] | null;
+ getAttribLocation(program: WebGLProgram | null, name: string): number;
getBufferParameter(target: number, pname: number): any;
getContextAttributes(): WebGLContextAttributes;
getError(): number;
getExtension(name: string): any;
getFramebufferAttachmentParameter(target: number, attachment: number, pname: number): any;
getParameter(pname: number): any;
- getProgramInfoLog(program: WebGLProgram): string;
- getProgramParameter(program: WebGLProgram, pname: number): any;
+ getProgramInfoLog(program: WebGLProgram | null): string | null;
+ getProgramParameter(program: WebGLProgram | null, pname: number): any;
getRenderbufferParameter(target: number, pname: number): any;
- getShaderInfoLog(shader: WebGLShader): string;
- getShaderParameter(shader: WebGLShader, pname: number): any;
- getShaderPrecisionFormat(shadertype: number, precisiontype: number): WebGLShaderPrecisionFormat;
- getShaderSource(shader: WebGLShader): string;
- getSupportedExtensions(): string[];
+ getShaderInfoLog(shader: WebGLShader | null): string | null;
+ getShaderParameter(shader: WebGLShader | null, pname: number): any;
+ getShaderPrecisionFormat(shadertype: number, precisiontype: number): WebGLShaderPrecisionFormat | null;
+ getShaderSource(shader: WebGLShader | null): string | null;
+ getSupportedExtensions(): string[] | null;
getTexParameter(target: number, pname: number): any;
- getUniform(program: WebGLProgram, location: WebGLUniformLocation): any;
- getUniformLocation(program: WebGLProgram, name: string): WebGLUniformLocation;
+ getUniform(program: WebGLProgram | null, location: WebGLUniformLocation | null): any;
+ getUniformLocation(program: WebGLProgram | null, name: string): WebGLUniformLocation | null;
getVertexAttrib(index: number, pname: number): any;
getVertexAttribOffset(index: number, pname: number): number;
hint(target: number, mode: number): void;
- isBuffer(buffer: WebGLBuffer): boolean;
+ isBuffer(buffer: WebGLBuffer | null): boolean;
isContextLost(): boolean;
isEnabled(cap: number): boolean;
- isFramebuffer(framebuffer: WebGLFramebuffer): boolean;
- isProgram(program: WebGLProgram): boolean;
- isRenderbuffer(renderbuffer: WebGLRenderbuffer): boolean;
- isShader(shader: WebGLShader): boolean;
- isTexture(texture: WebGLTexture): boolean;
+ isFramebuffer(framebuffer: WebGLFramebuffer | null): boolean;
+ isProgram(program: WebGLProgram | null): boolean;
+ isRenderbuffer(renderbuffer: WebGLRenderbuffer | null): boolean;
+ isShader(shader: WebGLShader | null): boolean;
+ isTexture(texture: WebGLTexture | null): boolean;
lineWidth(width: number): void;
- linkProgram(program: WebGLProgram): void;
+ linkProgram(program: WebGLProgram | null): void;
pixelStorei(pname: number, param: number): void;
polygonOffset(factor: number, units: number): void;
- readPixels(x: number, y: number, width: number, height: number, format: number, type: number, pixels: ArrayBufferView): void;
+ readPixels(x: number, y: number, width: number, height: number, format: number, type: number, pixels: ArrayBufferView | null): void;
renderbufferStorage(target: number, internalformat: number, width: number, height: number): void;
sampleCoverage(value: number, invert: boolean): void;
scissor(x: number, y: number, width: number, height: number): void;
- shaderSource(shader: WebGLShader, source: string): void;
+ shaderSource(shader: WebGLShader | null, source: string): void;
stencilFunc(func: number, ref: number, mask: number): void;
stencilFuncSeparate(face: number, func: number, ref: number, mask: number): void;
stencilMask(mask: number): void;
stencilMaskSeparate(face: number, mask: number): void;
stencilOp(fail: number, zfail: number, zpass: number): void;
stencilOpSeparate(face: number, fail: number, zfail: number, zpass: number): void;
- texImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, format: number, type: number, pixels: ArrayBufferView): void;
- texImage2D(target: number, level: number, internalformat: number, format: number, type: number, image: HTMLImageElement): void;
- texImage2D(target: number, level: number, internalformat: number, format: number, type: number, canvas: HTMLCanvasElement): void;
- texImage2D(target: number, level: number, internalformat: number, format: number, type: number, video: HTMLVideoElement): void;
- texImage2D(target: number, level: number, internalformat: number, format: number, type: number, pixels: ImageData): void;
+ texImage2D(target: number, level: number, internalformat: number, width: number, height: number, border: number, format: number, type: number, pixels?: ArrayBufferView): void;
+ texImage2D(target: number, level: number, internalformat: number, format: number, type: number, pixels?: ImageData | HTMLVideoElement | HTMLImageElement | HTMLCanvasElement): void;
texParameterf(target: number, pname: number, param: number): void;
texParameteri(target: number, pname: number, param: number): void;
- texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, type: number, pixels: ArrayBufferView): void;
- texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, format: number, type: number, image: HTMLImageElement): void;
- texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, format: number, type: number, canvas: HTMLCanvasElement): void;
- texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, format: number, type: number, video: HTMLVideoElement): void;
- texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, format: number, type: number, pixels: ImageData): void;
- uniform1f(location: WebGLUniformLocation, x: number): void;
- uniform1fv(location: WebGLUniformLocation, v: Float32Array): void;
- uniform1i(location: WebGLUniformLocation, x: number): void;
- uniform1iv(location: WebGLUniformLocation, v: Int32Array): void;
- uniform2f(location: WebGLUniformLocation, x: number, y: number): void;
- uniform2fv(location: WebGLUniformLocation, v: Float32Array): void;
- uniform2i(location: WebGLUniformLocation, x: number, y: number): void;
- uniform2iv(location: WebGLUniformLocation, v: Int32Array): void;
- uniform3f(location: WebGLUniformLocation, x: number, y: number, z: number): void;
- uniform3fv(location: WebGLUniformLocation, v: Float32Array): void;
- uniform3i(location: WebGLUniformLocation, x: number, y: number, z: number): void;
- uniform3iv(location: WebGLUniformLocation, v: Int32Array): void;
- uniform4f(location: WebGLUniformLocation, x: number, y: number, z: number, w: number): void;
- uniform4fv(location: WebGLUniformLocation, v: Float32Array): void;
- uniform4i(location: WebGLUniformLocation, x: number, y: number, z: number, w: number): void;
- uniform4iv(location: WebGLUniformLocation, v: Int32Array): void;
- uniformMatrix2fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array): void;
- uniformMatrix3fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array): void;
- uniformMatrix4fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array): void;
- useProgram(program: WebGLProgram): void;
- validateProgram(program: WebGLProgram): void;
+ texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, width: number, height: number, format: number, type: number, pixels?: ArrayBufferView): void;
+ texSubImage2D(target: number, level: number, xoffset: number, yoffset: number, format: number, type: number, pixels?: ImageData | HTMLVideoElement | HTMLImageElement | HTMLCanvasElement): void;
+ uniform1f(location: WebGLUniformLocation | null, x: number): void;
+ uniform1fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;
+ uniform1i(location: WebGLUniformLocation | null, x: number): void;
+ uniform1iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;
+ uniform2f(location: WebGLUniformLocation | null, x: number, y: number): void;
+ uniform2fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;
+ uniform2i(location: WebGLUniformLocation | null, x: number, y: number): void;
+ uniform2iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;
+ uniform3f(location: WebGLUniformLocation | null, x: number, y: number, z: number): void;
+ uniform3fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;
+ uniform3i(location: WebGLUniformLocation | null, x: number, y: number, z: number): void;
+ uniform3iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;
+ uniform4f(location: WebGLUniformLocation | null, x: number, y: number, z: number, w: number): void;
+ uniform4fv(location: WebGLUniformLocation, v: Float32Array | number[]): void;
+ uniform4i(location: WebGLUniformLocation | null, x: number, y: number, z: number, w: number): void;
+ uniform4iv(location: WebGLUniformLocation, v: Int32Array | number[]): void;
+ uniformMatrix2fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array | number[]): void;
+ uniformMatrix3fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array | number[]): void;
+ uniformMatrix4fv(location: WebGLUniformLocation, transpose: boolean, value: Float32Array | number[]): void;
+ useProgram(program: WebGLProgram | null): void;
+ validateProgram(program: WebGLProgram | null): void;
vertexAttrib1f(indx: number, x: number): void;
- vertexAttrib1fv(indx: number, values: Float32Array): void;
+ vertexAttrib1fv(indx: number, values: Float32Array | number[]): void;
vertexAttrib2f(indx: number, x: number, y: number): void;
- vertexAttrib2fv(indx: number, values: Float32Array): void;
+ vertexAttrib2fv(indx: number, values: Float32Array | number[]): void;
vertexAttrib3f(indx: number, x: number, y: number, z: number): void;
- vertexAttrib3fv(indx: number, values: Float32Array): void;
+ vertexAttrib3fv(indx: number, values: Float32Array | number[]): void;
vertexAttrib4f(indx: number, x: number, y: number, z: number, w: number): void;
- vertexAttrib4fv(indx: number, values: Float32Array): void;
+ vertexAttrib4fv(indx: number, values: Float32Array | number[]): void;
vertexAttribPointer(indx: number, size: number, type: number, normalized: boolean, stride: number, offset: number): void;
viewport(x: number, y: number, width: number, height: number): void;
- ACTIVE_ATTRIBUTES: number;
- ACTIVE_TEXTURE: number;
- ACTIVE_UNIFORMS: number;
- ALIASED_LINE_WIDTH_RANGE: number;
- ALIASED_POINT_SIZE_RANGE: number;
- ALPHA: number;
- ALPHA_BITS: number;
- ALWAYS: number;
- ARRAY_BUFFER: number;
- ARRAY_BUFFER_BINDING: number;
- ATTACHED_SHADERS: number;
- BACK: number;
- BLEND: number;
- BLEND_COLOR: number;
- BLEND_DST_ALPHA: number;
- BLEND_DST_RGB: number;
- BLEND_EQUATION: number;
- BLEND_EQUATION_ALPHA: number;
- BLEND_EQUATION_RGB: number;
- BLEND_SRC_ALPHA: number;
- BLEND_SRC_RGB: number;
- BLUE_BITS: number;
- BOOL: number;
- BOOL_VEC2: number;
- BOOL_VEC3: number;
- BOOL_VEC4: number;
- BROWSER_DEFAULT_WEBGL: number;
- BUFFER_SIZE: number;
- BUFFER_USAGE: number;
- BYTE: number;
- CCW: number;
- CLAMP_TO_EDGE: number;
- COLOR_ATTACHMENT0: number;
- COLOR_BUFFER_BIT: number;
- COLOR_CLEAR_VALUE: number;
- COLOR_WRITEMASK: number;
- COMPILE_STATUS: number;
- COMPRESSED_TEXTURE_FORMATS: number;
- CONSTANT_ALPHA: number;
- CONSTANT_COLOR: number;
- CONTEXT_LOST_WEBGL: number;
- CULL_FACE: number;
- CULL_FACE_MODE: number;
- CURRENT_PROGRAM: number;
- CURRENT_VERTEX_ATTRIB: number;
- CW: number;
- DECR: number;
- DECR_WRAP: number;
- DELETE_STATUS: number;
- DEPTH_ATTACHMENT: number;
- DEPTH_BITS: number;
- DEPTH_BUFFER_BIT: number;
- DEPTH_CLEAR_VALUE: number;
- DEPTH_COMPONENT: number;
- DEPTH_COMPONENT16: number;
- DEPTH_FUNC: number;
- DEPTH_RANGE: number;
- DEPTH_STENCIL: number;
- DEPTH_STENCIL_ATTACHMENT: number;
- DEPTH_TEST: number;
- DEPTH_WRITEMASK: number;
- DITHER: number;
- DONT_CARE: number;
- DST_ALPHA: number;
- DST_COLOR: number;
- DYNAMIC_DRAW: number;
- ELEMENT_ARRAY_BUFFER: number;
- ELEMENT_ARRAY_BUFFER_BINDING: number;
- EQUAL: number;
- FASTEST: number;
- FLOAT: number;
- FLOAT_MAT2: number;
- FLOAT_MAT3: number;
- FLOAT_MAT4: number;
- FLOAT_VEC2: number;
- FLOAT_VEC3: number;
- FLOAT_VEC4: number;
- FRAGMENT_SHADER: number;
- FRAMEBUFFER: number;
- FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: number;
- FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: number;
- FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: number;
- FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: number;
- FRAMEBUFFER_BINDING: number;
- FRAMEBUFFER_COMPLETE: number;
- FRAMEBUFFER_INCOMPLETE_ATTACHMENT: number;
- FRAMEBUFFER_INCOMPLETE_DIMENSIONS: number;
- FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: number;
- FRAMEBUFFER_UNSUPPORTED: number;
- FRONT: number;
- FRONT_AND_BACK: number;
- FRONT_FACE: number;
- FUNC_ADD: number;
- FUNC_REVERSE_SUBTRACT: number;
- FUNC_SUBTRACT: number;
- GENERATE_MIPMAP_HINT: number;
- GEQUAL: number;
- GREATER: number;
- GREEN_BITS: number;
- HIGH_FLOAT: number;
- HIGH_INT: number;
- IMPLEMENTATION_COLOR_READ_FORMAT: number;
- IMPLEMENTATION_COLOR_READ_TYPE: number;
- INCR: number;
- INCR_WRAP: number;
- INT: number;
- INT_VEC2: number;
- INT_VEC3: number;
- INT_VEC4: number;
- INVALID_ENUM: number;
- INVALID_FRAMEBUFFER_OPERATION: number;
- INVALID_OPERATION: number;
- INVALID_VALUE: number;
- INVERT: number;
- KEEP: number;
- LEQUAL: number;
- LESS: number;
- LINEAR: number;
- LINEAR_MIPMAP_LINEAR: number;
- LINEAR_MIPMAP_NEAREST: number;
- LINES: number;
- LINE_LOOP: number;
- LINE_STRIP: number;
- LINE_WIDTH: number;
- LINK_STATUS: number;
- LOW_FLOAT: number;
- LOW_INT: number;
- LUMINANCE: number;
- LUMINANCE_ALPHA: number;
- MAX_COMBINED_TEXTURE_IMAGE_UNITS: number;
- MAX_CUBE_MAP_TEXTURE_SIZE: number;
- MAX_FRAGMENT_UNIFORM_VECTORS: number;
- MAX_RENDERBUFFER_SIZE: number;
- MAX_TEXTURE_IMAGE_UNITS: number;
- MAX_TEXTURE_SIZE: number;
- MAX_VARYING_VECTORS: number;
- MAX_VERTEX_ATTRIBS: number;
- MAX_VERTEX_TEXTURE_IMAGE_UNITS: number;
- MAX_VERTEX_UNIFORM_VECTORS: number;
- MAX_VIEWPORT_DIMS: number;
- MEDIUM_FLOAT: number;
- MEDIUM_INT: number;
- MIRRORED_REPEAT: number;
- NEAREST: number;
- NEAREST_MIPMAP_LINEAR: number;
- NEAREST_MIPMAP_NEAREST: number;
- NEVER: number;
- NICEST: number;
- NONE: number;
- NOTEQUAL: number;
- NO_ERROR: number;
- ONE: number;
- ONE_MINUS_CONSTANT_ALPHA: number;
- ONE_MINUS_CONSTANT_COLOR: number;
- ONE_MINUS_DST_ALPHA: number;
- ONE_MINUS_DST_COLOR: number;
- ONE_MINUS_SRC_ALPHA: number;
- ONE_MINUS_SRC_COLOR: number;
- OUT_OF_MEMORY: number;
- PACK_ALIGNMENT: number;
- POINTS: number;
- POLYGON_OFFSET_FACTOR: number;
- POLYGON_OFFSET_FILL: number;
- POLYGON_OFFSET_UNITS: number;
- RED_BITS: number;
- RENDERBUFFER: number;
- RENDERBUFFER_ALPHA_SIZE: number;
- RENDERBUFFER_BINDING: number;
- RENDERBUFFER_BLUE_SIZE: number;
- RENDERBUFFER_DEPTH_SIZE: number;
- RENDERBUFFER_GREEN_SIZE: number;
- RENDERBUFFER_HEIGHT: number;
- RENDERBUFFER_INTERNAL_FORMAT: number;
- RENDERBUFFER_RED_SIZE: number;
- RENDERBUFFER_STENCIL_SIZE: number;
- RENDERBUFFER_WIDTH: number;
- RENDERER: number;
- REPEAT: number;
- REPLACE: number;
- RGB: number;
- RGB565: number;
- RGB5_A1: number;
- RGBA: number;
- RGBA4: number;
- SAMPLER_2D: number;
- SAMPLER_CUBE: number;
- SAMPLES: number;
- SAMPLE_ALPHA_TO_COVERAGE: number;
- SAMPLE_BUFFERS: number;
- SAMPLE_COVERAGE: number;
- SAMPLE_COVERAGE_INVERT: number;
- SAMPLE_COVERAGE_VALUE: number;
- SCISSOR_BOX: number;
- SCISSOR_TEST: number;
- SHADER_TYPE: number;
- SHADING_LANGUAGE_VERSION: number;
- SHORT: number;
- SRC_ALPHA: number;
- SRC_ALPHA_SATURATE: number;
- SRC_COLOR: number;
- STATIC_DRAW: number;
- STENCIL_ATTACHMENT: number;
- STENCIL_BACK_FAIL: number;
- STENCIL_BACK_FUNC: number;
- STENCIL_BACK_PASS_DEPTH_FAIL: number;
- STENCIL_BACK_PASS_DEPTH_PASS: number;
- STENCIL_BACK_REF: number;
- STENCIL_BACK_VALUE_MASK: number;
- STENCIL_BACK_WRITEMASK: number;
- STENCIL_BITS: number;
- STENCIL_BUFFER_BIT: number;
- STENCIL_CLEAR_VALUE: number;
- STENCIL_FAIL: number;
- STENCIL_FUNC: number;
- STENCIL_INDEX: number;
- STENCIL_INDEX8: number;
- STENCIL_PASS_DEPTH_FAIL: number;
- STENCIL_PASS_DEPTH_PASS: number;
- STENCIL_REF: number;
- STENCIL_TEST: number;
- STENCIL_VALUE_MASK: number;
- STENCIL_WRITEMASK: number;
- STREAM_DRAW: number;
- SUBPIXEL_BITS: number;
- TEXTURE: number;
- TEXTURE0: number;
- TEXTURE1: number;
- TEXTURE10: number;
- TEXTURE11: number;
- TEXTURE12: number;
- TEXTURE13: number;
- TEXTURE14: number;
- TEXTURE15: number;
- TEXTURE16: number;
- TEXTURE17: number;
- TEXTURE18: number;
- TEXTURE19: number;
- TEXTURE2: number;
- TEXTURE20: number;
- TEXTURE21: number;
- TEXTURE22: number;
- TEXTURE23: number;
- TEXTURE24: number;
- TEXTURE25: number;
- TEXTURE26: number;
- TEXTURE27: number;
- TEXTURE28: number;
- TEXTURE29: number;
- TEXTURE3: number;
- TEXTURE30: number;
- TEXTURE31: number;
- TEXTURE4: number;
- TEXTURE5: number;
- TEXTURE6: number;
- TEXTURE7: number;
- TEXTURE8: number;
- TEXTURE9: number;
- TEXTURE_2D: number;
- TEXTURE_BINDING_2D: number;
- TEXTURE_BINDING_CUBE_MAP: number;
- TEXTURE_CUBE_MAP: number;
- TEXTURE_CUBE_MAP_NEGATIVE_X: number;
- TEXTURE_CUBE_MAP_NEGATIVE_Y: number;
- TEXTURE_CUBE_MAP_NEGATIVE_Z: number;
- TEXTURE_CUBE_MAP_POSITIVE_X: number;
- TEXTURE_CUBE_MAP_POSITIVE_Y: number;
- TEXTURE_CUBE_MAP_POSITIVE_Z: number;
- TEXTURE_MAG_FILTER: number;
- TEXTURE_MIN_FILTER: number;
- TEXTURE_WRAP_S: number;
- TEXTURE_WRAP_T: number;
- TRIANGLES: number;
- TRIANGLE_FAN: number;
- TRIANGLE_STRIP: number;
- UNPACK_ALIGNMENT: number;
- UNPACK_COLORSPACE_CONVERSION_WEBGL: number;
- UNPACK_FLIP_Y_WEBGL: number;
- UNPACK_PREMULTIPLY_ALPHA_WEBGL: number;
- UNSIGNED_BYTE: number;
- UNSIGNED_INT: number;
- UNSIGNED_SHORT: number;
- UNSIGNED_SHORT_4_4_4_4: number;
- UNSIGNED_SHORT_5_5_5_1: number;
- UNSIGNED_SHORT_5_6_5: number;
- VALIDATE_STATUS: number;
- VENDOR: number;
- VERSION: number;
- VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: number;
- VERTEX_ATTRIB_ARRAY_ENABLED: number;
- VERTEX_ATTRIB_ARRAY_NORMALIZED: number;
- VERTEX_ATTRIB_ARRAY_POINTER: number;
- VERTEX_ATTRIB_ARRAY_SIZE: number;
- VERTEX_ATTRIB_ARRAY_STRIDE: number;
- VERTEX_ATTRIB_ARRAY_TYPE: number;
- VERTEX_SHADER: number;
- VIEWPORT: number;
- ZERO: number;
+ readonly ACTIVE_ATTRIBUTES: number;
+ readonly ACTIVE_TEXTURE: number;
+ readonly ACTIVE_UNIFORMS: number;
+ readonly ALIASED_LINE_WIDTH_RANGE: number;
+ readonly ALIASED_POINT_SIZE_RANGE: number;
+ readonly ALPHA: number;
+ readonly ALPHA_BITS: number;
+ readonly ALWAYS: number;
+ readonly ARRAY_BUFFER: number;
+ readonly ARRAY_BUFFER_BINDING: number;
+ readonly ATTACHED_SHADERS: number;
+ readonly BACK: number;
+ readonly BLEND: number;
+ readonly BLEND_COLOR: number;
+ readonly BLEND_DST_ALPHA: number;
+ readonly BLEND_DST_RGB: number;
+ readonly BLEND_EQUATION: number;
+ readonly BLEND_EQUATION_ALPHA: number;
+ readonly BLEND_EQUATION_RGB: number;
+ readonly BLEND_SRC_ALPHA: number;
+ readonly BLEND_SRC_RGB: number;
+ readonly BLUE_BITS: number;
+ readonly BOOL: number;
+ readonly BOOL_VEC2: number;
+ readonly BOOL_VEC3: number;
+ readonly BOOL_VEC4: number;
+ readonly BROWSER_DEFAULT_WEBGL: number;
+ readonly BUFFER_SIZE: number;
+ readonly BUFFER_USAGE: number;
+ readonly BYTE: number;
+ readonly CCW: number;
+ readonly CLAMP_TO_EDGE: number;
+ readonly COLOR_ATTACHMENT0: number;
+ readonly COLOR_BUFFER_BIT: number;
+ readonly COLOR_CLEAR_VALUE: number;
+ readonly COLOR_WRITEMASK: number;
+ readonly COMPILE_STATUS: number;
+ readonly COMPRESSED_TEXTURE_FORMATS: number;
+ readonly CONSTANT_ALPHA: number;
+ readonly CONSTANT_COLOR: number;
+ readonly CONTEXT_LOST_WEBGL: number;
+ readonly CULL_FACE: number;
+ readonly CULL_FACE_MODE: number;
+ readonly CURRENT_PROGRAM: number;
+ readonly CURRENT_VERTEX_ATTRIB: number;
+ readonly CW: number;
+ readonly DECR: number;
+ readonly DECR_WRAP: number;
+ readonly DELETE_STATUS: number;
+ readonly DEPTH_ATTACHMENT: number;
+ readonly DEPTH_BITS: number;
+ readonly DEPTH_BUFFER_BIT: number;
+ readonly DEPTH_CLEAR_VALUE: number;
+ readonly DEPTH_COMPONENT: number;
+ readonly DEPTH_COMPONENT16: number;
+ readonly DEPTH_FUNC: number;
+ readonly DEPTH_RANGE: number;
+ readonly DEPTH_STENCIL: number;
+ readonly DEPTH_STENCIL_ATTACHMENT: number;
+ readonly DEPTH_TEST: number;
+ readonly DEPTH_WRITEMASK: number;
+ readonly DITHER: number;
+ readonly DONT_CARE: number;
+ readonly DST_ALPHA: number;
+ readonly DST_COLOR: number;
+ readonly DYNAMIC_DRAW: number;
+ readonly ELEMENT_ARRAY_BUFFER: number;
+ readonly ELEMENT_ARRAY_BUFFER_BINDING: number;
+ readonly EQUAL: number;
+ readonly FASTEST: number;
+ readonly FLOAT: number;
+ readonly FLOAT_MAT2: number;
+ readonly FLOAT_MAT3: number;
+ readonly FLOAT_MAT4: number;
+ readonly FLOAT_VEC2: number;
+ readonly FLOAT_VEC3: number;
+ readonly FLOAT_VEC4: number;
+ readonly FRAGMENT_SHADER: number;
+ readonly FRAMEBUFFER: number;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: number;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: number;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: number;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: number;
+ readonly FRAMEBUFFER_BINDING: number;
+ readonly FRAMEBUFFER_COMPLETE: number;
+ readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: number;
+ readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: number;
+ readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: number;
+ readonly FRAMEBUFFER_UNSUPPORTED: number;
+ readonly FRONT: number;
+ readonly FRONT_AND_BACK: number;
+ readonly FRONT_FACE: number;
+ readonly FUNC_ADD: number;
+ readonly FUNC_REVERSE_SUBTRACT: number;
+ readonly FUNC_SUBTRACT: number;
+ readonly GENERATE_MIPMAP_HINT: number;
+ readonly GEQUAL: number;
+ readonly GREATER: number;
+ readonly GREEN_BITS: number;
+ readonly HIGH_FLOAT: number;
+ readonly HIGH_INT: number;
+ readonly IMPLEMENTATION_COLOR_READ_FORMAT: number;
+ readonly IMPLEMENTATION_COLOR_READ_TYPE: number;
+ readonly INCR: number;
+ readonly INCR_WRAP: number;
+ readonly INT: number;
+ readonly INT_VEC2: number;
+ readonly INT_VEC3: number;
+ readonly INT_VEC4: number;
+ readonly INVALID_ENUM: number;
+ readonly INVALID_FRAMEBUFFER_OPERATION: number;
+ readonly INVALID_OPERATION: number;
+ readonly INVALID_VALUE: number;
+ readonly INVERT: number;
+ readonly KEEP: number;
+ readonly LEQUAL: number;
+ readonly LESS: number;
+ readonly LINEAR: number;
+ readonly LINEAR_MIPMAP_LINEAR: number;
+ readonly LINEAR_MIPMAP_NEAREST: number;
+ readonly LINES: number;
+ readonly LINE_LOOP: number;
+ readonly LINE_STRIP: number;
+ readonly LINE_WIDTH: number;
+ readonly LINK_STATUS: number;
+ readonly LOW_FLOAT: number;
+ readonly LOW_INT: number;
+ readonly LUMINANCE: number;
+ readonly LUMINANCE_ALPHA: number;
+ readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: number;
+ readonly MAX_CUBE_MAP_TEXTURE_SIZE: number;
+ readonly MAX_FRAGMENT_UNIFORM_VECTORS: number;
+ readonly MAX_RENDERBUFFER_SIZE: number;
+ readonly MAX_TEXTURE_IMAGE_UNITS: number;
+ readonly MAX_TEXTURE_SIZE: number;
+ readonly MAX_VARYING_VECTORS: number;
+ readonly MAX_VERTEX_ATTRIBS: number;
+ readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: number;
+ readonly MAX_VERTEX_UNIFORM_VECTORS: number;
+ readonly MAX_VIEWPORT_DIMS: number;
+ readonly MEDIUM_FLOAT: number;
+ readonly MEDIUM_INT: number;
+ readonly MIRRORED_REPEAT: number;
+ readonly NEAREST: number;
+ readonly NEAREST_MIPMAP_LINEAR: number;
+ readonly NEAREST_MIPMAP_NEAREST: number;
+ readonly NEVER: number;
+ readonly NICEST: number;
+ readonly NONE: number;
+ readonly NOTEQUAL: number;
+ readonly NO_ERROR: number;
+ readonly ONE: number;
+ readonly ONE_MINUS_CONSTANT_ALPHA: number;
+ readonly ONE_MINUS_CONSTANT_COLOR: number;
+ readonly ONE_MINUS_DST_ALPHA: number;
+ readonly ONE_MINUS_DST_COLOR: number;
+ readonly ONE_MINUS_SRC_ALPHA: number;
+ readonly ONE_MINUS_SRC_COLOR: number;
+ readonly OUT_OF_MEMORY: number;
+ readonly PACK_ALIGNMENT: number;
+ readonly POINTS: number;
+ readonly POLYGON_OFFSET_FACTOR: number;
+ readonly POLYGON_OFFSET_FILL: number;
+ readonly POLYGON_OFFSET_UNITS: number;
+ readonly RED_BITS: number;
+ readonly RENDERBUFFER: number;
+ readonly RENDERBUFFER_ALPHA_SIZE: number;
+ readonly RENDERBUFFER_BINDING: number;
+ readonly RENDERBUFFER_BLUE_SIZE: number;
+ readonly RENDERBUFFER_DEPTH_SIZE: number;
+ readonly RENDERBUFFER_GREEN_SIZE: number;
+ readonly RENDERBUFFER_HEIGHT: number;
+ readonly RENDERBUFFER_INTERNAL_FORMAT: number;
+ readonly RENDERBUFFER_RED_SIZE: number;
+ readonly RENDERBUFFER_STENCIL_SIZE: number;
+ readonly RENDERBUFFER_WIDTH: number;
+ readonly RENDERER: number;
+ readonly REPEAT: number;
+ readonly REPLACE: number;
+ readonly RGB: number;
+ readonly RGB565: number;
+ readonly RGB5_A1: number;
+ readonly RGBA: number;
+ readonly RGBA4: number;
+ readonly SAMPLER_2D: number;
+ readonly SAMPLER_CUBE: number;
+ readonly SAMPLES: number;
+ readonly SAMPLE_ALPHA_TO_COVERAGE: number;
+ readonly SAMPLE_BUFFERS: number;
+ readonly SAMPLE_COVERAGE: number;
+ readonly SAMPLE_COVERAGE_INVERT: number;
+ readonly SAMPLE_COVERAGE_VALUE: number;
+ readonly SCISSOR_BOX: number;
+ readonly SCISSOR_TEST: number;
+ readonly SHADER_TYPE: number;
+ readonly SHADING_LANGUAGE_VERSION: number;
+ readonly SHORT: number;
+ readonly SRC_ALPHA: number;
+ readonly SRC_ALPHA_SATURATE: number;
+ readonly SRC_COLOR: number;
+ readonly STATIC_DRAW: number;
+ readonly STENCIL_ATTACHMENT: number;
+ readonly STENCIL_BACK_FAIL: number;
+ readonly STENCIL_BACK_FUNC: number;
+ readonly STENCIL_BACK_PASS_DEPTH_FAIL: number;
+ readonly STENCIL_BACK_PASS_DEPTH_PASS: number;
+ readonly STENCIL_BACK_REF: number;
+ readonly STENCIL_BACK_VALUE_MASK: number;
+ readonly STENCIL_BACK_WRITEMASK: number;
+ readonly STENCIL_BITS: number;
+ readonly STENCIL_BUFFER_BIT: number;
+ readonly STENCIL_CLEAR_VALUE: number;
+ readonly STENCIL_FAIL: number;
+ readonly STENCIL_FUNC: number;
+ readonly STENCIL_INDEX: number;
+ readonly STENCIL_INDEX8: number;
+ readonly STENCIL_PASS_DEPTH_FAIL: number;
+ readonly STENCIL_PASS_DEPTH_PASS: number;
+ readonly STENCIL_REF: number;
+ readonly STENCIL_TEST: number;
+ readonly STENCIL_VALUE_MASK: number;
+ readonly STENCIL_WRITEMASK: number;
+ readonly STREAM_DRAW: number;
+ readonly SUBPIXEL_BITS: number;
+ readonly TEXTURE: number;
+ readonly TEXTURE0: number;
+ readonly TEXTURE1: number;
+ readonly TEXTURE10: number;
+ readonly TEXTURE11: number;
+ readonly TEXTURE12: number;
+ readonly TEXTURE13: number;
+ readonly TEXTURE14: number;
+ readonly TEXTURE15: number;
+ readonly TEXTURE16: number;
+ readonly TEXTURE17: number;
+ readonly TEXTURE18: number;
+ readonly TEXTURE19: number;
+ readonly TEXTURE2: number;
+ readonly TEXTURE20: number;
+ readonly TEXTURE21: number;
+ readonly TEXTURE22: number;
+ readonly TEXTURE23: number;
+ readonly TEXTURE24: number;
+ readonly TEXTURE25: number;
+ readonly TEXTURE26: number;
+ readonly TEXTURE27: number;
+ readonly TEXTURE28: number;
+ readonly TEXTURE29: number;
+ readonly TEXTURE3: number;
+ readonly TEXTURE30: number;
+ readonly TEXTURE31: number;
+ readonly TEXTURE4: number;
+ readonly TEXTURE5: number;
+ readonly TEXTURE6: number;
+ readonly TEXTURE7: number;
+ readonly TEXTURE8: number;
+ readonly TEXTURE9: number;
+ readonly TEXTURE_2D: number;
+ readonly TEXTURE_BINDING_2D: number;
+ readonly TEXTURE_BINDING_CUBE_MAP: number;
+ readonly TEXTURE_CUBE_MAP: number;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_X: number;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: number;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: number;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_X: number;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Y: number;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Z: number;
+ readonly TEXTURE_MAG_FILTER: number;
+ readonly TEXTURE_MIN_FILTER: number;
+ readonly TEXTURE_WRAP_S: number;
+ readonly TEXTURE_WRAP_T: number;
+ readonly TRIANGLES: number;
+ readonly TRIANGLE_FAN: number;
+ readonly TRIANGLE_STRIP: number;
+ readonly UNPACK_ALIGNMENT: number;
+ readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: number;
+ readonly UNPACK_FLIP_Y_WEBGL: number;
+ readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: number;
+ readonly UNSIGNED_BYTE: number;
+ readonly UNSIGNED_INT: number;
+ readonly UNSIGNED_SHORT: number;
+ readonly UNSIGNED_SHORT_4_4_4_4: number;
+ readonly UNSIGNED_SHORT_5_5_5_1: number;
+ readonly UNSIGNED_SHORT_5_6_5: number;
+ readonly VALIDATE_STATUS: number;
+ readonly VENDOR: number;
+ readonly VERSION: number;
+ readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: number;
+ readonly VERTEX_ATTRIB_ARRAY_ENABLED: number;
+ readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: number;
+ readonly VERTEX_ATTRIB_ARRAY_POINTER: number;
+ readonly VERTEX_ATTRIB_ARRAY_SIZE: number;
+ readonly VERTEX_ATTRIB_ARRAY_STRIDE: number;
+ readonly VERTEX_ATTRIB_ARRAY_TYPE: number;
+ readonly VERTEX_SHADER: number;
+ readonly VIEWPORT: number;
+ readonly ZERO: number;
}
declare var WebGLRenderingContext: {
prototype: WebGLRenderingContext;
new(): WebGLRenderingContext;
- ACTIVE_ATTRIBUTES: number;
- ACTIVE_TEXTURE: number;
- ACTIVE_UNIFORMS: number;
- ALIASED_LINE_WIDTH_RANGE: number;
- ALIASED_POINT_SIZE_RANGE: number;
- ALPHA: number;
- ALPHA_BITS: number;
- ALWAYS: number;
- ARRAY_BUFFER: number;
- ARRAY_BUFFER_BINDING: number;
- ATTACHED_SHADERS: number;
- BACK: number;
- BLEND: number;
- BLEND_COLOR: number;
- BLEND_DST_ALPHA: number;
- BLEND_DST_RGB: number;
- BLEND_EQUATION: number;
- BLEND_EQUATION_ALPHA: number;
- BLEND_EQUATION_RGB: number;
- BLEND_SRC_ALPHA: number;
- BLEND_SRC_RGB: number;
- BLUE_BITS: number;
- BOOL: number;
- BOOL_VEC2: number;
- BOOL_VEC3: number;
- BOOL_VEC4: number;
- BROWSER_DEFAULT_WEBGL: number;
- BUFFER_SIZE: number;
- BUFFER_USAGE: number;
- BYTE: number;
- CCW: number;
- CLAMP_TO_EDGE: number;
- COLOR_ATTACHMENT0: number;
- COLOR_BUFFER_BIT: number;
- COLOR_CLEAR_VALUE: number;
- COLOR_WRITEMASK: number;
- COMPILE_STATUS: number;
- COMPRESSED_TEXTURE_FORMATS: number;
- CONSTANT_ALPHA: number;
- CONSTANT_COLOR: number;
- CONTEXT_LOST_WEBGL: number;
- CULL_FACE: number;
- CULL_FACE_MODE: number;
- CURRENT_PROGRAM: number;
- CURRENT_VERTEX_ATTRIB: number;
- CW: number;
- DECR: number;
- DECR_WRAP: number;
- DELETE_STATUS: number;
- DEPTH_ATTACHMENT: number;
- DEPTH_BITS: number;
- DEPTH_BUFFER_BIT: number;
- DEPTH_CLEAR_VALUE: number;
- DEPTH_COMPONENT: number;
- DEPTH_COMPONENT16: number;
- DEPTH_FUNC: number;
- DEPTH_RANGE: number;
- DEPTH_STENCIL: number;
- DEPTH_STENCIL_ATTACHMENT: number;
- DEPTH_TEST: number;
- DEPTH_WRITEMASK: number;
- DITHER: number;
- DONT_CARE: number;
- DST_ALPHA: number;
- DST_COLOR: number;
- DYNAMIC_DRAW: number;
- ELEMENT_ARRAY_BUFFER: number;
- ELEMENT_ARRAY_BUFFER_BINDING: number;
- EQUAL: number;
- FASTEST: number;
- FLOAT: number;
- FLOAT_MAT2: number;
- FLOAT_MAT3: number;
- FLOAT_MAT4: number;
- FLOAT_VEC2: number;
- FLOAT_VEC3: number;
- FLOAT_VEC4: number;
- FRAGMENT_SHADER: number;
- FRAMEBUFFER: number;
- FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: number;
- FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: number;
- FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: number;
- FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: number;
- FRAMEBUFFER_BINDING: number;
- FRAMEBUFFER_COMPLETE: number;
- FRAMEBUFFER_INCOMPLETE_ATTACHMENT: number;
- FRAMEBUFFER_INCOMPLETE_DIMENSIONS: number;
- FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: number;
- FRAMEBUFFER_UNSUPPORTED: number;
- FRONT: number;
- FRONT_AND_BACK: number;
- FRONT_FACE: number;
- FUNC_ADD: number;
- FUNC_REVERSE_SUBTRACT: number;
- FUNC_SUBTRACT: number;
- GENERATE_MIPMAP_HINT: number;
- GEQUAL: number;
- GREATER: number;
- GREEN_BITS: number;
- HIGH_FLOAT: number;
- HIGH_INT: number;
- IMPLEMENTATION_COLOR_READ_FORMAT: number;
- IMPLEMENTATION_COLOR_READ_TYPE: number;
- INCR: number;
- INCR_WRAP: number;
- INT: number;
- INT_VEC2: number;
- INT_VEC3: number;
- INT_VEC4: number;
- INVALID_ENUM: number;
- INVALID_FRAMEBUFFER_OPERATION: number;
- INVALID_OPERATION: number;
- INVALID_VALUE: number;
- INVERT: number;
- KEEP: number;
- LEQUAL: number;
- LESS: number;
- LINEAR: number;
- LINEAR_MIPMAP_LINEAR: number;
- LINEAR_MIPMAP_NEAREST: number;
- LINES: number;
- LINE_LOOP: number;
- LINE_STRIP: number;
- LINE_WIDTH: number;
- LINK_STATUS: number;
- LOW_FLOAT: number;
- LOW_INT: number;
- LUMINANCE: number;
- LUMINANCE_ALPHA: number;
- MAX_COMBINED_TEXTURE_IMAGE_UNITS: number;
- MAX_CUBE_MAP_TEXTURE_SIZE: number;
- MAX_FRAGMENT_UNIFORM_VECTORS: number;
- MAX_RENDERBUFFER_SIZE: number;
- MAX_TEXTURE_IMAGE_UNITS: number;
- MAX_TEXTURE_SIZE: number;
- MAX_VARYING_VECTORS: number;
- MAX_VERTEX_ATTRIBS: number;
- MAX_VERTEX_TEXTURE_IMAGE_UNITS: number;
- MAX_VERTEX_UNIFORM_VECTORS: number;
- MAX_VIEWPORT_DIMS: number;
- MEDIUM_FLOAT: number;
- MEDIUM_INT: number;
- MIRRORED_REPEAT: number;
- NEAREST: number;
- NEAREST_MIPMAP_LINEAR: number;
- NEAREST_MIPMAP_NEAREST: number;
- NEVER: number;
- NICEST: number;
- NONE: number;
- NOTEQUAL: number;
- NO_ERROR: number;
- ONE: number;
- ONE_MINUS_CONSTANT_ALPHA: number;
- ONE_MINUS_CONSTANT_COLOR: number;
- ONE_MINUS_DST_ALPHA: number;
- ONE_MINUS_DST_COLOR: number;
- ONE_MINUS_SRC_ALPHA: number;
- ONE_MINUS_SRC_COLOR: number;
- OUT_OF_MEMORY: number;
- PACK_ALIGNMENT: number;
- POINTS: number;
- POLYGON_OFFSET_FACTOR: number;
- POLYGON_OFFSET_FILL: number;
- POLYGON_OFFSET_UNITS: number;
- RED_BITS: number;
- RENDERBUFFER: number;
- RENDERBUFFER_ALPHA_SIZE: number;
- RENDERBUFFER_BINDING: number;
- RENDERBUFFER_BLUE_SIZE: number;
- RENDERBUFFER_DEPTH_SIZE: number;
- RENDERBUFFER_GREEN_SIZE: number;
- RENDERBUFFER_HEIGHT: number;
- RENDERBUFFER_INTERNAL_FORMAT: number;
- RENDERBUFFER_RED_SIZE: number;
- RENDERBUFFER_STENCIL_SIZE: number;
- RENDERBUFFER_WIDTH: number;
- RENDERER: number;
- REPEAT: number;
- REPLACE: number;
- RGB: number;
- RGB565: number;
- RGB5_A1: number;
- RGBA: number;
- RGBA4: number;
- SAMPLER_2D: number;
- SAMPLER_CUBE: number;
- SAMPLES: number;
- SAMPLE_ALPHA_TO_COVERAGE: number;
- SAMPLE_BUFFERS: number;
- SAMPLE_COVERAGE: number;
- SAMPLE_COVERAGE_INVERT: number;
- SAMPLE_COVERAGE_VALUE: number;
- SCISSOR_BOX: number;
- SCISSOR_TEST: number;
- SHADER_TYPE: number;
- SHADING_LANGUAGE_VERSION: number;
- SHORT: number;
- SRC_ALPHA: number;
- SRC_ALPHA_SATURATE: number;
- SRC_COLOR: number;
- STATIC_DRAW: number;
- STENCIL_ATTACHMENT: number;
- STENCIL_BACK_FAIL: number;
- STENCIL_BACK_FUNC: number;
- STENCIL_BACK_PASS_DEPTH_FAIL: number;
- STENCIL_BACK_PASS_DEPTH_PASS: number;
- STENCIL_BACK_REF: number;
- STENCIL_BACK_VALUE_MASK: number;
- STENCIL_BACK_WRITEMASK: number;
- STENCIL_BITS: number;
- STENCIL_BUFFER_BIT: number;
- STENCIL_CLEAR_VALUE: number;
- STENCIL_FAIL: number;
- STENCIL_FUNC: number;
- STENCIL_INDEX: number;
- STENCIL_INDEX8: number;
- STENCIL_PASS_DEPTH_FAIL: number;
- STENCIL_PASS_DEPTH_PASS: number;
- STENCIL_REF: number;
- STENCIL_TEST: number;
- STENCIL_VALUE_MASK: number;
- STENCIL_WRITEMASK: number;
- STREAM_DRAW: number;
- SUBPIXEL_BITS: number;
- TEXTURE: number;
- TEXTURE0: number;
- TEXTURE1: number;
- TEXTURE10: number;
- TEXTURE11: number;
- TEXTURE12: number;
- TEXTURE13: number;
- TEXTURE14: number;
- TEXTURE15: number;
- TEXTURE16: number;
- TEXTURE17: number;
- TEXTURE18: number;
- TEXTURE19: number;
- TEXTURE2: number;
- TEXTURE20: number;
- TEXTURE21: number;
- TEXTURE22: number;
- TEXTURE23: number;
- TEXTURE24: number;
- TEXTURE25: number;
- TEXTURE26: number;
- TEXTURE27: number;
- TEXTURE28: number;
- TEXTURE29: number;
- TEXTURE3: number;
- TEXTURE30: number;
- TEXTURE31: number;
- TEXTURE4: number;
- TEXTURE5: number;
- TEXTURE6: number;
- TEXTURE7: number;
- TEXTURE8: number;
- TEXTURE9: number;
- TEXTURE_2D: number;
- TEXTURE_BINDING_2D: number;
- TEXTURE_BINDING_CUBE_MAP: number;
- TEXTURE_CUBE_MAP: number;
- TEXTURE_CUBE_MAP_NEGATIVE_X: number;
- TEXTURE_CUBE_MAP_NEGATIVE_Y: number;
- TEXTURE_CUBE_MAP_NEGATIVE_Z: number;
- TEXTURE_CUBE_MAP_POSITIVE_X: number;
- TEXTURE_CUBE_MAP_POSITIVE_Y: number;
- TEXTURE_CUBE_MAP_POSITIVE_Z: number;
- TEXTURE_MAG_FILTER: number;
- TEXTURE_MIN_FILTER: number;
- TEXTURE_WRAP_S: number;
- TEXTURE_WRAP_T: number;
- TRIANGLES: number;
- TRIANGLE_FAN: number;
- TRIANGLE_STRIP: number;
- UNPACK_ALIGNMENT: number;
- UNPACK_COLORSPACE_CONVERSION_WEBGL: number;
- UNPACK_FLIP_Y_WEBGL: number;
- UNPACK_PREMULTIPLY_ALPHA_WEBGL: number;
- UNSIGNED_BYTE: number;
- UNSIGNED_INT: number;
- UNSIGNED_SHORT: number;
- UNSIGNED_SHORT_4_4_4_4: number;
- UNSIGNED_SHORT_5_5_5_1: number;
- UNSIGNED_SHORT_5_6_5: number;
- VALIDATE_STATUS: number;
- VENDOR: number;
- VERSION: number;
- VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: number;
- VERTEX_ATTRIB_ARRAY_ENABLED: number;
- VERTEX_ATTRIB_ARRAY_NORMALIZED: number;
- VERTEX_ATTRIB_ARRAY_POINTER: number;
- VERTEX_ATTRIB_ARRAY_SIZE: number;
- VERTEX_ATTRIB_ARRAY_STRIDE: number;
- VERTEX_ATTRIB_ARRAY_TYPE: number;
- VERTEX_SHADER: number;
- VIEWPORT: number;
- ZERO: number;
+ readonly ACTIVE_ATTRIBUTES: number;
+ readonly ACTIVE_TEXTURE: number;
+ readonly ACTIVE_UNIFORMS: number;
+ readonly ALIASED_LINE_WIDTH_RANGE: number;
+ readonly ALIASED_POINT_SIZE_RANGE: number;
+ readonly ALPHA: number;
+ readonly ALPHA_BITS: number;
+ readonly ALWAYS: number;
+ readonly ARRAY_BUFFER: number;
+ readonly ARRAY_BUFFER_BINDING: number;
+ readonly ATTACHED_SHADERS: number;
+ readonly BACK: number;
+ readonly BLEND: number;
+ readonly BLEND_COLOR: number;
+ readonly BLEND_DST_ALPHA: number;
+ readonly BLEND_DST_RGB: number;
+ readonly BLEND_EQUATION: number;
+ readonly BLEND_EQUATION_ALPHA: number;
+ readonly BLEND_EQUATION_RGB: number;
+ readonly BLEND_SRC_ALPHA: number;
+ readonly BLEND_SRC_RGB: number;
+ readonly BLUE_BITS: number;
+ readonly BOOL: number;
+ readonly BOOL_VEC2: number;
+ readonly BOOL_VEC3: number;
+ readonly BOOL_VEC4: number;
+ readonly BROWSER_DEFAULT_WEBGL: number;
+ readonly BUFFER_SIZE: number;
+ readonly BUFFER_USAGE: number;
+ readonly BYTE: number;
+ readonly CCW: number;
+ readonly CLAMP_TO_EDGE: number;
+ readonly COLOR_ATTACHMENT0: number;
+ readonly COLOR_BUFFER_BIT: number;
+ readonly COLOR_CLEAR_VALUE: number;
+ readonly COLOR_WRITEMASK: number;
+ readonly COMPILE_STATUS: number;
+ readonly COMPRESSED_TEXTURE_FORMATS: number;
+ readonly CONSTANT_ALPHA: number;
+ readonly CONSTANT_COLOR: number;
+ readonly CONTEXT_LOST_WEBGL: number;
+ readonly CULL_FACE: number;
+ readonly CULL_FACE_MODE: number;
+ readonly CURRENT_PROGRAM: number;
+ readonly CURRENT_VERTEX_ATTRIB: number;
+ readonly CW: number;
+ readonly DECR: number;
+ readonly DECR_WRAP: number;
+ readonly DELETE_STATUS: number;
+ readonly DEPTH_ATTACHMENT: number;
+ readonly DEPTH_BITS: number;
+ readonly DEPTH_BUFFER_BIT: number;
+ readonly DEPTH_CLEAR_VALUE: number;
+ readonly DEPTH_COMPONENT: number;
+ readonly DEPTH_COMPONENT16: number;
+ readonly DEPTH_FUNC: number;
+ readonly DEPTH_RANGE: number;
+ readonly DEPTH_STENCIL: number;
+ readonly DEPTH_STENCIL_ATTACHMENT: number;
+ readonly DEPTH_TEST: number;
+ readonly DEPTH_WRITEMASK: number;
+ readonly DITHER: number;
+ readonly DONT_CARE: number;
+ readonly DST_ALPHA: number;
+ readonly DST_COLOR: number;
+ readonly DYNAMIC_DRAW: number;
+ readonly ELEMENT_ARRAY_BUFFER: number;
+ readonly ELEMENT_ARRAY_BUFFER_BINDING: number;
+ readonly EQUAL: number;
+ readonly FASTEST: number;
+ readonly FLOAT: number;
+ readonly FLOAT_MAT2: number;
+ readonly FLOAT_MAT3: number;
+ readonly FLOAT_MAT4: number;
+ readonly FLOAT_VEC2: number;
+ readonly FLOAT_VEC3: number;
+ readonly FLOAT_VEC4: number;
+ readonly FRAGMENT_SHADER: number;
+ readonly FRAMEBUFFER: number;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: number;
+ readonly FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: number;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: number;
+ readonly FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: number;
+ readonly FRAMEBUFFER_BINDING: number;
+ readonly FRAMEBUFFER_COMPLETE: number;
+ readonly FRAMEBUFFER_INCOMPLETE_ATTACHMENT: number;
+ readonly FRAMEBUFFER_INCOMPLETE_DIMENSIONS: number;
+ readonly FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: number;
+ readonly FRAMEBUFFER_UNSUPPORTED: number;
+ readonly FRONT: number;
+ readonly FRONT_AND_BACK: number;
+ readonly FRONT_FACE: number;
+ readonly FUNC_ADD: number;
+ readonly FUNC_REVERSE_SUBTRACT: number;
+ readonly FUNC_SUBTRACT: number;
+ readonly GENERATE_MIPMAP_HINT: number;
+ readonly GEQUAL: number;
+ readonly GREATER: number;
+ readonly GREEN_BITS: number;
+ readonly HIGH_FLOAT: number;
+ readonly HIGH_INT: number;
+ readonly IMPLEMENTATION_COLOR_READ_FORMAT: number;
+ readonly IMPLEMENTATION_COLOR_READ_TYPE: number;
+ readonly INCR: number;
+ readonly INCR_WRAP: number;
+ readonly INT: number;
+ readonly INT_VEC2: number;
+ readonly INT_VEC3: number;
+ readonly INT_VEC4: number;
+ readonly INVALID_ENUM: number;
+ readonly INVALID_FRAMEBUFFER_OPERATION: number;
+ readonly INVALID_OPERATION: number;
+ readonly INVALID_VALUE: number;
+ readonly INVERT: number;
+ readonly KEEP: number;
+ readonly LEQUAL: number;
+ readonly LESS: number;
+ readonly LINEAR: number;
+ readonly LINEAR_MIPMAP_LINEAR: number;
+ readonly LINEAR_MIPMAP_NEAREST: number;
+ readonly LINES: number;
+ readonly LINE_LOOP: number;
+ readonly LINE_STRIP: number;
+ readonly LINE_WIDTH: number;
+ readonly LINK_STATUS: number;
+ readonly LOW_FLOAT: number;
+ readonly LOW_INT: number;
+ readonly LUMINANCE: number;
+ readonly LUMINANCE_ALPHA: number;
+ readonly MAX_COMBINED_TEXTURE_IMAGE_UNITS: number;
+ readonly MAX_CUBE_MAP_TEXTURE_SIZE: number;
+ readonly MAX_FRAGMENT_UNIFORM_VECTORS: number;
+ readonly MAX_RENDERBUFFER_SIZE: number;
+ readonly MAX_TEXTURE_IMAGE_UNITS: number;
+ readonly MAX_TEXTURE_SIZE: number;
+ readonly MAX_VARYING_VECTORS: number;
+ readonly MAX_VERTEX_ATTRIBS: number;
+ readonly MAX_VERTEX_TEXTURE_IMAGE_UNITS: number;
+ readonly MAX_VERTEX_UNIFORM_VECTORS: number;
+ readonly MAX_VIEWPORT_DIMS: number;
+ readonly MEDIUM_FLOAT: number;
+ readonly MEDIUM_INT: number;
+ readonly MIRRORED_REPEAT: number;
+ readonly NEAREST: number;
+ readonly NEAREST_MIPMAP_LINEAR: number;
+ readonly NEAREST_MIPMAP_NEAREST: number;
+ readonly NEVER: number;
+ readonly NICEST: number;
+ readonly NONE: number;
+ readonly NOTEQUAL: number;
+ readonly NO_ERROR: number;
+ readonly ONE: number;
+ readonly ONE_MINUS_CONSTANT_ALPHA: number;
+ readonly ONE_MINUS_CONSTANT_COLOR: number;
+ readonly ONE_MINUS_DST_ALPHA: number;
+ readonly ONE_MINUS_DST_COLOR: number;
+ readonly ONE_MINUS_SRC_ALPHA: number;
+ readonly ONE_MINUS_SRC_COLOR: number;
+ readonly OUT_OF_MEMORY: number;
+ readonly PACK_ALIGNMENT: number;
+ readonly POINTS: number;
+ readonly POLYGON_OFFSET_FACTOR: number;
+ readonly POLYGON_OFFSET_FILL: number;
+ readonly POLYGON_OFFSET_UNITS: number;
+ readonly RED_BITS: number;
+ readonly RENDERBUFFER: number;
+ readonly RENDERBUFFER_ALPHA_SIZE: number;
+ readonly RENDERBUFFER_BINDING: number;
+ readonly RENDERBUFFER_BLUE_SIZE: number;
+ readonly RENDERBUFFER_DEPTH_SIZE: number;
+ readonly RENDERBUFFER_GREEN_SIZE: number;
+ readonly RENDERBUFFER_HEIGHT: number;
+ readonly RENDERBUFFER_INTERNAL_FORMAT: number;
+ readonly RENDERBUFFER_RED_SIZE: number;
+ readonly RENDERBUFFER_STENCIL_SIZE: number;
+ readonly RENDERBUFFER_WIDTH: number;
+ readonly RENDERER: number;
+ readonly REPEAT: number;
+ readonly REPLACE: number;
+ readonly RGB: number;
+ readonly RGB565: number;
+ readonly RGB5_A1: number;
+ readonly RGBA: number;
+ readonly RGBA4: number;
+ readonly SAMPLER_2D: number;
+ readonly SAMPLER_CUBE: number;
+ readonly SAMPLES: number;
+ readonly SAMPLE_ALPHA_TO_COVERAGE: number;
+ readonly SAMPLE_BUFFERS: number;
+ readonly SAMPLE_COVERAGE: number;
+ readonly SAMPLE_COVERAGE_INVERT: number;
+ readonly SAMPLE_COVERAGE_VALUE: number;
+ readonly SCISSOR_BOX: number;
+ readonly SCISSOR_TEST: number;
+ readonly SHADER_TYPE: number;
+ readonly SHADING_LANGUAGE_VERSION: number;
+ readonly SHORT: number;
+ readonly SRC_ALPHA: number;
+ readonly SRC_ALPHA_SATURATE: number;
+ readonly SRC_COLOR: number;
+ readonly STATIC_DRAW: number;
+ readonly STENCIL_ATTACHMENT: number;
+ readonly STENCIL_BACK_FAIL: number;
+ readonly STENCIL_BACK_FUNC: number;
+ readonly STENCIL_BACK_PASS_DEPTH_FAIL: number;
+ readonly STENCIL_BACK_PASS_DEPTH_PASS: number;
+ readonly STENCIL_BACK_REF: number;
+ readonly STENCIL_BACK_VALUE_MASK: number;
+ readonly STENCIL_BACK_WRITEMASK: number;
+ readonly STENCIL_BITS: number;
+ readonly STENCIL_BUFFER_BIT: number;
+ readonly STENCIL_CLEAR_VALUE: number;
+ readonly STENCIL_FAIL: number;
+ readonly STENCIL_FUNC: number;
+ readonly STENCIL_INDEX: number;
+ readonly STENCIL_INDEX8: number;
+ readonly STENCIL_PASS_DEPTH_FAIL: number;
+ readonly STENCIL_PASS_DEPTH_PASS: number;
+ readonly STENCIL_REF: number;
+ readonly STENCIL_TEST: number;
+ readonly STENCIL_VALUE_MASK: number;
+ readonly STENCIL_WRITEMASK: number;
+ readonly STREAM_DRAW: number;
+ readonly SUBPIXEL_BITS: number;
+ readonly TEXTURE: number;
+ readonly TEXTURE0: number;
+ readonly TEXTURE1: number;
+ readonly TEXTURE10: number;
+ readonly TEXTURE11: number;
+ readonly TEXTURE12: number;
+ readonly TEXTURE13: number;
+ readonly TEXTURE14: number;
+ readonly TEXTURE15: number;
+ readonly TEXTURE16: number;
+ readonly TEXTURE17: number;
+ readonly TEXTURE18: number;
+ readonly TEXTURE19: number;
+ readonly TEXTURE2: number;
+ readonly TEXTURE20: number;
+ readonly TEXTURE21: number;
+ readonly TEXTURE22: number;
+ readonly TEXTURE23: number;
+ readonly TEXTURE24: number;
+ readonly TEXTURE25: number;
+ readonly TEXTURE26: number;
+ readonly TEXTURE27: number;
+ readonly TEXTURE28: number;
+ readonly TEXTURE29: number;
+ readonly TEXTURE3: number;
+ readonly TEXTURE30: number;
+ readonly TEXTURE31: number;
+ readonly TEXTURE4: number;
+ readonly TEXTURE5: number;
+ readonly TEXTURE6: number;
+ readonly TEXTURE7: number;
+ readonly TEXTURE8: number;
+ readonly TEXTURE9: number;
+ readonly TEXTURE_2D: number;
+ readonly TEXTURE_BINDING_2D: number;
+ readonly TEXTURE_BINDING_CUBE_MAP: number;
+ readonly TEXTURE_CUBE_MAP: number;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_X: number;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Y: number;
+ readonly TEXTURE_CUBE_MAP_NEGATIVE_Z: number;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_X: number;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Y: number;
+ readonly TEXTURE_CUBE_MAP_POSITIVE_Z: number;
+ readonly TEXTURE_MAG_FILTER: number;
+ readonly TEXTURE_MIN_FILTER: number;
+ readonly TEXTURE_WRAP_S: number;
+ readonly TEXTURE_WRAP_T: number;
+ readonly TRIANGLES: number;
+ readonly TRIANGLE_FAN: number;
+ readonly TRIANGLE_STRIP: number;
+ readonly UNPACK_ALIGNMENT: number;
+ readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: number;
+ readonly UNPACK_FLIP_Y_WEBGL: number;
+ readonly UNPACK_PREMULTIPLY_ALPHA_WEBGL: number;
+ readonly UNSIGNED_BYTE: number;
+ readonly UNSIGNED_INT: number;
+ readonly UNSIGNED_SHORT: number;
+ readonly UNSIGNED_SHORT_4_4_4_4: number;
+ readonly UNSIGNED_SHORT_5_5_5_1: number;
+ readonly UNSIGNED_SHORT_5_6_5: number;
+ readonly VALIDATE_STATUS: number;
+ readonly VENDOR: number;
+ readonly VERSION: number;
+ readonly VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: number;
+ readonly VERTEX_ATTRIB_ARRAY_ENABLED: number;
+ readonly VERTEX_ATTRIB_ARRAY_NORMALIZED: number;
+ readonly VERTEX_ATTRIB_ARRAY_POINTER: number;
+ readonly VERTEX_ATTRIB_ARRAY_SIZE: number;
+ readonly VERTEX_ATTRIB_ARRAY_STRIDE: number;
+ readonly VERTEX_ATTRIB_ARRAY_TYPE: number;
+ readonly VERTEX_SHADER: number;
+ readonly VIEWPORT: number;
+ readonly ZERO: number;
}
interface WebGLShader extends WebGLObject {
@@ -17066,9 +18451,9 @@ declare var WebGLShader: {
}
interface WebGLShaderPrecisionFormat {
- precision: number;
- rangeMax: number;
- rangeMin: number;
+ readonly precision: number;
+ readonly rangeMax: number;
+ readonly rangeMin: number;
}
declare var WebGLShaderPrecisionFormat: {
@@ -17144,196 +18529,201 @@ declare var WebKitPoint: {
interface WebSocket extends EventTarget {
binaryType: string;
- bufferedAmount: number;
- extensions: string;
- onclose: (ev: CloseEvent) => any;
- onerror: (ev: Event) => any;
- onmessage: (ev: MessageEvent) => any;
- onopen: (ev: Event) => any;
- protocol: string;
- readyState: number;
- url: string;
+ readonly bufferedAmount: number;
+ readonly extensions: string;
+ onclose: (this: this, ev: CloseEvent) => any;
+ onerror: (this: this, ev: ErrorEvent) => any;
+ onmessage: (this: this, ev: MessageEvent) => any;
+ onopen: (this: this, ev: Event) => any;
+ readonly protocol: string;
+ readonly readyState: number;
+ readonly url: string;
close(code?: number, reason?: string): void;
send(data: any): void;
- CLOSED: number;
- CLOSING: number;
- CONNECTING: number;
- OPEN: number;
- addEventListener(type: "close", listener: (ev: CloseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "open", listener: (ev: Event) => any, useCapture?: boolean): void;
+ readonly CLOSED: number;
+ readonly CLOSING: number;
+ readonly CONNECTING: number;
+ readonly OPEN: number;
+ addEventListener(type: "close", listener: (this: this, ev: CloseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "message", listener: (this: this, ev: MessageEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "open", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
declare var WebSocket: {
prototype: WebSocket;
new(url: string, protocols?: string | string[]): WebSocket;
- CLOSED: number;
- CLOSING: number;
- CONNECTING: number;
- OPEN: number;
+ readonly CLOSED: number;
+ readonly CLOSING: number;
+ readonly CONNECTING: number;
+ readonly OPEN: number;
}
interface WheelEvent extends MouseEvent {
- deltaMode: number;
- deltaX: number;
- deltaY: number;
- deltaZ: number;
+ readonly deltaMode: number;
+ readonly deltaX: number;
+ readonly deltaY: number;
+ readonly deltaZ: number;
+ readonly wheelDelta: number;
+ readonly wheelDeltaX: number;
+ readonly wheelDeltaY: number;
getCurrentPoint(element: Element): void;
initWheelEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, detailArg: number, screenXArg: number, screenYArg: number, clientXArg: number, clientYArg: number, buttonArg: number, relatedTargetArg: EventTarget, modifiersListArg: string, deltaXArg: number, deltaYArg: number, deltaZArg: number, deltaMode: number): void;
- DOM_DELTA_LINE: number;
- DOM_DELTA_PAGE: number;
- DOM_DELTA_PIXEL: number;
+ readonly DOM_DELTA_LINE: number;
+ readonly DOM_DELTA_PAGE: number;
+ readonly DOM_DELTA_PIXEL: number;
}
declare var WheelEvent: {
prototype: WheelEvent;
new(typeArg: string, eventInitDict?: WheelEventInit): WheelEvent;
- DOM_DELTA_LINE: number;
- DOM_DELTA_PAGE: number;
- DOM_DELTA_PIXEL: number;
+ readonly DOM_DELTA_LINE: number;
+ readonly DOM_DELTA_PAGE: number;
+ readonly DOM_DELTA_PIXEL: number;
}
interface Window extends EventTarget, WindowTimers, WindowSessionStorage, WindowLocalStorage, WindowConsole, GlobalEventHandlers, IDBEnvironment, WindowBase64 {
- animationStartTime: number;
- applicationCache: ApplicationCache;
- clientInformation: Navigator;
- closed: boolean;
- crypto: Crypto;
+ readonly applicationCache: ApplicationCache;
+ readonly clientInformation: Navigator;
+ readonly closed: boolean;
+ readonly crypto: Crypto;
defaultStatus: string;
- devicePixelRatio: number;
- doNotTrack: string;
- document: Document;
+ readonly devicePixelRatio: number;
+ readonly doNotTrack: string;
+ readonly document: Document;
event: Event;
- external: External;
- frameElement: Element;
- frames: Window;
- history: History;
- innerHeight: number;
- innerWidth: number;
- length: number;
- location: Location;
- locationbar: BarProp;
- menubar: BarProp;
- msAnimationStartTime: number;
+ readonly external: External;
+ readonly frameElement: Element;
+ readonly frames: Window;
+ readonly history: History;
+ readonly innerHeight: number;
+ readonly innerWidth: number;
+ readonly length: number;
+ readonly location: Location;
+ readonly locationbar: BarProp;
+ readonly menubar: BarProp;
+ readonly msCredentials: MSCredentials;
name: string;
- navigator: Navigator;
+ readonly navigator: Navigator;
offscreenBuffering: string | boolean;
- onabort: (ev: Event) => any;
- onafterprint: (ev: Event) => any;
- onbeforeprint: (ev: Event) => any;
- onbeforeunload: (ev: BeforeUnloadEvent) => any;
- onblur: (ev: FocusEvent) => any;
- oncanplay: (ev: Event) => any;
- oncanplaythrough: (ev: Event) => any;
- onchange: (ev: Event) => any;
- onclick: (ev: MouseEvent) => any;
- oncompassneedscalibration: (ev: Event) => any;
- oncontextmenu: (ev: PointerEvent) => any;
- ondblclick: (ev: MouseEvent) => any;
- ondevicemotion: (ev: DeviceMotionEvent) => any;
- ondeviceorientation: (ev: DeviceOrientationEvent) => any;
- ondrag: (ev: DragEvent) => any;
- ondragend: (ev: DragEvent) => any;
- ondragenter: (ev: DragEvent) => any;
- ondragleave: (ev: DragEvent) => any;
- ondragover: (ev: DragEvent) => any;
- ondragstart: (ev: DragEvent) => any;
- ondrop: (ev: DragEvent) => any;
- ondurationchange: (ev: Event) => any;
- onemptied: (ev: Event) => any;
- onended: (ev: Event) => any;
+ onabort: (this: this, ev: UIEvent) => any;
+ onafterprint: (this: this, ev: Event) => any;
+ onbeforeprint: (this: this, ev: Event) => any;
+ onbeforeunload: (this: this, ev: BeforeUnloadEvent) => any;
+ onblur: (this: this, ev: FocusEvent) => any;
+ oncanplay: (this: this, ev: Event) => any;
+ oncanplaythrough: (this: this, ev: Event) => any;
+ onchange: (this: this, ev: Event) => any;
+ onclick: (this: this, ev: MouseEvent) => any;
+ oncompassneedscalibration: (this: this, ev: Event) => any;
+ oncontextmenu: (this: this, ev: PointerEvent) => any;
+ ondblclick: (this: this, ev: MouseEvent) => any;
+ ondevicelight: (this: this, ev: DeviceLightEvent) => any;
+ ondevicemotion: (this: this, ev: DeviceMotionEvent) => any;
+ ondeviceorientation: (this: this, ev: DeviceOrientationEvent) => any;
+ ondrag: (this: this, ev: DragEvent) => any;
+ ondragend: (this: this, ev: DragEvent) => any;
+ ondragenter: (this: this, ev: DragEvent) => any;
+ ondragleave: (this: this, ev: DragEvent) => any;
+ ondragover: (this: this, ev: DragEvent) => any;
+ ondragstart: (this: this, ev: DragEvent) => any;
+ ondrop: (this: this, ev: DragEvent) => any;
+ ondurationchange: (this: this, ev: Event) => any;
+ onemptied: (this: this, ev: Event) => any;
+ onended: (this: this, ev: MediaStreamErrorEvent) => any;
onerror: ErrorEventHandler;
- onfocus: (ev: FocusEvent) => any;
- onhashchange: (ev: HashChangeEvent) => any;
- oninput: (ev: Event) => any;
- onkeydown: (ev: KeyboardEvent) => any;
- onkeypress: (ev: KeyboardEvent) => any;
- onkeyup: (ev: KeyboardEvent) => any;
- onload: (ev: Event) => any;
- onloadeddata: (ev: Event) => any;
- onloadedmetadata: (ev: Event) => any;
- onloadstart: (ev: Event) => any;
- onmessage: (ev: MessageEvent) => any;
- onmousedown: (ev: MouseEvent) => any;
- onmouseenter: (ev: MouseEvent) => any;
- onmouseleave: (ev: MouseEvent) => any;
- onmousemove: (ev: MouseEvent) => any;
- onmouseout: (ev: MouseEvent) => any;
- onmouseover: (ev: MouseEvent) => any;
- onmouseup: (ev: MouseEvent) => any;
- onmousewheel: (ev: MouseWheelEvent) => any;
- onmsgesturechange: (ev: MSGestureEvent) => any;
- onmsgesturedoubletap: (ev: MSGestureEvent) => any;
- onmsgestureend: (ev: MSGestureEvent) => any;
- onmsgesturehold: (ev: MSGestureEvent) => any;
- onmsgesturestart: (ev: MSGestureEvent) => any;
- onmsgesturetap: (ev: MSGestureEvent) => any;
- onmsinertiastart: (ev: MSGestureEvent) => any;
- onmspointercancel: (ev: MSPointerEvent) => any;
- onmspointerdown: (ev: MSPointerEvent) => any;
- onmspointerenter: (ev: MSPointerEvent) => any;
- onmspointerleave: (ev: MSPointerEvent) => any;
- onmspointermove: (ev: MSPointerEvent) => any;
- onmspointerout: (ev: MSPointerEvent) => any;
- onmspointerover: (ev: MSPointerEvent) => any;
- onmspointerup: (ev: MSPointerEvent) => any;
- onoffline: (ev: Event) => any;
- ononline: (ev: Event) => any;
- onorientationchange: (ev: Event) => any;
- onpagehide: (ev: PageTransitionEvent) => any;
- onpageshow: (ev: PageTransitionEvent) => any;
- onpause: (ev: Event) => any;
- onplay: (ev: Event) => any;
- onplaying: (ev: Event) => any;
- onpopstate: (ev: PopStateEvent) => any;
- onprogress: (ev: ProgressEvent) => any;
- onratechange: (ev: Event) => any;
- onreadystatechange: (ev: ProgressEvent) => any;
- onreset: (ev: Event) => any;
- onresize: (ev: UIEvent) => any;
- onscroll: (ev: UIEvent) => any;
- onseeked: (ev: Event) => any;
- onseeking: (ev: Event) => any;
- onselect: (ev: UIEvent) => any;
- onstalled: (ev: Event) => any;
- onstorage: (ev: StorageEvent) => any;
- onsubmit: (ev: Event) => any;
- onsuspend: (ev: Event) => any;
- ontimeupdate: (ev: Event) => any;
- ontouchcancel: any;
- ontouchend: any;
- ontouchmove: any;
- ontouchstart: any;
- onunload: (ev: Event) => any;
- onvolumechange: (ev: Event) => any;
- onwaiting: (ev: Event) => any;
- opener: Window;
+ onfocus: (this: this, ev: FocusEvent) => any;
+ onhashchange: (this: this, ev: HashChangeEvent) => any;
+ oninput: (this: this, ev: Event) => any;
+ oninvalid: (this: this, ev: Event) => any;
+ onkeydown: (this: this, ev: KeyboardEvent) => any;
+ onkeypress: (this: this, ev: KeyboardEvent) => any;
+ onkeyup: (this: this, ev: KeyboardEvent) => any;
+ onload: (this: this, ev: Event) => any;
+ onloadeddata: (this: this, ev: Event) => any;
+ onloadedmetadata: (this: this, ev: Event) => any;
+ onloadstart: (this: this, ev: Event) => any;
+ onmessage: (this: this, ev: MessageEvent) => any;
+ onmousedown: (this: this, ev: MouseEvent) => any;
+ onmouseenter: (this: this, ev: MouseEvent) => any;
+ onmouseleave: (this: this, ev: MouseEvent) => any;
+ onmousemove: (this: this, ev: MouseEvent) => any;
+ onmouseout: (this: this, ev: MouseEvent) => any;
+ onmouseover: (this: this, ev: MouseEvent) => any;
+ onmouseup: (this: this, ev: MouseEvent) => any;
+ onmousewheel: (this: this, ev: WheelEvent) => any;
+ onmsgesturechange: (this: this, ev: MSGestureEvent) => any;
+ onmsgesturedoubletap: (this: this, ev: MSGestureEvent) => any;
+ onmsgestureend: (this: this, ev: MSGestureEvent) => any;
+ onmsgesturehold: (this: this, ev: MSGestureEvent) => any;
+ onmsgesturestart: (this: this, ev: MSGestureEvent) => any;
+ onmsgesturetap: (this: this, ev: MSGestureEvent) => any;
+ onmsinertiastart: (this: this, ev: MSGestureEvent) => any;
+ onmspointercancel: (this: this, ev: MSPointerEvent) => any;
+ onmspointerdown: (this: this, ev: MSPointerEvent) => any;
+ onmspointerenter: (this: this, ev: MSPointerEvent) => any;
+ onmspointerleave: (this: this, ev: MSPointerEvent) => any;
+ onmspointermove: (this: this, ev: MSPointerEvent) => any;
+ onmspointerout: (this: this, ev: MSPointerEvent) => any;
+ onmspointerover: (this: this, ev: MSPointerEvent) => any;
+ onmspointerup: (this: this, ev: MSPointerEvent) => any;
+ onoffline: (this: this, ev: Event) => any;
+ ononline: (this: this, ev: Event) => any;
+ onorientationchange: (this: this, ev: Event) => any;
+ onpagehide: (this: this, ev: PageTransitionEvent) => any;
+ onpageshow: (this: this, ev: PageTransitionEvent) => any;
+ onpause: (this: this, ev: Event) => any;
+ onplay: (this: this, ev: Event) => any;
+ onplaying: (this: this, ev: Event) => any;
+ onpopstate: (this: this, ev: PopStateEvent) => any;
+ onprogress: (this: this, ev: ProgressEvent) => any;
+ onratechange: (this: this, ev: Event) => any;
+ onreadystatechange: (this: this, ev: ProgressEvent) => any;
+ onreset: (this: this, ev: Event) => any;
+ onresize: (this: this, ev: UIEvent) => any;
+ onscroll: (this: this, ev: UIEvent) => any;
+ onseeked: (this: this, ev: Event) => any;
+ onseeking: (this: this, ev: Event) => any;
+ onselect: (this: this, ev: UIEvent) => any;
+ onstalled: (this: this, ev: Event) => any;
+ onstorage: (this: this, ev: StorageEvent) => any;
+ onsubmit: (this: this, ev: Event) => any;
+ onsuspend: (this: this, ev: Event) => any;
+ ontimeupdate: (this: this, ev: Event) => any;
+ ontouchcancel: (ev: TouchEvent) => any;
+ ontouchend: (ev: TouchEvent) => any;
+ ontouchmove: (ev: TouchEvent) => any;
+ ontouchstart: (ev: TouchEvent) => any;
+ onunload: (this: this, ev: Event) => any;
+ onvolumechange: (this: this, ev: Event) => any;
+ onwaiting: (this: this, ev: Event) => any;
+ opener: any;
orientation: string | number;
- outerHeight: number;
- outerWidth: number;
- pageXOffset: number;
- pageYOffset: number;
- parent: Window;
- performance: Performance;
- personalbar: BarProp;
- screen: Screen;
- screenLeft: number;
- screenTop: number;
- screenX: number;
- screenY: number;
- scrollX: number;
- scrollY: number;
- scrollbars: BarProp;
- self: Window;
+ readonly outerHeight: number;
+ readonly outerWidth: number;
+ readonly pageXOffset: number;
+ readonly pageYOffset: number;
+ readonly parent: Window;
+ readonly performance: Performance;
+ readonly personalbar: BarProp;
+ readonly screen: Screen;
+ readonly screenLeft: number;
+ readonly screenTop: number;
+ readonly screenX: number;
+ readonly screenY: number;
+ readonly scrollX: number;
+ readonly scrollY: number;
+ readonly scrollbars: BarProp;
+ readonly self: Window;
status: string;
- statusbar: BarProp;
- styleMedia: StyleMedia;
- toolbar: BarProp;
- top: Window;
- window: Window;
- URL: URL;
+ readonly statusbar: BarProp;
+ readonly styleMedia: StyleMedia;
+ readonly toolbar: BarProp;
+ readonly top: Window;
+ readonly window: Window;
+ URL: typeof URL;
+ Blob: typeof Blob;
alert(message?: any): void;
blur(): void;
cancelAnimationFrame(handle: number): void;
@@ -17347,14 +18737,11 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window
matchMedia(mediaQuery: string): MediaQueryList;
moveBy(x?: number, y?: number): void;
moveTo(x?: number, y?: number): void;
- msCancelRequestAnimationFrame(handle: number): void;
- msMatchMedia(mediaQuery: string): MediaQueryList;
- msRequestAnimationFrame(callback: FrameRequestCallback): number;
msWriteProfilerMark(profilerMarkName: string): void;
- open(url?: string, target?: string, features?: string, replace?: boolean): any;
- postMessage(message: any, targetOrigin: string, ports?: any): void;
+ open(url?: string, target?: string, features?: string, replace?: boolean): Window;
+ postMessage(message: any, targetOrigin: string, transfer?: any[]): void;
print(): void;
- prompt(message?: string, _default?: string): string;
+ prompt(message?: string, _default?: string): string | null;
releaseEvents(): void;
requestAnimationFrame(callback: FrameRequestCallback): number;
resizeBy(x?: number, y?: number): void;
@@ -17362,101 +18749,108 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window
scroll(x?: number, y?: number): void;
scrollBy(x?: number, y?: number): void;
scrollTo(x?: number, y?: number): void;
+ webkitCancelAnimationFrame(handle: number): void;
webkitConvertPointFromNodeToPage(node: Node, pt: WebKitPoint): WebKitPoint;
webkitConvertPointFromPageToNode(node: Node, pt: WebKitPoint): WebKitPoint;
- addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "afterprint", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "beforeprint", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "beforeunload", listener: (ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "compassneedscalibration", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "devicemotion", listener: (ev: DeviceMotionEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "deviceorientation", listener: (ev: DeviceOrientationEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "hashchange", listener: (ev: HashChangeEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "offline", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "online", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "orientationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "pagehide", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pageshow", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "popstate", listener: (ev: PopStateEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "readystatechange", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "resize", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "storage", listener: (ev: StorageEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "unload", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
+ webkitRequestAnimationFrame(callback: FrameRequestCallback): number;
+ scroll(options?: ScrollToOptions): void;
+ scrollTo(options?: ScrollToOptions): void;
+ scrollBy(options?: ScrollToOptions): void;
+ addEventListener(type: "MSGestureChange", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureDoubleTap", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureEnd", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureHold", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureStart", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSGestureTap", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSInertiaStart", listener: (this: this, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerCancel", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerDown", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerEnter", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerLeave", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerMove", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOut", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerOver", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "MSPointerUp", listener: (this: this, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "abort", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "afterprint", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforeprint", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "beforeunload", listener: (this: this, ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "blur", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplay", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "canplaythrough", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "change", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "click", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "compassneedscalibration", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "contextmenu", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dblclick", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "devicelight", listener: (this: this, ev: DeviceLightEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "devicemotion", listener: (this: this, ev: DeviceMotionEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "deviceorientation", listener: (this: this, ev: DeviceOrientationEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drag", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragend", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragenter", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragleave", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragover", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "dragstart", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "drop", listener: (this: this, ev: DragEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "durationchange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "emptied", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "ended", listener: (this: this, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "focus", listener: (this: this, ev: FocusEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "hashchange", listener: (this: this, ev: HashChangeEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "input", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "invalid", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "keydown", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keypress", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "keyup", listener: (this: this, ev: KeyboardEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadeddata", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadedmetadata", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadstart", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "message", listener: (this: this, ev: MessageEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousedown", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseenter", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseleave", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousemove", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseout", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseover", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mouseup", listener: (this: this, ev: MouseEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "mousewheel", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "offline", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "online", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "orientationchange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "pagehide", listener: (this: this, ev: PageTransitionEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pageshow", listener: (this: this, ev: PageTransitionEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pause", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "play", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "playing", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointercancel", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerdown", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerenter", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerleave", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointermove", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerout", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerover", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerup", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "popstate", listener: (this: this, ev: PopStateEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "progress", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "ratechange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "readystatechange", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "reset", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "resize", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "scroll", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeked", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "seeking", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "select", listener: (this: this, ev: UIEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "stalled", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "storage", listener: (this: this, ev: StorageEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "submit", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "suspend", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "timeupdate", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "unload", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "volumechange", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "waiting", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "wheel", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
[index: number]: Window;
}
@@ -17467,11 +18861,11 @@ declare var Window: {
}
interface Worker extends EventTarget, AbstractWorker {
- onmessage: (ev: MessageEvent) => any;
+ onmessage: (this: this, ev: MessageEvent) => any;
postMessage(message: any, ports?: any): void;
terminate(): void;
- addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "message", listener: (this: this, ev: MessageEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -17489,22 +18883,21 @@ declare var XMLDocument: {
}
interface XMLHttpRequest extends EventTarget, XMLHttpRequestEventTarget {
- msCaching: string;
- onreadystatechange: (ev: ProgressEvent) => any;
- readyState: number;
- response: any;
- responseBody: any;
- responseText: string;
+ onreadystatechange: (this: this, ev: ProgressEvent) => any;
+ readonly readyState: number;
+ readonly response: any;
+ readonly responseText: string;
responseType: string;
- responseXML: any;
- status: number;
- statusText: string;
+ readonly responseXML: any;
+ readonly status: number;
+ readonly statusText: string;
timeout: number;
- upload: XMLHttpRequestUpload;
+ readonly upload: XMLHttpRequestUpload;
withCredentials: boolean;
+ msCaching?: string;
abort(): void;
getAllResponseHeaders(): string;
- getResponseHeader(header: string): string;
+ getResponseHeader(header: string): string | null;
msCachingEnabled(): boolean;
open(method: string, url: string, async?: boolean, user?: string, password?: string): void;
overrideMimeType(mime: string): void;
@@ -17512,30 +18905,30 @@ interface XMLHttpRequest extends EventTarget, XMLHttpRequestEventTarget {
send(data?: string): void;
send(data?: any): void;
setRequestHeader(header: string, value: string): void;
- DONE: number;
- HEADERS_RECEIVED: number;
- LOADING: number;
- OPENED: number;
- UNSENT: number;
- addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "loadend", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "readystatechange", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "timeout", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
+ readonly DONE: number;
+ readonly HEADERS_RECEIVED: number;
+ readonly LOADING: number;
+ readonly OPENED: number;
+ readonly UNSENT: number;
+ addEventListener(type: "abort", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadend", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadstart", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "progress", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "readystatechange", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "timeout", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
declare var XMLHttpRequest: {
prototype: XMLHttpRequest;
new(): XMLHttpRequest;
- DONE: number;
- HEADERS_RECEIVED: number;
- LOADING: number;
- OPENED: number;
- UNSENT: number;
+ readonly DONE: number;
+ readonly HEADERS_RECEIVED: number;
+ readonly LOADING: number;
+ readonly OPENED: number;
+ readonly UNSENT: number;
create(): XMLHttpRequest;
}
@@ -17587,40 +18980,40 @@ declare var XPathNSResolver: {
}
interface XPathResult {
- booleanValue: boolean;
- invalidIteratorState: boolean;
- numberValue: number;
- resultType: number;
- singleNodeValue: Node;
- snapshotLength: number;
- stringValue: string;
+ readonly booleanValue: boolean;
+ readonly invalidIteratorState: boolean;
+ readonly numberValue: number;
+ readonly resultType: number;
+ readonly singleNodeValue: Node;
+ readonly snapshotLength: number;
+ readonly stringValue: string;
iterateNext(): Node;
snapshotItem(index: number): Node;
- ANY_TYPE: number;
- ANY_UNORDERED_NODE_TYPE: number;
- BOOLEAN_TYPE: number;
- FIRST_ORDERED_NODE_TYPE: number;
- NUMBER_TYPE: number;
- ORDERED_NODE_ITERATOR_TYPE: number;
- ORDERED_NODE_SNAPSHOT_TYPE: number;
- STRING_TYPE: number;
- UNORDERED_NODE_ITERATOR_TYPE: number;
- UNORDERED_NODE_SNAPSHOT_TYPE: number;
+ readonly ANY_TYPE: number;
+ readonly ANY_UNORDERED_NODE_TYPE: number;
+ readonly BOOLEAN_TYPE: number;
+ readonly FIRST_ORDERED_NODE_TYPE: number;
+ readonly NUMBER_TYPE: number;
+ readonly ORDERED_NODE_ITERATOR_TYPE: number;
+ readonly ORDERED_NODE_SNAPSHOT_TYPE: number;
+ readonly STRING_TYPE: number;
+ readonly UNORDERED_NODE_ITERATOR_TYPE: number;
+ readonly UNORDERED_NODE_SNAPSHOT_TYPE: number;
}
declare var XPathResult: {
prototype: XPathResult;
new(): XPathResult;
- ANY_TYPE: number;
- ANY_UNORDERED_NODE_TYPE: number;
- BOOLEAN_TYPE: number;
- FIRST_ORDERED_NODE_TYPE: number;
- NUMBER_TYPE: number;
- ORDERED_NODE_ITERATOR_TYPE: number;
- ORDERED_NODE_SNAPSHOT_TYPE: number;
- STRING_TYPE: number;
- UNORDERED_NODE_ITERATOR_TYPE: number;
- UNORDERED_NODE_SNAPSHOT_TYPE: number;
+ readonly ANY_TYPE: number;
+ readonly ANY_UNORDERED_NODE_TYPE: number;
+ readonly BOOLEAN_TYPE: number;
+ readonly FIRST_ORDERED_NODE_TYPE: number;
+ readonly NUMBER_TYPE: number;
+ readonly ORDERED_NODE_ITERATOR_TYPE: number;
+ readonly ORDERED_NODE_SNAPSHOT_TYPE: number;
+ readonly STRING_TYPE: number;
+ readonly UNORDERED_NODE_ITERATOR_TYPE: number;
+ readonly UNORDERED_NODE_SNAPSHOT_TYPE: number;
}
interface XSLTProcessor {
@@ -17640,11 +19033,23 @@ declare var XSLTProcessor: {
}
interface AbstractWorker {
- onerror: (ev: Event) => any;
- addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
+ onerror: (this: this, ev: ErrorEvent) => any;
+ addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
+interface CanvasPathMethods {
+ arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;
+ arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void;
+ bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void;
+ closePath(): void;
+ ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void;
+ lineTo(x: number, y: number): void;
+ moveTo(x: number, y: number): void;
+ quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void;
+ rect(x: number, y: number, w: number, h: number): void;
+}
+
interface ChildNode {
remove(): void;
}
@@ -17667,6 +19072,7 @@ interface DocumentEvent {
createEvent(eventInterface:"CommandEvent"): CommandEvent;
createEvent(eventInterface:"CompositionEvent"): CompositionEvent;
createEvent(eventInterface:"CustomEvent"): CustomEvent;
+ createEvent(eventInterface:"DeviceLightEvent"): DeviceLightEvent;
createEvent(eventInterface:"DeviceMotionEvent"): DeviceMotionEvent;
createEvent(eventInterface:"DeviceOrientationEvent"): DeviceOrientationEvent;
createEvent(eventInterface:"DragEvent"): DragEvent;
@@ -17678,6 +19084,7 @@ interface DocumentEvent {
createEvent(eventInterface:"HashChangeEvent"): HashChangeEvent;
createEvent(eventInterface:"IDBVersionChangeEvent"): IDBVersionChangeEvent;
createEvent(eventInterface:"KeyboardEvent"): KeyboardEvent;
+ createEvent(eventInterface:"ListeningStateChangedEvent"): ListeningStateChangedEvent;
createEvent(eventInterface:"LongRunningScriptDetectedEvent"): LongRunningScriptDetectedEvent;
createEvent(eventInterface:"MSGestureEvent"): MSGestureEvent;
createEvent(eventInterface:"MSManipulationEvent"): MSManipulationEvent;
@@ -17685,21 +19092,31 @@ interface DocumentEvent {
createEvent(eventInterface:"MSMediaKeyNeededEvent"): MSMediaKeyNeededEvent;
createEvent(eventInterface:"MSPointerEvent"): MSPointerEvent;
createEvent(eventInterface:"MSSiteModeEvent"): MSSiteModeEvent;
+ createEvent(eventInterface:"MediaEncryptedEvent"): MediaEncryptedEvent;
+ createEvent(eventInterface:"MediaKeyMessageEvent"): MediaKeyMessageEvent;
+ createEvent(eventInterface:"MediaStreamErrorEvent"): MediaStreamErrorEvent;
+ createEvent(eventInterface:"MediaStreamTrackEvent"): MediaStreamTrackEvent;
createEvent(eventInterface:"MessageEvent"): MessageEvent;
createEvent(eventInterface:"MouseEvent"): MouseEvent;
createEvent(eventInterface:"MouseEvents"): MouseEvent;
- createEvent(eventInterface:"MouseWheelEvent"): MouseWheelEvent;
createEvent(eventInterface:"MutationEvent"): MutationEvent;
createEvent(eventInterface:"MutationEvents"): MutationEvent;
createEvent(eventInterface:"NavigationCompletedEvent"): NavigationCompletedEvent;
createEvent(eventInterface:"NavigationEvent"): NavigationEvent;
createEvent(eventInterface:"NavigationEventWithReferrer"): NavigationEventWithReferrer;
createEvent(eventInterface:"OfflineAudioCompletionEvent"): OfflineAudioCompletionEvent;
+ createEvent(eventInterface:"OverflowEvent"): OverflowEvent;
createEvent(eventInterface:"PageTransitionEvent"): PageTransitionEvent;
createEvent(eventInterface:"PermissionRequestedEvent"): PermissionRequestedEvent;
createEvent(eventInterface:"PointerEvent"): PointerEvent;
createEvent(eventInterface:"PopStateEvent"): PopStateEvent;
createEvent(eventInterface:"ProgressEvent"): ProgressEvent;
+ createEvent(eventInterface:"RTCDTMFToneChangeEvent"): RTCDTMFToneChangeEvent;
+ createEvent(eventInterface:"RTCDtlsTransportStateChangedEvent"): RTCDtlsTransportStateChangedEvent;
+ createEvent(eventInterface:"RTCIceCandidatePairChangedEvent"): RTCIceCandidatePairChangedEvent;
+ createEvent(eventInterface:"RTCIceGathererEvent"): RTCIceGathererEvent;
+ createEvent(eventInterface:"RTCIceTransportStateChangedEvent"): RTCIceTransportStateChangedEvent;
+ createEvent(eventInterface:"RTCSsrcConflictEvent"): RTCSsrcConflictEvent;
createEvent(eventInterface:"SVGZoomEvent"): SVGZoomEvent;
createEvent(eventInterface:"SVGZoomEvents"): SVGZoomEvent;
createEvent(eventInterface:"ScriptNotifyEvent"): ScriptNotifyEvent;
@@ -17717,11 +19134,11 @@ interface DocumentEvent {
}
interface ElementTraversal {
- childElementCount: number;
- firstElementChild: Element;
- lastElementChild: Element;
- nextElementSibling: Element;
- previousElementSibling: Element;
+ readonly childElementCount: number;
+ readonly firstElementChild: Element;
+ readonly lastElementChild: Element;
+ readonly nextElementSibling: Element;
+ readonly previousElementSibling: Element;
}
interface GetSVGDocument {
@@ -17729,24 +19146,24 @@ interface GetSVGDocument {
}
interface GlobalEventHandlers {
- onpointercancel: (ev: PointerEvent) => any;
- onpointerdown: (ev: PointerEvent) => any;
- onpointerenter: (ev: PointerEvent) => any;
- onpointerleave: (ev: PointerEvent) => any;
- onpointermove: (ev: PointerEvent) => any;
- onpointerout: (ev: PointerEvent) => any;
- onpointerover: (ev: PointerEvent) => any;
- onpointerup: (ev: PointerEvent) => any;
- onwheel: (ev: WheelEvent) => any;
- addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
+ onpointercancel: (this: this, ev: PointerEvent) => any;
+ onpointerdown: (this: this, ev: PointerEvent) => any;
+ onpointerenter: (this: this, ev: PointerEvent) => any;
+ onpointerleave: (this: this, ev: PointerEvent) => any;
+ onpointermove: (this: this, ev: PointerEvent) => any;
+ onpointerout: (this: this, ev: PointerEvent) => any;
+ onpointerover: (this: this, ev: PointerEvent) => any;
+ onpointerup: (this: this, ev: PointerEvent) => any;
+ onwheel: (this: this, ev: WheelEvent) => any;
+ addEventListener(type: "pointercancel", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerdown", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerenter", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerleave", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointermove", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerout", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerover", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "pointerup", listener: (this: this, ev: PointerEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "wheel", listener: (this: this, ev: WheelEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -17766,33 +19183,32 @@ interface HTMLTableAlignment {
}
interface IDBEnvironment {
- indexedDB: IDBFactory;
- msIndexedDB: IDBFactory;
+ readonly indexedDB: IDBFactory;
}
interface LinkStyle {
- sheet: StyleSheet;
+ readonly sheet: StyleSheet;
}
interface MSBaseReader {
- onabort: (ev: Event) => any;
- onerror: (ev: Event) => any;
- onload: (ev: Event) => any;
- onloadend: (ev: ProgressEvent) => any;
- onloadstart: (ev: Event) => any;
- onprogress: (ev: ProgressEvent) => any;
- readyState: number;
- result: any;
+ onabort: (this: this, ev: Event) => any;
+ onerror: (this: this, ev: ErrorEvent) => any;
+ onload: (this: this, ev: Event) => any;
+ onloadend: (this: this, ev: ProgressEvent) => any;
+ onloadstart: (this: this, ev: Event) => any;
+ onprogress: (this: this, ev: ProgressEvent) => any;
+ readonly readyState: number;
+ readonly result: any;
abort(): void;
- DONE: number;
- EMPTY: number;
- LOADING: number;
- addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "loadend", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
+ readonly DONE: number;
+ readonly EMPTY: number;
+ readonly LOADING: number;
+ addEventListener(type: "abort", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadend", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadstart", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "progress", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
@@ -17814,29 +19230,386 @@ interface NavigatorContentUtils {
}
interface NavigatorGeolocation {
- geolocation: Geolocation;
+ readonly geolocation: Geolocation;
}
interface NavigatorID {
- appName: string;
- appVersion: string;
- platform: string;
- product: string;
- productSub: string;
- userAgent: string;
- vendor: string;
- vendorSub: string;
+ readonly appName: string;
+ readonly appVersion: string;
+ readonly platform: string;
+ readonly product: string;
+ readonly productSub: string;
+ readonly userAgent: string;
+ readonly vendor: string;
+ readonly vendorSub: string;
}
interface NavigatorOnLine {
- onLine: boolean;
+ readonly onLine: boolean;
}
interface NavigatorStorageUtils {
}
+interface NavigatorUserMedia {
+ readonly mediaDevices: MediaDevices;
+ getUserMedia(constraints: MediaStreamConstraints, successCallback: NavigatorUserMediaSuccessCallback, errorCallback: NavigatorUserMediaErrorCallback): void;
+}
+
interface NodeSelector {
+ querySelector(selectors: "a"): HTMLAnchorElement;
+ querySelector(selectors: "abbr"): HTMLElement;
+ querySelector(selectors: "acronym"): HTMLElement;
+ querySelector(selectors: "address"): HTMLElement;
+ querySelector(selectors: "applet"): HTMLAppletElement;
+ querySelector(selectors: "area"): HTMLAreaElement;
+ querySelector(selectors: "article"): HTMLElement;
+ querySelector(selectors: "aside"): HTMLElement;
+ querySelector(selectors: "audio"): HTMLAudioElement;
+ querySelector(selectors: "b"): HTMLElement;
+ querySelector(selectors: "base"): HTMLBaseElement;
+ querySelector(selectors: "basefont"): HTMLBaseFontElement;
+ querySelector(selectors: "bdo"): HTMLElement;
+ querySelector(selectors: "big"): HTMLElement;
+ querySelector(selectors: "blockquote"): HTMLQuoteElement;
+ querySelector(selectors: "body"): HTMLBodyElement;
+ querySelector(selectors: "br"): HTMLBRElement;
+ querySelector(selectors: "button"): HTMLButtonElement;
+ querySelector(selectors: "canvas"): HTMLCanvasElement;
+ querySelector(selectors: "caption"): HTMLTableCaptionElement;
+ querySelector(selectors: "center"): HTMLElement;
+ querySelector(selectors: "circle"): SVGCircleElement;
+ querySelector(selectors: "cite"): HTMLElement;
+ querySelector(selectors: "clippath"): SVGClipPathElement;
+ querySelector(selectors: "code"): HTMLElement;
+ querySelector(selectors: "col"): HTMLTableColElement;
+ querySelector(selectors: "colgroup"): HTMLTableColElement;
+ querySelector(selectors: "datalist"): HTMLDataListElement;
+ querySelector(selectors: "dd"): HTMLElement;
+ querySelector(selectors: "defs"): SVGDefsElement;
+ querySelector(selectors: "del"): HTMLModElement;
+ querySelector(selectors: "desc"): SVGDescElement;
+ querySelector(selectors: "dfn"): HTMLElement;
+ querySelector(selectors: "dir"): HTMLDirectoryElement;
+ querySelector(selectors: "div"): HTMLDivElement;
+ querySelector(selectors: "dl"): HTMLDListElement;
+ querySelector(selectors: "dt"): HTMLElement;
+ querySelector(selectors: "ellipse"): SVGEllipseElement;
+ querySelector(selectors: "em"): HTMLElement;
+ querySelector(selectors: "embed"): HTMLEmbedElement;
+ querySelector(selectors: "feblend"): SVGFEBlendElement;
+ querySelector(selectors: "fecolormatrix"): SVGFEColorMatrixElement;
+ querySelector(selectors: "fecomponenttransfer"): SVGFEComponentTransferElement;
+ querySelector(selectors: "fecomposite"): SVGFECompositeElement;
+ querySelector(selectors: "feconvolvematrix"): SVGFEConvolveMatrixElement;
+ querySelector(selectors: "fediffuselighting"): SVGFEDiffuseLightingElement;
+ querySelector(selectors: "fedisplacementmap"): SVGFEDisplacementMapElement;
+ querySelector(selectors: "fedistantlight"): SVGFEDistantLightElement;
+ querySelector(selectors: "feflood"): SVGFEFloodElement;
+ querySelector(selectors: "fefunca"): SVGFEFuncAElement;
+ querySelector(selectors: "fefuncb"): SVGFEFuncBElement;
+ querySelector(selectors: "fefuncg"): SVGFEFuncGElement;
+ querySelector(selectors: "fefuncr"): SVGFEFuncRElement;
+ querySelector(selectors: "fegaussianblur"): SVGFEGaussianBlurElement;
+ querySelector(selectors: "feimage"): SVGFEImageElement;
+ querySelector(selectors: "femerge"): SVGFEMergeElement;
+ querySelector(selectors: "femergenode"): SVGFEMergeNodeElement;
+ querySelector(selectors: "femorphology"): SVGFEMorphologyElement;
+ querySelector(selectors: "feoffset"): SVGFEOffsetElement;
+ querySelector(selectors: "fepointlight"): SVGFEPointLightElement;
+ querySelector(selectors: "fespecularlighting"): SVGFESpecularLightingElement;
+ querySelector(selectors: "fespotlight"): SVGFESpotLightElement;
+ querySelector(selectors: "fetile"): SVGFETileElement;
+ querySelector(selectors: "feturbulence"): SVGFETurbulenceElement;
+ querySelector(selectors: "fieldset"): HTMLFieldSetElement;
+ querySelector(selectors: "figcaption"): HTMLElement;
+ querySelector(selectors: "figure"): HTMLElement;
+ querySelector(selectors: "filter"): SVGFilterElement;
+ querySelector(selectors: "font"): HTMLFontElement;
+ querySelector(selectors: "footer"): HTMLElement;
+ querySelector(selectors: "foreignobject"): SVGForeignObjectElement;
+ querySelector(selectors: "form"): HTMLFormElement;
+ querySelector(selectors: "frame"): HTMLFrameElement;
+ querySelector(selectors: "frameset"): HTMLFrameSetElement;
+ querySelector(selectors: "g"): SVGGElement;
+ querySelector(selectors: "h1"): HTMLHeadingElement;
+ querySelector(selectors: "h2"): HTMLHeadingElement;
+ querySelector(selectors: "h3"): HTMLHeadingElement;
+ querySelector(selectors: "h4"): HTMLHeadingElement;
+ querySelector(selectors: "h5"): HTMLHeadingElement;
+ querySelector(selectors: "h6"): HTMLHeadingElement;
+ querySelector(selectors: "head"): HTMLHeadElement;
+ querySelector(selectors: "header"): HTMLElement;
+ querySelector(selectors: "hgroup"): HTMLElement;
+ querySelector(selectors: "hr"): HTMLHRElement;
+ querySelector(selectors: "html"): HTMLHtmlElement;
+ querySelector(selectors: "i"): HTMLElement;
+ querySelector(selectors: "iframe"): HTMLIFrameElement;
+ querySelector(selectors: "image"): SVGImageElement;
+ querySelector(selectors: "img"): HTMLImageElement;
+ querySelector(selectors: "input"): HTMLInputElement;
+ querySelector(selectors: "ins"): HTMLModElement;
+ querySelector(selectors: "isindex"): HTMLUnknownElement;
+ querySelector(selectors: "kbd"): HTMLElement;
+ querySelector(selectors: "keygen"): HTMLElement;
+ querySelector(selectors: "label"): HTMLLabelElement;
+ querySelector(selectors: "legend"): HTMLLegendElement;
+ querySelector(selectors: "li"): HTMLLIElement;
+ querySelector(selectors: "line"): SVGLineElement;
+ querySelector(selectors: "lineargradient"): SVGLinearGradientElement;
+ querySelector(selectors: "link"): HTMLLinkElement;
+ querySelector(selectors: "listing"): HTMLPreElement;
+ querySelector(selectors: "map"): HTMLMapElement;
+ querySelector(selectors: "mark"): HTMLElement;
+ querySelector(selectors: "marker"): SVGMarkerElement;
+ querySelector(selectors: "marquee"): HTMLMarqueeElement;
+ querySelector(selectors: "mask"): SVGMaskElement;
+ querySelector(selectors: "menu"): HTMLMenuElement;
+ querySelector(selectors: "meta"): HTMLMetaElement;
+ querySelector(selectors: "metadata"): SVGMetadataElement;
+ querySelector(selectors: "meter"): HTMLMeterElement;
+ querySelector(selectors: "nav"): HTMLElement;
+ querySelector(selectors: "nextid"): HTMLUnknownElement;
+ querySelector(selectors: "nobr"): HTMLElement;
+ querySelector(selectors: "noframes"): HTMLElement;
+ querySelector(selectors: "noscript"): HTMLElement;
+ querySelector(selectors: "object"): HTMLObjectElement;
+ querySelector(selectors: "ol"): HTMLOListElement;
+ querySelector(selectors: "optgroup"): HTMLOptGroupElement;
+ querySelector(selectors: "option"): HTMLOptionElement;
+ querySelector(selectors: "p"): HTMLParagraphElement;
+ querySelector(selectors: "param"): HTMLParamElement;
+ querySelector(selectors: "path"): SVGPathElement;
+ querySelector(selectors: "pattern"): SVGPatternElement;
+ querySelector(selectors: "picture"): HTMLPictureElement;
+ querySelector(selectors: "plaintext"): HTMLElement;
+ querySelector(selectors: "polygon"): SVGPolygonElement;
+ querySelector(selectors: "polyline"): SVGPolylineElement;
+ querySelector(selectors: "pre"): HTMLPreElement;
+ querySelector(selectors: "progress"): HTMLProgressElement;
+ querySelector(selectors: "q"): HTMLQuoteElement;
+ querySelector(selectors: "radialgradient"): SVGRadialGradientElement;
+ querySelector(selectors: "rect"): SVGRectElement;
+ querySelector(selectors: "rt"): HTMLElement;
+ querySelector(selectors: "ruby"): HTMLElement;
+ querySelector(selectors: "s"): HTMLElement;
+ querySelector(selectors: "samp"): HTMLElement;
+ querySelector(selectors: "script"): HTMLScriptElement;
+ querySelector(selectors: "section"): HTMLElement;
+ querySelector(selectors: "select"): HTMLSelectElement;
+ querySelector(selectors: "small"): HTMLElement;
+ querySelector(selectors: "source"): HTMLSourceElement;
+ querySelector(selectors: "span"): HTMLSpanElement;
+ querySelector(selectors: "stop"): SVGStopElement;
+ querySelector(selectors: "strike"): HTMLElement;
+ querySelector(selectors: "strong"): HTMLElement;
+ querySelector(selectors: "style"): HTMLStyleElement;
+ querySelector(selectors: "sub"): HTMLElement;
+ querySelector(selectors: "sup"): HTMLElement;
+ querySelector(selectors: "svg"): SVGSVGElement;
+ querySelector(selectors: "switch"): SVGSwitchElement;
+ querySelector(selectors: "symbol"): SVGSymbolElement;
+ querySelector(selectors: "table"): HTMLTableElement;
+ querySelector(selectors: "tbody"): HTMLTableSectionElement;
+ querySelector(selectors: "td"): HTMLTableDataCellElement;
+ querySelector(selectors: "template"): HTMLTemplateElement;
+ querySelector(selectors: "text"): SVGTextElement;
+ querySelector(selectors: "textpath"): SVGTextPathElement;
+ querySelector(selectors: "textarea"): HTMLTextAreaElement;
+ querySelector(selectors: "tfoot"): HTMLTableSectionElement;
+ querySelector(selectors: "th"): HTMLTableHeaderCellElement;
+ querySelector(selectors: "thead"): HTMLTableSectionElement;
+ querySelector(selectors: "title"): HTMLTitleElement;
+ querySelector(selectors: "tr"): HTMLTableRowElement;
+ querySelector(selectors: "track"): HTMLTrackElement;
+ querySelector(selectors: "tspan"): SVGTSpanElement;
+ querySelector(selectors: "tt"): HTMLElement;
+ querySelector(selectors: "u"): HTMLElement;
+ querySelector(selectors: "ul"): HTMLUListElement;
+ querySelector(selectors: "use"): SVGUseElement;
+ querySelector(selectors: "var"): HTMLElement;
+ querySelector(selectors: "video"): HTMLVideoElement;
+ querySelector(selectors: "view"): SVGViewElement;
+ querySelector(selectors: "wbr"): HTMLElement;
+ querySelector(selectors: "x-ms-webview"): MSHTMLWebViewElement;
+ querySelector(selectors: "xmp"): HTMLPreElement;
querySelector(selectors: string): Element;
+ querySelectorAll(selectors: "a"): NodeListOf<HTMLAnchorElement>;
+ querySelectorAll(selectors: "abbr"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "acronym"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "address"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "applet"): NodeListOf<HTMLAppletElement>;
+ querySelectorAll(selectors: "area"): NodeListOf<HTMLAreaElement>;
+ querySelectorAll(selectors: "article"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "aside"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "audio"): NodeListOf<HTMLAudioElement>;
+ querySelectorAll(selectors: "b"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "base"): NodeListOf<HTMLBaseElement>;
+ querySelectorAll(selectors: "basefont"): NodeListOf<HTMLBaseFontElement>;
+ querySelectorAll(selectors: "bdo"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "big"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "blockquote"): NodeListOf<HTMLQuoteElement>;
+ querySelectorAll(selectors: "body"): NodeListOf<HTMLBodyElement>;
+ querySelectorAll(selectors: "br"): NodeListOf<HTMLBRElement>;
+ querySelectorAll(selectors: "button"): NodeListOf<HTMLButtonElement>;
+ querySelectorAll(selectors: "canvas"): NodeListOf<HTMLCanvasElement>;
+ querySelectorAll(selectors: "caption"): NodeListOf<HTMLTableCaptionElement>;
+ querySelectorAll(selectors: "center"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "circle"): NodeListOf<SVGCircleElement>;
+ querySelectorAll(selectors: "cite"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "clippath"): NodeListOf<SVGClipPathElement>;
+ querySelectorAll(selectors: "code"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "col"): NodeListOf<HTMLTableColElement>;
+ querySelectorAll(selectors: "colgroup"): NodeListOf<HTMLTableColElement>;
+ querySelectorAll(selectors: "datalist"): NodeListOf<HTMLDataListElement>;
+ querySelectorAll(selectors: "dd"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "defs"): NodeListOf<SVGDefsElement>;
+ querySelectorAll(selectors: "del"): NodeListOf<HTMLModElement>;
+ querySelectorAll(selectors: "desc"): NodeListOf<SVGDescElement>;
+ querySelectorAll(selectors: "dfn"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "dir"): NodeListOf<HTMLDirectoryElement>;
+ querySelectorAll(selectors: "div"): NodeListOf<HTMLDivElement>;
+ querySelectorAll(selectors: "dl"): NodeListOf<HTMLDListElement>;
+ querySelectorAll(selectors: "dt"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "ellipse"): NodeListOf<SVGEllipseElement>;
+ querySelectorAll(selectors: "em"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "embed"): NodeListOf<HTMLEmbedElement>;
+ querySelectorAll(selectors: "feblend"): NodeListOf<SVGFEBlendElement>;
+ querySelectorAll(selectors: "fecolormatrix"): NodeListOf<SVGFEColorMatrixElement>;
+ querySelectorAll(selectors: "fecomponenttransfer"): NodeListOf<SVGFEComponentTransferElement>;
+ querySelectorAll(selectors: "fecomposite"): NodeListOf<SVGFECompositeElement>;
+ querySelectorAll(selectors: "feconvolvematrix"): NodeListOf<SVGFEConvolveMatrixElement>;
+ querySelectorAll(selectors: "fediffuselighting"): NodeListOf<SVGFEDiffuseLightingElement>;
+ querySelectorAll(selectors: "fedisplacementmap"): NodeListOf<SVGFEDisplacementMapElement>;
+ querySelectorAll(selectors: "fedistantlight"): NodeListOf<SVGFEDistantLightElement>;
+ querySelectorAll(selectors: "feflood"): NodeListOf<SVGFEFloodElement>;
+ querySelectorAll(selectors: "fefunca"): NodeListOf<SVGFEFuncAElement>;
+ querySelectorAll(selectors: "fefuncb"): NodeListOf<SVGFEFuncBElement>;
+ querySelectorAll(selectors: "fefuncg"): NodeListOf<SVGFEFuncGElement>;
+ querySelectorAll(selectors: "fefuncr"): NodeListOf<SVGFEFuncRElement>;
+ querySelectorAll(selectors: "fegaussianblur"): NodeListOf<SVGFEGaussianBlurElement>;
+ querySelectorAll(selectors: "feimage"): NodeListOf<SVGFEImageElement>;
+ querySelectorAll(selectors: "femerge"): NodeListOf<SVGFEMergeElement>;
+ querySelectorAll(selectors: "femergenode"): NodeListOf<SVGFEMergeNodeElement>;
+ querySelectorAll(selectors: "femorphology"): NodeListOf<SVGFEMorphologyElement>;
+ querySelectorAll(selectors: "feoffset"): NodeListOf<SVGFEOffsetElement>;
+ querySelectorAll(selectors: "fepointlight"): NodeListOf<SVGFEPointLightElement>;
+ querySelectorAll(selectors: "fespecularlighting"): NodeListOf<SVGFESpecularLightingElement>;
+ querySelectorAll(selectors: "fespotlight"): NodeListOf<SVGFESpotLightElement>;
+ querySelectorAll(selectors: "fetile"): NodeListOf<SVGFETileElement>;
+ querySelectorAll(selectors: "feturbulence"): NodeListOf<SVGFETurbulenceElement>;
+ querySelectorAll(selectors: "fieldset"): NodeListOf<HTMLFieldSetElement>;
+ querySelectorAll(selectors: "figcaption"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "figure"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "filter"): NodeListOf<SVGFilterElement>;
+ querySelectorAll(selectors: "font"): NodeListOf<HTMLFontElement>;
+ querySelectorAll(selectors: "footer"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "foreignobject"): NodeListOf<SVGForeignObjectElement>;
+ querySelectorAll(selectors: "form"): NodeListOf<HTMLFormElement>;
+ querySelectorAll(selectors: "frame"): NodeListOf<HTMLFrameElement>;
+ querySelectorAll(selectors: "frameset"): NodeListOf<HTMLFrameSetElement>;
+ querySelectorAll(selectors: "g"): NodeListOf<SVGGElement>;
+ querySelectorAll(selectors: "h1"): NodeListOf<HTMLHeadingElement>;
+ querySelectorAll(selectors: "h2"): NodeListOf<HTMLHeadingElement>;
+ querySelectorAll(selectors: "h3"): NodeListOf<HTMLHeadingElement>;
+ querySelectorAll(selectors: "h4"): NodeListOf<HTMLHeadingElement>;
+ querySelectorAll(selectors: "h5"): NodeListOf<HTMLHeadingElement>;
+ querySelectorAll(selectors: "h6"): NodeListOf<HTMLHeadingElement>;
+ querySelectorAll(selectors: "head"): NodeListOf<HTMLHeadElement>;
+ querySelectorAll(selectors: "header"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "hgroup"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "hr"): NodeListOf<HTMLHRElement>;
+ querySelectorAll(selectors: "html"): NodeListOf<HTMLHtmlElement>;
+ querySelectorAll(selectors: "i"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "iframe"): NodeListOf<HTMLIFrameElement>;
+ querySelectorAll(selectors: "image"): NodeListOf<SVGImageElement>;
+ querySelectorAll(selectors: "img"): NodeListOf<HTMLImageElement>;
+ querySelectorAll(selectors: "input"): NodeListOf<HTMLInputElement>;
+ querySelectorAll(selectors: "ins"): NodeListOf<HTMLModElement>;
+ querySelectorAll(selectors: "isindex"): NodeListOf<HTMLUnknownElement>;
+ querySelectorAll(selectors: "kbd"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "keygen"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "label"): NodeListOf<HTMLLabelElement>;
+ querySelectorAll(selectors: "legend"): NodeListOf<HTMLLegendElement>;
+ querySelectorAll(selectors: "li"): NodeListOf<HTMLLIElement>;
+ querySelectorAll(selectors: "line"): NodeListOf<SVGLineElement>;
+ querySelectorAll(selectors: "lineargradient"): NodeListOf<SVGLinearGradientElement>;
+ querySelectorAll(selectors: "link"): NodeListOf<HTMLLinkElement>;
+ querySelectorAll(selectors: "listing"): NodeListOf<HTMLPreElement>;
+ querySelectorAll(selectors: "map"): NodeListOf<HTMLMapElement>;
+ querySelectorAll(selectors: "mark"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "marker"): NodeListOf<SVGMarkerElement>;
+ querySelectorAll(selectors: "marquee"): NodeListOf<HTMLMarqueeElement>;
+ querySelectorAll(selectors: "mask"): NodeListOf<SVGMaskElement>;
+ querySelectorAll(selectors: "menu"): NodeListOf<HTMLMenuElement>;
+ querySelectorAll(selectors: "meta"): NodeListOf<HTMLMetaElement>;
+ querySelectorAll(selectors: "metadata"): NodeListOf<SVGMetadataElement>;
+ querySelectorAll(selectors: "meter"): NodeListOf<HTMLMeterElement>;
+ querySelectorAll(selectors: "nav"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "nextid"): NodeListOf<HTMLUnknownElement>;
+ querySelectorAll(selectors: "nobr"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "noframes"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "noscript"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "object"): NodeListOf<HTMLObjectElement>;
+ querySelectorAll(selectors: "ol"): NodeListOf<HTMLOListElement>;
+ querySelectorAll(selectors: "optgroup"): NodeListOf<HTMLOptGroupElement>;
+ querySelectorAll(selectors: "option"): NodeListOf<HTMLOptionElement>;
+ querySelectorAll(selectors: "p"): NodeListOf<HTMLParagraphElement>;
+ querySelectorAll(selectors: "param"): NodeListOf<HTMLParamElement>;
+ querySelectorAll(selectors: "path"): NodeListOf<SVGPathElement>;
+ querySelectorAll(selectors: "pattern"): NodeListOf<SVGPatternElement>;
+ querySelectorAll(selectors: "picture"): NodeListOf<HTMLPictureElement>;
+ querySelectorAll(selectors: "plaintext"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "polygon"): NodeListOf<SVGPolygonElement>;
+ querySelectorAll(selectors: "polyline"): NodeListOf<SVGPolylineElement>;
+ querySelectorAll(selectors: "pre"): NodeListOf<HTMLPreElement>;
+ querySelectorAll(selectors: "progress"): NodeListOf<HTMLProgressElement>;
+ querySelectorAll(selectors: "q"): NodeListOf<HTMLQuoteElement>;
+ querySelectorAll(selectors: "radialgradient"): NodeListOf<SVGRadialGradientElement>;
+ querySelectorAll(selectors: "rect"): NodeListOf<SVGRectElement>;
+ querySelectorAll(selectors: "rt"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "ruby"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "s"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "samp"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "script"): NodeListOf<HTMLScriptElement>;
+ querySelectorAll(selectors: "section"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "select"): NodeListOf<HTMLSelectElement>;
+ querySelectorAll(selectors: "small"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "source"): NodeListOf<HTMLSourceElement>;
+ querySelectorAll(selectors: "span"): NodeListOf<HTMLSpanElement>;
+ querySelectorAll(selectors: "stop"): NodeListOf<SVGStopElement>;
+ querySelectorAll(selectors: "strike"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "strong"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "style"): NodeListOf<HTMLStyleElement>;
+ querySelectorAll(selectors: "sub"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "sup"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "svg"): NodeListOf<SVGSVGElement>;
+ querySelectorAll(selectors: "switch"): NodeListOf<SVGSwitchElement>;
+ querySelectorAll(selectors: "symbol"): NodeListOf<SVGSymbolElement>;
+ querySelectorAll(selectors: "table"): NodeListOf<HTMLTableElement>;
+ querySelectorAll(selectors: "tbody"): NodeListOf<HTMLTableSectionElement>;
+ querySelectorAll(selectors: "td"): NodeListOf<HTMLTableDataCellElement>;
+ querySelectorAll(selectors: "template"): NodeListOf<HTMLTemplateElement>;
+ querySelectorAll(selectors: "text"): NodeListOf<SVGTextElement>;
+ querySelectorAll(selectors: "textpath"): NodeListOf<SVGTextPathElement>;
+ querySelectorAll(selectors: "textarea"): NodeListOf<HTMLTextAreaElement>;
+ querySelectorAll(selectors: "tfoot"): NodeListOf<HTMLTableSectionElement>;
+ querySelectorAll(selectors: "th"): NodeListOf<HTMLTableHeaderCellElement>;
+ querySelectorAll(selectors: "thead"): NodeListOf<HTMLTableSectionElement>;
+ querySelectorAll(selectors: "title"): NodeListOf<HTMLTitleElement>;
+ querySelectorAll(selectors: "tr"): NodeListOf<HTMLTableRowElement>;
+ querySelectorAll(selectors: "track"): NodeListOf<HTMLTrackElement>;
+ querySelectorAll(selectors: "tspan"): NodeListOf<SVGTSpanElement>;
+ querySelectorAll(selectors: "tt"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "u"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "ul"): NodeListOf<HTMLUListElement>;
+ querySelectorAll(selectors: "use"): NodeListOf<SVGUseElement>;
+ querySelectorAll(selectors: "var"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "video"): NodeListOf<HTMLVideoElement>;
+ querySelectorAll(selectors: "view"): NodeListOf<SVGViewElement>;
+ querySelectorAll(selectors: "wbr"): NodeListOf<HTMLElement>;
+ querySelectorAll(selectors: "x-ms-webview"): NodeListOf<MSHTMLWebViewElement>;
+ querySelectorAll(selectors: "xmp"): NodeListOf<HTMLPreElement>;
querySelectorAll(selectors: string): NodeListOf<Element>;
}
@@ -17845,29 +19618,29 @@ interface RandomSource {
}
interface SVGAnimatedPathData {
- pathSegList: SVGPathSegList;
+ readonly pathSegList: SVGPathSegList;
}
interface SVGAnimatedPoints {
- animatedPoints: SVGPointList;
- points: SVGPointList;
+ readonly animatedPoints: SVGPointList;
+ readonly points: SVGPointList;
}
interface SVGExternalResourcesRequired {
- externalResourcesRequired: SVGAnimatedBoolean;
+ readonly externalResourcesRequired: SVGAnimatedBoolean;
}
interface SVGFilterPrimitiveStandardAttributes extends SVGStylable {
- height: SVGAnimatedLength;
- result: SVGAnimatedString;
- width: SVGAnimatedLength;
- x: SVGAnimatedLength;
- y: SVGAnimatedLength;
+ readonly height: SVGAnimatedLength;
+ readonly result: SVGAnimatedString;
+ readonly width: SVGAnimatedLength;
+ readonly x: SVGAnimatedLength;
+ readonly y: SVGAnimatedLength;
}
interface SVGFitToViewBox {
- preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
- viewBox: SVGAnimatedRect;
+ readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio;
+ readonly viewBox: SVGAnimatedRect;
}
interface SVGLangSpace {
@@ -17876,8 +19649,8 @@ interface SVGLangSpace {
}
interface SVGLocatable {
- farthestViewportElement: SVGElement;
- nearestViewportElement: SVGElement;
+ readonly farthestViewportElement: SVGElement;
+ readonly nearestViewportElement: SVGElement;
getBBox(): SVGRect;
getCTM(): SVGMatrix;
getScreenCTM(): SVGMatrix;
@@ -17886,22 +19659,22 @@ interface SVGLocatable {
interface SVGStylable {
className: any;
- style: CSSStyleDeclaration;
+ readonly style: CSSStyleDeclaration;
}
interface SVGTests {
- requiredExtensions: SVGStringList;
- requiredFeatures: SVGStringList;
- systemLanguage: SVGStringList;
+ readonly requiredExtensions: SVGStringList;
+ readonly requiredFeatures: SVGStringList;
+ readonly systemLanguage: SVGStringList;
hasExtension(extension: string): boolean;
}
interface SVGTransformable extends SVGLocatable {
- transform: SVGAnimatedTransformList;
+ readonly transform: SVGAnimatedTransformList;
}
interface SVGURIReference {
- href: SVGAnimatedString;
+ readonly href: SVGAnimatedString;
}
interface WindowBase64 {
@@ -17910,57 +19683,63 @@ interface WindowBase64 {
}
interface WindowConsole {
- console: Console;
+ readonly console: Console;
}
interface WindowLocalStorage {
- localStorage: Storage;
+ readonly localStorage: Storage;
}
interface WindowSessionStorage {
- sessionStorage: Storage;
+ readonly sessionStorage: Storage;
}
interface WindowTimers extends Object, WindowTimersExtension {
clearInterval(handle: number): void;
clearTimeout(handle: number): void;
+ setInterval(handler: (...args: any[]) => void, timeout: number): number;
setInterval(handler: any, timeout?: any, ...args: any[]): number;
+ setTimeout(handler: (...args: any[]) => void, timeout: number): number;
setTimeout(handler: any, timeout?: any, ...args: any[]): number;
}
interface WindowTimersExtension {
clearImmediate(handle: number): void;
- msClearImmediate(handle: number): void;
- msSetImmediate(expression: any, ...args: any[]): number;
- setImmediate(expression: any, ...args: any[]): number;
+ setImmediate(handler: (...args: any[]) => void): number;
+ setImmediate(handler: any, ...args: any[]): number;
}
interface XMLHttpRequestEventTarget {
- onabort: (ev: Event) => any;
- onerror: (ev: Event) => any;
- onload: (ev: Event) => any;
- onloadend: (ev: ProgressEvent) => any;
- onloadstart: (ev: Event) => any;
- onprogress: (ev: ProgressEvent) => any;
- ontimeout: (ev: ProgressEvent) => any;
- addEventListener(type: "abort", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "error", listener: (ev: ErrorEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "loadend", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
- addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
- addEventListener(type: "timeout", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
+ onabort: (this: this, ev: Event) => any;
+ onerror: (this: this, ev: ErrorEvent) => any;
+ onload: (this: this, ev: Event) => any;
+ onloadend: (this: this, ev: ProgressEvent) => any;
+ onloadstart: (this: this, ev: Event) => any;
+ onprogress: (this: this, ev: ProgressEvent) => any;
+ ontimeout: (this: this, ev: ProgressEvent) => any;
+ addEventListener(type: "abort", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "error", listener: (this: this, ev: ErrorEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "load", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadend", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "loadstart", listener: (this: this, ev: Event) => any, useCapture?: boolean): void;
+ addEventListener(type: "progress", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
+ addEventListener(type: "timeout", listener: (this: this, ev: ProgressEvent) => any, useCapture?: boolean): void;
addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
}
-interface IDBObjectStoreParameters {
- keyPath?: string | string[];
- autoIncrement?: boolean;
+interface StorageEventInit extends EventInit {
+ key?: string;
+ oldValue?: string;
+ newValue?: string;
+ url: string;
+ storageArea?: Storage;
}
-interface IDBIndexParameters {
- unique?: boolean;
- multiEntry?: boolean;
+interface Canvas2DContextAttributes {
+ alpha?: boolean;
+ willReadFrequently?: boolean;
+ storage?: boolean;
+ [attribute: string]: boolean | string | undefined;
}
interface NodeListOf<TNode extends Node> extends NodeList {
@@ -17969,6 +19748,12 @@ interface NodeListOf<TNode extends Node> extends NodeList {
[index: number]: TNode;
}
+interface HTMLCollectionOf<T extends Element> extends HTMLCollection {
+ item(index: number): T;
+ namedItem(name: string): T;
+ [index: number]: T;
+}
+
interface BlobPropertyBag {
type?: string;
endings?: string;
@@ -17998,13 +19783,204 @@ interface ProgressEventInit extends EventInit {
total?: number;
}
-interface HTMLTemplateElement extends HTMLElement {
- content: DocumentFragment;
+interface ScrollOptions {
+ behavior?: ScrollBehavior;
}
-declare var HTMLTemplateElement: {
- prototype: HTMLTemplateElement;
- new(): HTMLTemplateElement;
+interface ScrollToOptions extends ScrollOptions {
+ left?: number;
+ top?: number;
+}
+
+interface ScrollIntoViewOptions extends ScrollOptions {
+ block?: ScrollLogicalPosition;
+ inline?: ScrollLogicalPosition;
+}
+
+interface ClipboardEventInit extends EventInit {
+ data?: string;
+ dataType?: string;
+}
+
+interface IDBArrayKey extends Array<IDBValidKey> {
+}
+
+interface RsaKeyGenParams extends Algorithm {
+ modulusLength: number;
+ publicExponent: Uint8Array;
+}
+
+interface RsaHashedKeyGenParams extends RsaKeyGenParams {
+ hash: AlgorithmIdentifier;
+}
+
+interface RsaKeyAlgorithm extends KeyAlgorithm {
+ modulusLength: number;
+ publicExponent: Uint8Array;
+}
+
+interface RsaHashedKeyAlgorithm extends RsaKeyAlgorithm {
+ hash: AlgorithmIdentifier;
+}
+
+interface RsaHashedImportParams {
+ hash: AlgorithmIdentifier;
+}
+
+interface RsaPssParams {
+ saltLength: number;
+}
+
+interface RsaOaepParams extends Algorithm {
+ label?: BufferSource;
+}
+
+interface EcdsaParams extends Algorithm {
+ hash: AlgorithmIdentifier;
+}
+
+interface EcKeyGenParams extends Algorithm {
+ namedCurve: string;
+}
+
+interface EcKeyAlgorithm extends KeyAlgorithm {
+ typedCurve: string;
+}
+
+interface EcKeyImportParams {
+ namedCurve: string;
+}
+
+interface EcdhKeyDeriveParams extends Algorithm {
+ public: CryptoKey;
+}
+
+interface AesCtrParams extends Algorithm {
+ counter: BufferSource;
+ length: number;
+}
+
+interface AesKeyAlgorithm extends KeyAlgorithm {
+ length: number;
+}
+
+interface AesKeyGenParams extends Algorithm {
+ length: number;
+}
+
+interface AesDerivedKeyParams extends Algorithm {
+ length: number;
+}
+
+interface AesCbcParams extends Algorithm {
+ iv: BufferSource;
+}
+
+interface AesCmacParams extends Algorithm {
+ length: number;
+}
+
+interface AesGcmParams extends Algorithm {
+ iv: BufferSource;
+ additionalData?: BufferSource;
+ tagLength?: number;
+}
+
+interface AesCfbParams extends Algorithm {
+ iv: BufferSource;
+}
+
+interface HmacImportParams extends Algorithm {
+ hash?: AlgorithmIdentifier;
+ length?: number;
+}
+
+interface HmacKeyAlgorithm extends KeyAlgorithm {
+ hash: AlgorithmIdentifier;
+ length: number;
+}
+
+interface HmacKeyGenParams extends Algorithm {
+ hash: AlgorithmIdentifier;
+ length?: number;
+}
+
+interface DhKeyGenParams extends Algorithm {
+ prime: Uint8Array;
+ generator: Uint8Array;
+}
+
+interface DhKeyAlgorithm extends KeyAlgorithm {
+ prime: Uint8Array;
+ generator: Uint8Array;
+}
+
+interface DhKeyDeriveParams extends Algorithm {
+ public: CryptoKey;
+}
+
+interface DhImportKeyParams extends Algorithm {
+ prime: Uint8Array;
+ generator: Uint8Array;
+}
+
+interface ConcatParams extends Algorithm {
+ hash?: AlgorithmIdentifier;
+ algorithmId: Uint8Array;
+ partyUInfo: Uint8Array;
+ partyVInfo: Uint8Array;
+ publicInfo?: Uint8Array;
+ privateInfo?: Uint8Array;
+}
+
+interface HkdfCtrParams extends Algorithm {
+ hash: AlgorithmIdentifier;
+ label: BufferSource;
+ context: BufferSource;
+}
+
+interface Pbkdf2Params extends Algorithm {
+ salt: BufferSource;
+ iterations: number;
+ hash: AlgorithmIdentifier;
+}
+
+interface RsaOtherPrimesInfo {
+ r: string;
+ d: string;
+ t: string;
+}
+
+interface JsonWebKey {
+ kty: string;
+ use?: string;
+ key_ops?: string[];
+ alg?: string;
+ kid?: string;
+ x5u?: string;
+ x5c?: string;
+ x5t?: string;
+ ext?: boolean;
+ crv?: string;
+ x?: string;
+ y?: string;
+ d?: string;
+ n?: string;
+ e?: string;
+ p?: string;
+ q?: string;
+ dp?: string;
+ dq?: string;
+ qi?: string;
+ oth?: RsaOtherPrimesInfo[];
+ k?: string;
+}
+
+interface ParentNode {
+ readonly children: HTMLCollection;
+ readonly firstElementChild: Element;
+ readonly lastElementChild: Element;
+ readonly childElementCount: number;
}
declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject;
@@ -18040,15 +20016,23 @@ interface DecodeSuccessCallback {
(decodedData: AudioBuffer): void;
}
interface DecodeErrorCallback {
- (): void;
+ (error: DOMException): void;
}
interface FunctionStringCallback {
(data: string): void;
}
+interface NavigatorUserMediaSuccessCallback {
+ (stream: MediaStream): void;
+}
+interface NavigatorUserMediaErrorCallback {
+ (error: MediaStreamError): void;
+}
+interface ForEachCallback {
+ (keyId: any, status: string): void;
+}
declare var Audio: {new(src?: string): HTMLAudioElement; };
declare var Image: {new(width?: number, height?: number): HTMLImageElement; };
declare var Option: {new(text?: string, value?: string, defaultSelected?: boolean, selected?: boolean): HTMLOptionElement; };
-declare var animationStartTime: number;
declare var applicationCache: ApplicationCache;
declare var clientInformation: Navigator;
declare var closed: boolean;
@@ -18068,100 +20052,102 @@ declare var length: number;
declare var location: Location;
declare var locationbar: BarProp;
declare var menubar: BarProp;
-declare var msAnimationStartTime: number;
-declare var name: string;
+declare var msCredentials: MSCredentials;
+declare const name: never;
declare var navigator: Navigator;
declare var offscreenBuffering: string | boolean;
-declare var onabort: (ev: Event) => any;
-declare var onafterprint: (ev: Event) => any;
-declare var onbeforeprint: (ev: Event) => any;
-declare var onbeforeunload: (ev: BeforeUnloadEvent) => any;
-declare var onblur: (ev: FocusEvent) => any;
-declare var oncanplay: (ev: Event) => any;
-declare var oncanplaythrough: (ev: Event) => any;
-declare var onchange: (ev: Event) => any;
-declare var onclick: (ev: MouseEvent) => any;
-declare var oncompassneedscalibration: (ev: Event) => any;
-declare var oncontextmenu: (ev: PointerEvent) => any;
-declare var ondblclick: (ev: MouseEvent) => any;
-declare var ondevicemotion: (ev: DeviceMotionEvent) => any;
-declare var ondeviceorientation: (ev: DeviceOrientationEvent) => any;
-declare var ondrag: (ev: DragEvent) => any;
-declare var ondragend: (ev: DragEvent) => any;
-declare var ondragenter: (ev: DragEvent) => any;
-declare var ondragleave: (ev: DragEvent) => any;
-declare var ondragover: (ev: DragEvent) => any;
-declare var ondragstart: (ev: DragEvent) => any;
-declare var ondrop: (ev: DragEvent) => any;
-declare var ondurationchange: (ev: Event) => any;
-declare var onemptied: (ev: Event) => any;
-declare var onended: (ev: Event) => any;
+declare var onabort: (this: Window, ev: UIEvent) => any;
+declare var onafterprint: (this: Window, ev: Event) => any;
+declare var onbeforeprint: (this: Window, ev: Event) => any;
+declare var onbeforeunload: (this: Window, ev: BeforeUnloadEvent) => any;
+declare var onblur: (this: Window, ev: FocusEvent) => any;
+declare var oncanplay: (this: Window, ev: Event) => any;
+declare var oncanplaythrough: (this: Window, ev: Event) => any;
+declare var onchange: (this: Window, ev: Event) => any;
+declare var onclick: (this: Window, ev: MouseEvent) => any;
+declare var oncompassneedscalibration: (this: Window, ev: Event) => any;
+declare var oncontextmenu: (this: Window, ev: PointerEvent) => any;
+declare var ondblclick: (this: Window, ev: MouseEvent) => any;
+declare var ondevicelight: (this: Window, ev: DeviceLightEvent) => any;
+declare var ondevicemotion: (this: Window, ev: DeviceMotionEvent) => any;
+declare var ondeviceorientation: (this: Window, ev: DeviceOrientationEvent) => any;
+declare var ondrag: (this: Window, ev: DragEvent) => any;
+declare var ondragend: (this: Window, ev: DragEvent) => any;
+declare var ondragenter: (this: Window, ev: DragEvent) => any;
+declare var ondragleave: (this: Window, ev: DragEvent) => any;
+declare var ondragover: (this: Window, ev: DragEvent) => any;
+declare var ondragstart: (this: Window, ev: DragEvent) => any;
+declare var ondrop: (this: Window, ev: DragEvent) => any;
+declare var ondurationchange: (this: Window, ev: Event) => any;
+declare var onemptied: (this: Window, ev: Event) => any;
+declare var onended: (this: Window, ev: MediaStreamErrorEvent) => any;
declare var onerror: ErrorEventHandler;
-declare var onfocus: (ev: FocusEvent) => any;
-declare var onhashchange: (ev: HashChangeEvent) => any;
-declare var oninput: (ev: Event) => any;
-declare var onkeydown: (ev: KeyboardEvent) => any;
-declare var onkeypress: (ev: KeyboardEvent) => any;
-declare var onkeyup: (ev: KeyboardEvent) => any;
-declare var onload: (ev: Event) => any;
-declare var onloadeddata: (ev: Event) => any;
-declare var onloadedmetadata: (ev: Event) => any;
-declare var onloadstart: (ev: Event) => any;
-declare var onmessage: (ev: MessageEvent) => any;
-declare var onmousedown: (ev: MouseEvent) => any;
-declare var onmouseenter: (ev: MouseEvent) => any;
-declare var onmouseleave: (ev: MouseEvent) => any;
-declare var onmousemove: (ev: MouseEvent) => any;
-declare var onmouseout: (ev: MouseEvent) => any;
-declare var onmouseover: (ev: MouseEvent) => any;
-declare var onmouseup: (ev: MouseEvent) => any;
-declare var onmousewheel: (ev: MouseWheelEvent) => any;
-declare var onmsgesturechange: (ev: MSGestureEvent) => any;
-declare var onmsgesturedoubletap: (ev: MSGestureEvent) => any;
-declare var onmsgestureend: (ev: MSGestureEvent) => any;
-declare var onmsgesturehold: (ev: MSGestureEvent) => any;
-declare var onmsgesturestart: (ev: MSGestureEvent) => any;
-declare var onmsgesturetap: (ev: MSGestureEvent) => any;
-declare var onmsinertiastart: (ev: MSGestureEvent) => any;
-declare var onmspointercancel: (ev: MSPointerEvent) => any;
-declare var onmspointerdown: (ev: MSPointerEvent) => any;
-declare var onmspointerenter: (ev: MSPointerEvent) => any;
-declare var onmspointerleave: (ev: MSPointerEvent) => any;
-declare var onmspointermove: (ev: MSPointerEvent) => any;
-declare var onmspointerout: (ev: MSPointerEvent) => any;
-declare var onmspointerover: (ev: MSPointerEvent) => any;
-declare var onmspointerup: (ev: MSPointerEvent) => any;
-declare var onoffline: (ev: Event) => any;
-declare var ononline: (ev: Event) => any;
-declare var onorientationchange: (ev: Event) => any;
-declare var onpagehide: (ev: PageTransitionEvent) => any;
-declare var onpageshow: (ev: PageTransitionEvent) => any;
-declare var onpause: (ev: Event) => any;
-declare var onplay: (ev: Event) => any;
-declare var onplaying: (ev: Event) => any;
-declare var onpopstate: (ev: PopStateEvent) => any;
-declare var onprogress: (ev: ProgressEvent) => any;
-declare var onratechange: (ev: Event) => any;
-declare var onreadystatechange: (ev: ProgressEvent) => any;
-declare var onreset: (ev: Event) => any;
-declare var onresize: (ev: UIEvent) => any;
-declare var onscroll: (ev: UIEvent) => any;
-declare var onseeked: (ev: Event) => any;
-declare var onseeking: (ev: Event) => any;
-declare var onselect: (ev: UIEvent) => any;
-declare var onstalled: (ev: Event) => any;
-declare var onstorage: (ev: StorageEvent) => any;
-declare var onsubmit: (ev: Event) => any;
-declare var onsuspend: (ev: Event) => any;
-declare var ontimeupdate: (ev: Event) => any;
-declare var ontouchcancel: any;
-declare var ontouchend: any;
-declare var ontouchmove: any;
-declare var ontouchstart: any;
-declare var onunload: (ev: Event) => any;
-declare var onvolumechange: (ev: Event) => any;
-declare var onwaiting: (ev: Event) => any;
-declare var opener: Window;
+declare var onfocus: (this: Window, ev: FocusEvent) => any;
+declare var onhashchange: (this: Window, ev: HashChangeEvent) => any;
+declare var oninput: (this: Window, ev: Event) => any;
+declare var oninvalid: (this: Window, ev: Event) => any;
+declare var onkeydown: (this: Window, ev: KeyboardEvent) => any;
+declare var onkeypress: (this: Window, ev: KeyboardEvent) => any;
+declare var onkeyup: (this: Window, ev: KeyboardEvent) => any;
+declare var onload: (this: Window, ev: Event) => any;
+declare var onloadeddata: (this: Window, ev: Event) => any;
+declare var onloadedmetadata: (this: Window, ev: Event) => any;
+declare var onloadstart: (this: Window, ev: Event) => any;
+declare var onmessage: (this: Window, ev: MessageEvent) => any;
+declare var onmousedown: (this: Window, ev: MouseEvent) => any;
+declare var onmouseenter: (this: Window, ev: MouseEvent) => any;
+declare var onmouseleave: (this: Window, ev: MouseEvent) => any;
+declare var onmousemove: (this: Window, ev: MouseEvent) => any;
+declare var onmouseout: (this: Window, ev: MouseEvent) => any;
+declare var onmouseover: (this: Window, ev: MouseEvent) => any;
+declare var onmouseup: (this: Window, ev: MouseEvent) => any;
+declare var onmousewheel: (this: Window, ev: WheelEvent) => any;
+declare var onmsgesturechange: (this: Window, ev: MSGestureEvent) => any;
+declare var onmsgesturedoubletap: (this: Window, ev: MSGestureEvent) => any;
+declare var onmsgestureend: (this: Window, ev: MSGestureEvent) => any;
+declare var onmsgesturehold: (this: Window, ev: MSGestureEvent) => any;
+declare var onmsgesturestart: (this: Window, ev: MSGestureEvent) => any;
+declare var onmsgesturetap: (this: Window, ev: MSGestureEvent) => any;
+declare var onmsinertiastart: (this: Window, ev: MSGestureEvent) => any;
+declare var onmspointercancel: (this: Window, ev: MSPointerEvent) => any;
+declare var onmspointerdown: (this: Window, ev: MSPointerEvent) => any;
+declare var onmspointerenter: (this: Window, ev: MSPointerEvent) => any;
+declare var onmspointerleave: (this: Window, ev: MSPointerEvent) => any;
+declare var onmspointermove: (this: Window, ev: MSPointerEvent) => any;
+declare var onmspointerout: (this: Window, ev: MSPointerEvent) => any;
+declare var onmspointerover: (this: Window, ev: MSPointerEvent) => any;
+declare var onmspointerup: (this: Window, ev: MSPointerEvent) => any;
+declare var onoffline: (this: Window, ev: Event) => any;
+declare var ononline: (this: Window, ev: Event) => any;
+declare var onorientationchange: (this: Window, ev: Event) => any;
+declare var onpagehide: (this: Window, ev: PageTransitionEvent) => any;
+declare var onpageshow: (this: Window, ev: PageTransitionEvent) => any;
+declare var onpause: (this: Window, ev: Event) => any;
+declare var onplay: (this: Window, ev: Event) => any;
+declare var onplaying: (this: Window, ev: Event) => any;
+declare var onpopstate: (this: Window, ev: PopStateEvent) => any;
+declare var onprogress: (this: Window, ev: ProgressEvent) => any;
+declare var onratechange: (this: Window, ev: Event) => any;
+declare var onreadystatechange: (this: Window, ev: ProgressEvent) => any;
+declare var onreset: (this: Window, ev: Event) => any;
+declare var onresize: (this: Window, ev: UIEvent) => any;
+declare var onscroll: (this: Window, ev: UIEvent) => any;
+declare var onseeked: (this: Window, ev: Event) => any;
+declare var onseeking: (this: Window, ev: Event) => any;
+declare var onselect: (this: Window, ev: UIEvent) => any;
+declare var onstalled: (this: Window, ev: Event) => any;
+declare var onstorage: (this: Window, ev: StorageEvent) => any;
+declare var onsubmit: (this: Window, ev: Event) => any;
+declare var onsuspend: (this: Window, ev: Event) => any;
+declare var ontimeupdate: (this: Window, ev: Event) => any;
+declare var ontouchcancel: (ev: TouchEvent) => any;
+declare var ontouchend: (ev: TouchEvent) => any;
+declare var ontouchmove: (ev: TouchEvent) => any;
+declare var ontouchstart: (ev: TouchEvent) => any;
+declare var onunload: (this: Window, ev: Event) => any;
+declare var onvolumechange: (this: Window, ev: Event) => any;
+declare var onwaiting: (this: Window, ev: Event) => any;
+declare var opener: any;
declare var orientation: string | number;
declare var outerHeight: number;
declare var outerWidth: number;
@@ -18185,7 +20171,6 @@ declare var styleMedia: StyleMedia;
declare var toolbar: BarProp;
declare var top: Window;
declare var window: Window;
-declare var URL: URL;
declare function alert(message?: any): void;
declare function blur(): void;
declare function cancelAnimationFrame(handle: number): void;
@@ -18199,14 +20184,11 @@ declare function getSelection(): Selection;
declare function matchMedia(mediaQuery: string): MediaQueryList;
declare function moveBy(x?: number, y?: number): void;
declare function moveTo(x?: number, y?: number): void;
-declare function msCancelRequestAnimationFrame(handle: number): void;
-declare function msMatchMedia(mediaQuery: string): MediaQueryList;
-declare function msRequestAnimationFrame(callback: FrameRequestCallback): number;
declare function msWriteProfilerMark(profilerMarkName: string): void;
-declare function open(url?: string, target?: string, features?: string, replace?: boolean): any;
-declare function postMessage(message: any, targetOrigin: string, ports?: any): void;
+declare function open(url?: string, target?: string, features?: string, replace?: boolean): Window;
+declare function postMessage(message: any, targetOrigin: string, transfer?: any[]): void;
declare function print(): void;
-declare function prompt(message?: string, _default?: string): string;
+declare function prompt(message?: string, _default?: string): string | null;
declare function releaseEvents(): void;
declare function requestAnimationFrame(callback: FrameRequestCallback): number;
declare function resizeBy(x?: number, y?: number): void;
@@ -18214,141 +20196,173 @@ declare function resizeTo(x?: number, y?: number): void;
declare function scroll(x?: number, y?: number): void;
declare function scrollBy(x?: number, y?: number): void;
declare function scrollTo(x?: number, y?: number): void;
+declare function webkitCancelAnimationFrame(handle: number): void;
declare function webkitConvertPointFromNodeToPage(node: Node, pt: WebKitPoint): WebKitPoint;
declare function webkitConvertPointFromPageToNode(node: Node, pt: WebKitPoint): WebKitPoint;
+declare function webkitRequestAnimationFrame(callback: FrameRequestCallback): number;
+declare function scroll(options?: ScrollToOptions): void;
+declare function scrollTo(options?: ScrollToOptions): void;
+declare function scrollBy(options?: ScrollToOptions): void;
declare function toString(): string;
-declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+declare function addEventListener(type: string, listener?: EventListenerOrEventListenerObject, useCapture?: boolean): void;
declare function dispatchEvent(evt: Event): boolean;
-declare function removeEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+declare function removeEventListener(type: string, listener?: EventListenerOrEventListenerObject, useCapture?: boolean): void;
declare function clearInterval(handle: number): void;
declare function clearTimeout(handle: number): void;
+declare function setInterval(handler: (...args: any[]) => void, timeout: number): number;
declare function setInterval(handler: any, timeout?: any, ...args: any[]): number;
+declare function setTimeout(handler: (...args: any[]) => void, timeout: number): number;
declare function setTimeout(handler: any, timeout?: any, ...args: any[]): number;
declare function clearImmediate(handle: number): void;
-declare function msClearImmediate(handle: number): void;
-declare function msSetImmediate(expression: any, ...args: any[]): number;
-declare function setImmediate(expression: any, ...args: any[]): number;
+declare function setImmediate(handler: (...args: any[]) => void): number;
+declare function setImmediate(handler: any, ...args: any[]): number;
declare var sessionStorage: Storage;
declare var localStorage: Storage;
declare var console: Console;
-declare var onpointercancel: (ev: PointerEvent) => any;
-declare var onpointerdown: (ev: PointerEvent) => any;
-declare var onpointerenter: (ev: PointerEvent) => any;
-declare var onpointerleave: (ev: PointerEvent) => any;
-declare var onpointermove: (ev: PointerEvent) => any;
-declare var onpointerout: (ev: PointerEvent) => any;
-declare var onpointerover: (ev: PointerEvent) => any;
-declare var onpointerup: (ev: PointerEvent) => any;
-declare var onwheel: (ev: WheelEvent) => any;
+declare var onpointercancel: (this: Window, ev: PointerEvent) => any;
+declare var onpointerdown: (this: Window, ev: PointerEvent) => any;
+declare var onpointerenter: (this: Window, ev: PointerEvent) => any;
+declare var onpointerleave: (this: Window, ev: PointerEvent) => any;
+declare var onpointermove: (this: Window, ev: PointerEvent) => any;
+declare var onpointerout: (this: Window, ev: PointerEvent) => any;
+declare var onpointerover: (this: Window, ev: PointerEvent) => any;
+declare var onpointerup: (this: Window, ev: PointerEvent) => any;
+declare var onwheel: (this: Window, ev: WheelEvent) => any;
declare var indexedDB: IDBFactory;
-declare var msIndexedDB: IDBFactory;
declare function atob(encodedString: string): string;
declare function btoa(rawString: string): string;
-declare function addEventListener(type: "MSGestureChange", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "MSGestureDoubleTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "MSGestureEnd", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "MSGestureHold", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "MSGestureStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "MSGestureTap", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "MSInertiaStart", listener: (ev: MSGestureEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "MSPointerCancel", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "MSPointerDown", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "MSPointerEnter", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "MSPointerLeave", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "MSPointerMove", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "MSPointerOut", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "MSPointerOver", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "MSPointerUp", listener: (ev: MSPointerEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "abort", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "afterprint", listener: (ev: Event) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "beforeprint", listener: (ev: Event) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "beforeunload", listener: (ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "blur", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "canplay", listener: (ev: Event) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "canplaythrough", listener: (ev: Event) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "change", listener: (ev: Event) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "click", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "compassneedscalibration", listener: (ev: Event) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "contextmenu", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "dblclick", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "devicemotion", listener: (ev: DeviceMotionEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "deviceorientation", listener: (ev: DeviceOrientationEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "drag", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "dragend", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "dragenter", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "dragleave", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "dragover", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "dragstart", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "drop", listener: (ev: DragEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "durationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "emptied", listener: (ev: Event) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "ended", listener: (ev: Event) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "focus", listener: (ev: FocusEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "hashchange", listener: (ev: HashChangeEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "input", listener: (ev: Event) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "keydown", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "keypress", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "keyup", listener: (ev: KeyboardEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "load", listener: (ev: Event) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "loadeddata", listener: (ev: Event) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "loadedmetadata", listener: (ev: Event) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "loadstart", listener: (ev: Event) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "message", listener: (ev: MessageEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "mousedown", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "mouseenter", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "mouseleave", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "mousemove", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "mouseout", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "mouseover", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "mouseup", listener: (ev: MouseEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "mousewheel", listener: (ev: MouseWheelEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "offline", listener: (ev: Event) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "online", listener: (ev: Event) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "orientationchange", listener: (ev: Event) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "pagehide", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "pageshow", listener: (ev: PageTransitionEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "pause", listener: (ev: Event) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "play", listener: (ev: Event) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "playing", listener: (ev: Event) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "pointercancel", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "pointerdown", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "pointerenter", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "pointerleave", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "pointermove", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "pointerout", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "pointerover", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "pointerup", listener: (ev: PointerEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "popstate", listener: (ev: PopStateEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "progress", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "ratechange", listener: (ev: Event) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "readystatechange", listener: (ev: ProgressEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "reset", listener: (ev: Event) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "resize", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "scroll", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "seeked", listener: (ev: Event) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "seeking", listener: (ev: Event) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "select", listener: (ev: UIEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "stalled", listener: (ev: Event) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "storage", listener: (ev: StorageEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "submit", listener: (ev: Event) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "suspend", listener: (ev: Event) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "timeupdate", listener: (ev: Event) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "unload", listener: (ev: Event) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "volumechange", listener: (ev: Event) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "waiting", listener: (ev: Event) => any, useCapture?: boolean): void;
-declare function addEventListener(type: "wheel", listener: (ev: WheelEvent) => any, useCapture?: boolean): void;
-declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;interface DOMTokenList {
- [Symbol.iterator](): IterableIterator<string>;
-}
-
-interface NodeList {
- [Symbol.iterator](): IterableIterator<Node>
-}
-
-interface NodeListOf<TNode extends Node> {
- [Symbol.iterator](): IterableIterator<TNode>
-}
-
+declare function addEventListener(type: "MSGestureChange", listener: (this: Window, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "MSGestureDoubleTap", listener: (this: Window, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "MSGestureEnd", listener: (this: Window, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "MSGestureHold", listener: (this: Window, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "MSGestureStart", listener: (this: Window, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "MSGestureTap", listener: (this: Window, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "MSInertiaStart", listener: (this: Window, ev: MSGestureEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "MSPointerCancel", listener: (this: Window, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "MSPointerDown", listener: (this: Window, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "MSPointerEnter", listener: (this: Window, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "MSPointerLeave", listener: (this: Window, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "MSPointerMove", listener: (this: Window, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "MSPointerOut", listener: (this: Window, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "MSPointerOver", listener: (this: Window, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "MSPointerUp", listener: (this: Window, ev: MSPointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "abort", listener: (this: Window, ev: UIEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "afterprint", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "beforeprint", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "beforeunload", listener: (this: Window, ev: BeforeUnloadEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "blur", listener: (this: Window, ev: FocusEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "canplay", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "canplaythrough", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "change", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "click", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "compassneedscalibration", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "contextmenu", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "dblclick", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "devicelight", listener: (this: Window, ev: DeviceLightEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "devicemotion", listener: (this: Window, ev: DeviceMotionEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "deviceorientation", listener: (this: Window, ev: DeviceOrientationEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "drag", listener: (this: Window, ev: DragEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "dragend", listener: (this: Window, ev: DragEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "dragenter", listener: (this: Window, ev: DragEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "dragleave", listener: (this: Window, ev: DragEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "dragover", listener: (this: Window, ev: DragEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "dragstart", listener: (this: Window, ev: DragEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "drop", listener: (this: Window, ev: DragEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "durationchange", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "emptied", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "ended", listener: (this: Window, ev: MediaStreamErrorEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "focus", listener: (this: Window, ev: FocusEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "hashchange", listener: (this: Window, ev: HashChangeEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "input", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "invalid", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "keydown", listener: (this: Window, ev: KeyboardEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "keypress", listener: (this: Window, ev: KeyboardEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "keyup", listener: (this: Window, ev: KeyboardEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "load", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "loadeddata", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "loadedmetadata", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "loadstart", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "message", listener: (this: Window, ev: MessageEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "mousedown", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "mouseenter", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "mouseleave", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "mousemove", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "mouseout", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "mouseover", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "mouseup", listener: (this: Window, ev: MouseEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "mousewheel", listener: (this: Window, ev: WheelEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "offline", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "online", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "orientationchange", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "pagehide", listener: (this: Window, ev: PageTransitionEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "pageshow", listener: (this: Window, ev: PageTransitionEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "pause", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "play", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "playing", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "pointercancel", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "pointerdown", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "pointerenter", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "pointerleave", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "pointermove", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "pointerout", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "pointerover", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "pointerup", listener: (this: Window, ev: PointerEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "popstate", listener: (this: Window, ev: PopStateEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "progress", listener: (this: Window, ev: ProgressEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "ratechange", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "readystatechange", listener: (this: Window, ev: ProgressEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "reset", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "resize", listener: (this: Window, ev: UIEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "scroll", listener: (this: Window, ev: UIEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "seeked", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "seeking", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "select", listener: (this: Window, ev: UIEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "stalled", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "storage", listener: (this: Window, ev: StorageEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "submit", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "suspend", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "timeupdate", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "unload", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "volumechange", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "waiting", listener: (this: Window, ev: Event) => any, useCapture?: boolean): void;
+declare function addEventListener(type: "wheel", listener: (this: Window, ev: WheelEvent) => any, useCapture?: boolean): void;
+declare function addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void;
+type AAGUID = string;
+type AlgorithmIdentifier = string | Algorithm;
+type ConstrainBoolean = boolean | ConstrainBooleanParameters;
+type ConstrainDOMString = string | string[] | ConstrainDOMStringParameters;
+type ConstrainDouble = number | ConstrainDoubleRange;
+type ConstrainLong = number | ConstrainLongRange;
+type CryptoOperationData = ArrayBufferView;
+type GLbitfield = number;
+type GLboolean = boolean;
+type GLbyte = number;
+type GLclampf = number;
+type GLenum = number;
+type GLfloat = number;
+type GLint = number;
+type GLintptr = number;
+type GLshort = number;
+type GLsizei = number;
+type GLsizeiptr = number;
+type GLubyte = number;
+type GLuint = number;
+type GLushort = number;
+type IDBKeyPath = string;
+type KeyFormat = string;
+type KeyType = string;
+type KeyUsage = string;
+type MSInboundPayload = MSVideoRecvPayload | MSAudioRecvPayload;
+type MSLocalClientEvent = MSLocalClientEventBase | MSAudioLocalClientEvent;
+type MSOutboundPayload = MSVideoSendPayload | MSAudioSendPayload;
+type RTCIceGatherCandidate = RTCIceCandidate | RTCIceCandidateComplete;
+type RTCTransport = RTCDtlsTransport | RTCSrtpSdesTransport;
+type payloadtype = number;
+type ScrollBehavior = "auto" | "instant" | "smooth";
+type ScrollLogicalPosition = "start" | "center" | "end" | "nearest";
+type IDBValidKey = number | string | Date | IDBArrayKey;
+type BufferSource = ArrayBuffer | ArrayBufferView;
+type MouseWheelEvent = WheelEvent;
/////////////////////////////
/// WorkerGlobalScope APIs
/////////////////////////////
@@ -18632,3 +20646,29 @@ interface VBArrayConstructor {
}
declare var VBArray: VBArrayConstructor;
+
+/**
+ * Automation date (VT_DATE)
+ */
+interface VarDate { }
+
+interface DateConstructor {
+ new (vd: VarDate): Date;
+}
+
+interface Date {
+ getVarDate: () => VarDate;
+}
+/// <reference path="lib.dom.generated.d.ts" />
+
+interface DOMTokenList {
+ [Symbol.iterator](): IterableIterator<string>;
+}
+
+interface NodeList {
+ [Symbol.iterator](): IterableIterator<Node>
+}
+
+interface NodeListOf<TNode extends Node> {
+ [Symbol.iterator](): IterableIterator<TNode>
+}
diff --git a/lib/decl/systemjs/systemjs.d.ts b/lib/decl/systemjs/systemjs.d.ts
index 1d826aebb..4d84b399c 100644
--- a/lib/decl/systemjs/systemjs.d.ts
+++ b/lib/decl/systemjs/systemjs.d.ts
@@ -9,7 +9,7 @@ interface System {
config: any;
newModule(obj: Object): any;
normalizeSync(name: string): string;
- set(moduleName: string, module: any)
+ set(moduleName: string, module: any): void;
}
diff --git a/lib/decl/webrtc/MediaStream.d.ts b/lib/decl/webrtc/MediaStream.d.ts
deleted file mode 100644
index a2306b621..000000000
--- a/lib/decl/webrtc/MediaStream.d.ts
+++ /dev/null
@@ -1,199 +0,0 @@
-// Type definitions for WebRTC
-// Project: http://dev.w3.org/2011/webrtc/
-// Definitions by: Ken Smith <https://github.com/smithkl42/>
-// Definitions: https://github.com/borisyankov/DefinitelyTyped
-
-// Taken from http://dev.w3.org/2011/webrtc/editor/getusermedia.html
-// version: W3C Editor's Draft 29 June 2015
-
-interface ConstrainBooleanParameters {
- exact?: boolean;
- ideal?: boolean;
-}
-
-interface NumberRange {
- max?: number;
- min?: number;
-}
-
-interface ConstrainNumberRange extends NumberRange {
- exact?: number;
- ideal?: number;
-}
-
-interface ConstrainStringParameters {
- exact?: string | string[];
- ideal?: string | string[];
-}
-
-interface MediaStreamConstraints {
- video?: boolean | MediaTrackConstraints;
- audio?: boolean | MediaTrackConstraints;
-}
-
-declare module W3C {
- type LongRange = NumberRange;
- type DoubleRange = NumberRange;
- type ConstrainBoolean = boolean | ConstrainBooleanParameters;
- type ConstrainNumber = number | ConstrainNumberRange;
- type ConstrainLong = ConstrainNumber;
- type ConstrainDouble = ConstrainNumber;
- type ConstrainString = string | string[] | ConstrainStringParameters;
-}
-
-interface MediaTrackConstraints extends MediaTrackConstraintSet {
- advanced?: MediaTrackConstraintSet[];
-}
-
-interface MediaTrackConstraintSet {
- width?: W3C.ConstrainLong;
- height?: W3C.ConstrainLong;
- aspectRatio?: W3C.ConstrainDouble;
- frameRate?: W3C.ConstrainDouble;
- facingMode?: W3C.ConstrainString;
- volume?: W3C.ConstrainDouble;
- sampleRate?: W3C.ConstrainLong;
- sampleSize?: W3C.ConstrainLong;
- echoCancellation?: W3C.ConstrainBoolean;
- latency?: W3C.ConstrainDouble;
- deviceId?: W3C.ConstrainString;
- groupId?: W3C.ConstrainString;
-}
-
-interface MediaTrackSupportedConstraints {
- width?: boolean;
- height?: boolean;
- aspectRatio?: boolean;
- frameRate?: boolean;
- facingMode?: boolean;
- volume?: boolean;
- sampleRate?: boolean;
- sampleSize?: boolean;
- echoCancellation?: boolean;
- latency?: boolean;
- deviceId?: boolean;
- groupId?: boolean;
-}
-
-interface MediaStream extends EventTarget {
- id: string;
- active: boolean;
-
- onactive: EventListener;
- oninactive: EventListener;
- onaddtrack: (event: MediaStreamTrackEvent) => any;
- onremovetrack: (event: MediaStreamTrackEvent) => any;
-
- clone(): MediaStream;
- stop(): void;
-
- getAudioTracks(): MediaStreamTrack[];
- getVideoTracks(): MediaStreamTrack[];
- getTracks(): MediaStreamTrack[];
-
- getTrackById(trackId: string): MediaStreamTrack;
-
- addTrack(track: MediaStreamTrack): void;
- removeTrack(track: MediaStreamTrack): void;
-}
-
-interface MediaStreamTrackEvent extends Event {
- track: MediaStreamTrack;
-}
-
-declare enum MediaStreamTrackState {
- "live",
- "ended"
-}
-
-interface MediaStreamTrack extends EventTarget {
- id: string;
- kind: string;
- label: string;
- enabled: boolean;
- muted: boolean;
- remote: boolean;
- readyState: MediaStreamTrackState;
-
- onmute: EventListener;
- onunmute: EventListener;
- onended: EventListener;
- onoverconstrained: EventListener;
-
- clone(): MediaStreamTrack;
-
- stop(): void;
-
- getCapabilities(): MediaTrackCapabilities;
- getConstraints(): MediaTrackConstraints;
- getSettings(): MediaTrackSettings;
- applyConstraints(constraints: MediaTrackConstraints): Promise<void>;
-}
-
-interface MediaTrackCapabilities {
- width: number | W3C.LongRange;
- height: number | W3C.LongRange;
- aspectRatio: number | W3C.DoubleRange;
- frameRate: number | W3C.DoubleRange;
- facingMode: string;
- volume: number | W3C.DoubleRange;
- sampleRate: number | W3C.LongRange;
- sampleSize: number | W3C.LongRange;
- echoCancellation: boolean[];
- latency: number | W3C.DoubleRange;
- deviceId: string;
- groupId: string;
-}
-
-interface MediaTrackSettings {
- width: number;
- height: number;
- aspectRatio: number;
- frameRate: number;
- facingMode: string;
- volume: number;
- sampleRate: number;
- sampleSize: number;
- echoCancellation: boolean;
- latency: number;
- deviceId: string;
- groupId: string;
-}
-
-interface MediaStreamError {
- name: string;
- message: string;
- constraintName: string;
-}
-
-interface NavigatorGetUserMedia {
- (constraints: MediaStreamConstraints,
- successCallback: (stream: MediaStream) => void,
- errorCallback: (error: MediaStreamError) => void): void;
-}
-
-interface Navigator {
- getUserMedia: NavigatorGetUserMedia;
-
- webkitGetUserMedia: NavigatorGetUserMedia;
-
- mozGetUserMedia: NavigatorGetUserMedia;
-
- msGetUserMedia: NavigatorGetUserMedia;
-
- mediaDevices: MediaDevices;
-}
-
-interface MediaDevices {
- getSupportedConstraints(): MediaTrackSupportedConstraints;
-
- getUserMedia(constraints: MediaStreamConstraints): Promise<MediaStream>;
- enumerateDevices(): Promise<MediaDeviceInfo[]>;
-}
-
-interface MediaDeviceInfo {
- label: string;
- id: string;
- kind: string;
- facing: string;
-}
diff --git a/lib/emscripten/emsc.d.ts b/lib/emscripten/emsc.d.ts
index c313f240d..19a6990e5 100644
--- a/lib/emscripten/emsc.d.ts
+++ b/lib/emscripten/emsc.d.ts
@@ -33,7 +33,7 @@ export interface EmscFunGen {
export declare namespace Module {
var cwrap: EmscFunGen;
- function _free(ptr: number);
+ function _free(ptr: number): void;
function _malloc(n: number): number;
@@ -41,9 +41,10 @@ export declare namespace Module {
function getValue(ptr: number, type: string, noSafe?: boolean): number;
- function setValue(ptr: number, value: number, type: string, noSafe?: boolean);
+ function setValue(ptr: number, value: number, type: string,
+ noSafe?: boolean): void;
function writeStringToMemory(s: string,
buffer: number,
- dontAddNull?: boolean);
+ dontAddNull?: boolean): void;
} \ No newline at end of file
diff --git a/lib/i18n.ts b/lib/i18n.ts
index bba3e14c6..ce13a3292 100644
--- a/lib/i18n.ts
+++ b/lib/i18n.ts
@@ -24,14 +24,14 @@ document.addEventListener(
declare var i18n: any;
-const JedModule = window["Jed"];
-var jed;
+const JedModule: any = (window as any)["Jed"];
+var jed: any;
class PluralNumber {
n: number;
- constructor(n) {
+ constructor(n: number) {
this.n = n;
}
@@ -62,7 +62,7 @@ function init () {
/** Convert template strings to a msgid */
-function toI18nString(strings) {
+function toI18nString(strings: string[]) {
let str = "";
for (let i = 0; i < strings.length; i++) {
str += strings[i];
@@ -75,7 +75,7 @@ function toI18nString(strings) {
/** Use the first number in values to determine plural form */
-function getPluralValue (values) {
+function getPluralValue (values: any) {
let n = null;
for (let i = 0; i < values.length; i++) {
if ("number" === typeof values[i] || values[i] instanceof PluralNumber) {
@@ -88,11 +88,11 @@ function getPluralValue (values) {
}
-var i18n = <any>function i18n(strings, ...values) {
+var i18n = <any>function i18n(strings: string[], ...values: any[]) {
init();
if ("object" !== typeof jed) {
// Fallback implementation in case i18n lib is not there
- return String.raw(strings, ...values);
+ return String.raw(strings as any, ...values);
}
let str = toI18nString (strings);
@@ -109,11 +109,11 @@ i18n.strings = {};
* Interpolate i18nized values with arbitrary objects.
* @return Array of strings/objects.
*/
-i18n.parts = function(strings, ...values) {
+i18n.parts = function(strings: string[], ...values: any[]) {
init();
if ("object" !== typeof jed) {
// Fallback implementation in case i18n lib is not there
- let parts = [];
+ let parts: string[] = [];
for (let i = 0; i < strings.length; i++) {
parts.push(strings[i]);
@@ -127,7 +127,7 @@ i18n.parts = function(strings, ...values) {
let str = toI18nString (strings);
let n = getPluralValue (values);
let tr = jed.ngettext(str, str, n).split(/%(\d+)\$s/);
- let parts = [];
+ let parts: string[] = [];
for (let i = 0; i < tr.length; i++) {
if (0 == i % 2) {
parts.push(tr[i]);
@@ -144,7 +144,7 @@ i18n.parts = function(strings, ...values) {
* Pluralize based on first numeric parameter in the template.
* @todo The plural argument is used for extraction by pogen.js
*/
-i18n.pluralize = function (singular, plural) {
+i18n.pluralize = function (singular: any, plural: any) {
return singular;
};
@@ -154,4 +154,4 @@ i18n.pluralize = function (singular, plural) {
*/
i18n.number = function (n : number) {
return new PluralNumber (n);
-}
+};
diff --git a/lib/shopApi.ts b/lib/shopApi.ts
new file mode 100644
index 000000000..7cc37a9db
--- /dev/null
+++ b/lib/shopApi.ts
@@ -0,0 +1,169 @@
+/*
+ This file is part of TALER
+ (C) 2015 GNUnet e.V.
+
+ TALER is free software; you can redistribute it and/or modify it under the
+ terms of the GNU General Public License as published by the Free Software
+ Foundation; either version 3, or (at your option) any later version.
+
+ TALER is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along with
+ TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
+ */
+
+
+/**
+ * Implementation of the shop API, either invoked via HTTP or
+ * via a JS DOM Events.
+ *
+ * @author Florian Dold
+ */
+
+
+
+function subst(url: string, H_contract: string) {
+ url = url.replace("${H_contract}", H_contract);
+ url = url.replace("${$}", "$");
+ return url;
+}
+
+export function createReserve(amount: any, callback_url: any, wt_types: any) {
+ let params = {
+ amount: JSON.stringify(amount),
+ callback_url: URI(callback_url)
+ .absoluteTo(document.location.href),
+ bank_url: document.location.href,
+ wt_types: JSON.stringify(wt_types),
+ };
+ let uri = URI(chrome.extension.getURL("pages/confirm-create-reserve.html"));
+ document.location.href = uri.query(params).href();
+}
+
+export function confirmContract(contract_wrapper: any, replace_navigation: any) {
+ if (contract_wrapper) {
+ console.error("contract wrapper missing");
+ return;
+ }
+
+ const offer = contract_wrapper;
+
+ if (!offer.contract) {
+ console.error("contract field missing");
+ return;
+ }
+
+ const msg = {
+ type: "check-repurchase",
+ detail: {
+ contract: offer.contract
+ },
+ };
+
+ chrome.runtime.sendMessage(msg, (resp) => {
+ if (resp.error) {
+ console.error("wallet backend error", resp);
+ return;
+ }
+ if (resp.isRepurchase) {
+ console.log("doing repurchase");
+ console.assert(resp.existingFulfillmentUrl);
+ console.assert(resp.existingContractHash);
+ window.location.href = subst(resp.existingFulfillmentUrl,
+ resp.existingContractHash);
+
+ } else {
+ const uri = URI(chrome.extension.getURL("pages/confirm-contract.html"));
+ const params = {
+ offer: JSON.stringify(offer),
+ merchantPageUrl: document.location.href,
+ };
+ const target = uri.query(params).href();
+ if (replace_navigation === true) {
+ document.location.replace(target);
+ } else {
+ document.location.href = target;
+ }
+ }
+ });
+}
+
+
+/**
+ * Fetch a payment (coin deposit permissions) for a given contract.
+ * If we don't have the payment for the contract, redirect to
+ * offering url instead.
+ */
+export function fetchPayment(H_contract: any, offering_url: any) {
+ const msg = {
+ type: "fetch-payment",
+ detail: {H_contract},
+ };
+
+ chrome.runtime.sendMessage(msg, (resp) => {
+ console.log("got resp");
+ console.dir(resp);
+ if (!resp.success) {
+ if (offering_url) {
+ console.log("offering url", offering_url);
+ window.location.href = offering_url;
+ } else {
+ console.error("fetch-payment failed");
+ }
+ return;
+ }
+ let contract = resp.contract;
+ if (!contract) {
+ throw Error("contract missing");
+ }
+
+ // We have the details for then payment, the merchant page
+ // is responsible to give it to the merchant.
+
+ let evt = new CustomEvent("taler-notify-payment", {
+ detail: {
+ H_contract: H_contract,
+ contract: resp.contract,
+ payment: resp.payReq,
+ }
+ });
+ document.dispatchEvent(evt);
+ });
+}
+
+
+/**
+ * Offer a contract to the wallet after
+ * downloading it from the given URL.
+ */
+function offerContractFrom(url: string) {
+ var contract_request = new XMLHttpRequest();
+ console.log("downloading contract from '" + url + "'");
+ contract_request.open("GET", url, true);
+ contract_request.onload = function (e) {
+ if (contract_request.readyState == 4) {
+ if (contract_request.status == 200) {
+ console.log("response text:",
+ contract_request.responseText);
+ var contract_wrapper = JSON.parse(contract_request.responseText);
+ if (!contract_wrapper) {
+ console.error("response text was invalid json");
+ alert("Failure to download contract (invalid json)");
+ return;
+ }
+ confirmContract(contract_wrapper, true);
+ } else {
+ alert("Failure to download contract from merchant " +
+ "(" + contract_request.status + "):\n" +
+ contract_request.responseText);
+ }
+ }
+ };
+ contract_request.onerror = function (e) {
+ alert("Failure requesting the contract:\n"
+ + contract_request.statusText);
+ };
+ contract_request.send();
+} \ No newline at end of file
diff --git a/lib/vendor/mithril.js b/lib/vendor/mithril.js
index 4b225299e..55bef997f 100644
--- a/lib/vendor/mithril.js
+++ b/lib/vendor/mithril.js
@@ -1,2157 +1,2233 @@
-/*
- The MIT License (MIT)
-
- Copyright (c) 2014 Leo Horie
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-*/
-
-
-;(function (global, factory) { // eslint-disable-line
- "use strict"
- /* eslint-disable no-undef */
- var m = factory(global)
- if (typeof module === "object" && module != null && module.exports) {
- module.exports = m
- } else if (typeof define === "function" && define.amd) {
- define(function () { return m })
- } else {
- global.m = m
- }
- /* eslint-enable no-undef */
-})(typeof window !== "undefined" ? window : {}, function (global, undefined) { // eslint-disable-line
- "use strict"
-
- m.version = function () {
- return "v0.2.2-rc.1"
- }
-
- var hasOwn = {}.hasOwnProperty
- var type = {}.toString
-
- function isFunction(object) {
- return typeof object === "function"
- }
-
- function isObject(object) {
- return type.call(object) === "[object Object]"
- }
-
- function isString(object) {
- return type.call(object) === "[object String]"
- }
-
- var isArray = Array.isArray || function (object) {
- return type.call(object) === "[object Array]"
- }
-
- function noop() {}
-
- /* eslint-disable max-len */
- var voidElements = /^(AREA|BASE|BR|COL|COMMAND|EMBED|HR|IMG|INPUT|KEYGEN|LINK|META|PARAM|SOURCE|TRACK|WBR)$/
- /* eslint-enable max-len */
-
- // caching commonly used variables
- var $document, $location, $requestAnimationFrame, $cancelAnimationFrame
-
- // self invoking function needed because of the way mocks work
- function initialize(mock) {
- $document = mock.document
- $location = mock.location
- $cancelAnimationFrame = mock.cancelAnimationFrame || mock.clearTimeout
- $requestAnimationFrame = mock.requestAnimationFrame || mock.setTimeout
- }
-
- // testing API
- m.deps = function (mock) {
- initialize(global = mock || window)
- return global
- }
-
- m.deps(global)
-
- /**
- * @typedef {String} Tag
- * A string that looks like -> div.classname#id[param=one][param2=two]
- * Which describes a DOM node
- */
-
- function parseTagAttrs(cell, tag) {
- var classes = []
- var parser = /(?:(^|#|\.)([^#\.\[\]]+))|(\[.+?\])/g
- var match
-
- while ((match = parser.exec(tag))) {
- if (match[1] === "" && match[2]) {
- cell.tag = match[2]
- } else if (match[1] === "#") {
- cell.attrs.id = match[2]
- } else if (match[1] === ".") {
- classes.push(match[2])
- } else if (match[3][0] === "[") {
- var pair = /\[(.+?)(?:=("|'|)(.*?)\2)?\]/.exec(match[3])
- cell.attrs[pair[1]] = pair[3] || (pair[2] ? "" : true)
- }
- }
-
- return classes
- }
-
- function getVirtualChildren(args, hasAttrs) {
- var children = hasAttrs ? args.slice(1) : args
-
- if (children.length === 1 && isArray(children[0])) {
- return children[0]
- } else {
- return children
- }
- }
-
- function assignAttrs(target, attrs, classes) {
- var classAttr = "class" in attrs ? "class" : "className"
-
- for (var attrName in attrs) {
- if (hasOwn.call(attrs, attrName)) {
- if (attrName === classAttr &&
- attrs[attrName] != null &&
- attrs[attrName] !== "") {
- classes.push(attrs[attrName])
- // create key in correct iteration order
- target[attrName] = ""
- } else {
- target[attrName] = attrs[attrName]
- }
- }
- }
-
- if (classes.length) target[classAttr] = classes.join(" ")
- }
-
- /**
- *
- * @param {Tag} The DOM node tag
- * @param {Object=[]} optional key-value pairs to be mapped to DOM attrs
- * @param {...mNode=[]} Zero or more Mithril child nodes. Can be an array,
- * or splat (optional)
- */
- function m(tag, pairs) {
- for (var args = [], i = 1; i < arguments.length; i++) {
- args[i - 1] = arguments[i]
- }
-
- if (isObject(tag)) return parameterize(tag, args)
-
- if (!isString(tag)) {
- throw new Error("selector in m(selector, attrs, children) should " +
- "be a string")
- }
-
- var hasAttrs = pairs != null && isObject(pairs) &&
- !("tag" in pairs || "view" in pairs || "subtree" in pairs)
-
- var attrs = hasAttrs ? pairs : {}
- var cell = {
- tag: "div",
- attrs: {},
- children: getVirtualChildren(args, hasAttrs)
- }
-
- assignAttrs(cell.attrs, attrs, parseTagAttrs(cell, tag))
- return cell
- }
-
- function forEach(list, f) {
- for (var i = 0; i < list.length && !f(list[i], i++);) {
- // function called in condition
- }
- }
-
- function forKeys(list, f) {
- forEach(list, function (attrs, i) {
- return (attrs = attrs && attrs.attrs) &&
- attrs.key != null &&
- f(attrs, i)
- })
- }
- // This function was causing deopts in Chrome.
- function dataToString(data) {
- // data.toString() might throw or return null if data is the return
- // value of Console.log in some versions of Firefox (behavior depends on
- // version)
- try {
- if (data != null && data.toString() != null) return data
- } catch (e) {
- // silently ignore errors
- }
- return ""
- }
-
- // This function was causing deopts in Chrome.
- function injectTextNode(parentElement, first, index, data) {
- try {
- insertNode(parentElement, first, index)
- first.nodeValue = data
- } catch (e) {
- // IE erroneously throws error when appending an empty text node
- // after a null
- }
- }
-
- function flatten(list) {
- // recursively flatten array
- for (var i = 0; i < list.length; i++) {
- if (isArray(list[i])) {
- list = list.concat.apply([], list)
- // check current index again and flatten until there are no more
- // nested arrays at that index
- i--
- }
- }
- return list
- }
-
- function insertNode(parentElement, node, index) {
- parentElement.insertBefore(node,
- parentElement.childNodes[index] || null)
- }
-
- var DELETION = 1
- var INSERTION = 2
- var MOVE = 3
-
- function handleKeysDiffer(data, existing, cached, parentElement) {
- forKeys(data, function (key, i) {
- existing[key = key.key] = existing[key] ? {
- action: MOVE,
- index: i,
- from: existing[key].index,
- element: cached.nodes[existing[key].index] ||
- $document.createElement("div")
- } : {action: INSERTION, index: i}
- })
-
- var actions = []
- for (var prop in existing) if (hasOwn.call(existing, prop)) {
- actions.push(existing[prop])
- }
-
- var changes = actions.sort(sortChanges)
- var newCached = new Array(cached.length)
-
- newCached.nodes = cached.nodes.slice()
-
- forEach(changes, function (change) {
- var index = change.index
- if (change.action === DELETION) {
- clear(cached[index].nodes, cached[index])
- newCached.splice(index, 1)
- }
- if (change.action === INSERTION) {
- var dummy = $document.createElement("div")
- dummy.key = data[index].attrs.key
- insertNode(parentElement, dummy, index)
- newCached.splice(index, 0, {
- attrs: {key: data[index].attrs.key},
- nodes: [dummy]
- })
- newCached.nodes[index] = dummy
- }
-
- if (change.action === MOVE) {
- var changeElement = change.element
- var maybeChanged = parentElement.childNodes[index]
- if (maybeChanged !== changeElement && changeElement !== null) {
- parentElement.insertBefore(changeElement,
- maybeChanged || null)
- }
- newCached[index] = cached[change.from]
- newCached.nodes[index] = changeElement
- }
- })
-
- return newCached
- }
-
- function diffKeys(data, cached, existing, parentElement) {
- var keysDiffer = data.length !== cached.length
-
- if (!keysDiffer) {
- forKeys(data, function (attrs, i) {
- var cachedCell = cached[i]
- return keysDiffer = cachedCell &&
- cachedCell.attrs &&
- cachedCell.attrs.key !== attrs.key
- })
- }
-
- if (keysDiffer) {
- return handleKeysDiffer(data, existing, cached, parentElement)
- } else {
- return cached
- }
- }
-
- function diffArray(data, cached, nodes) {
- // diff the array itself
-
- // update the list of DOM nodes by collecting the nodes from each item
- forEach(data, function (_, i) {
- if (cached[i] != null) nodes.push.apply(nodes, cached[i].nodes)
- })
- // remove items from the end of the array if the new array is shorter
- // than the old one. if errors ever happen here, the issue is most
- // likely a bug in the construction of the `cached` data structure
- // somewhere earlier in the program
- forEach(cached.nodes, function (node, i) {
- if (node.parentNode != null && nodes.indexOf(node) < 0) {
- clear([node], [cached[i]])
- }
- })
-
- if (data.length < cached.length) cached.length = data.length
- cached.nodes = nodes
- }
-
- function buildArrayKeys(data) {
- var guid = 0
- forKeys(data, function () {
- forEach(data, function (attrs) {
- if ((attrs = attrs && attrs.attrs) && attrs.key == null) {
- attrs.key = "__mithril__" + guid++
- }
- })
- return 1
- })
- }
-
- function isDifferentEnough(data, cached, dataAttrKeys) {
- if (data.tag !== cached.tag) return true
-
- if (dataAttrKeys.sort().join() !==
- Object.keys(cached.attrs).sort().join()) {
- return true
- }
-
- if (data.attrs.id !== cached.attrs.id) {
- return true
- }
-
- if (data.attrs.key !== cached.attrs.key) {
- return true
- }
-
- if (m.redraw.strategy() === "all") {
- return !cached.configContext || cached.configContext.retain !== true
- }
-
- if (m.redraw.strategy() === "diff") {
- return cached.configContext && cached.configContext.retain === false
- }
-
- return false
- }
-
- function maybeRecreateObject(data, cached, dataAttrKeys) {
- // if an element is different enough from the one in cache, recreate it
- if (isDifferentEnough(data, cached, dataAttrKeys)) {
- if (cached.nodes.length) clear(cached.nodes)
-
- if (cached.configContext &&
- isFunction(cached.configContext.onunload)) {
- cached.configContext.onunload()
- }
-
- if (cached.controllers) {
- forEach(cached.controllers, function (controller) {
- if (controller.onunload) controller.onunload({preventDefault: noop});
- });
- }
- }
- }
-
- function getObjectNamespace(data, namespace) {
- if (data.attrs.xmlns) return data.attrs.xmlns
- if (data.tag === "svg") return "http://www.w3.org/2000/svg"
- if (data.tag === "math") return "http://www.w3.org/1998/Math/MathML"
- return namespace
- }
-
- var pendingRequests = 0
- m.startComputation = function () { pendingRequests++ }
- m.endComputation = function () {
- if (pendingRequests > 1) {
- pendingRequests--
- } else {
- pendingRequests = 0
- m.redraw()
- }
- }
-
- function unloadCachedControllers(cached, views, controllers) {
- if (controllers.length) {
- cached.views = views
- cached.controllers = controllers
- forEach(controllers, function (controller) {
- if (controller.onunload && controller.onunload.$old) {
- controller.onunload = controller.onunload.$old
- }
-
- if (pendingRequests && controller.onunload) {
- var onunload = controller.onunload
- controller.onunload = noop
- controller.onunload.$old = onunload
- }
- })
- }
- }
-
- function scheduleConfigsToBeCalled(configs, data, node, isNew, cached) {
- // schedule configs to be called. They are called after `build` finishes
- // running
- if (isFunction(data.attrs.config)) {
- var context = cached.configContext = cached.configContext || {}
-
- // bind
- configs.push(function () {
- return data.attrs.config.call(data, node, !isNew, context,
- cached)
- })
- }
- }
-
- function buildUpdatedNode(
- cached,
- data,
- editable,
- hasKeys,
- namespace,
- views,
- configs,
- controllers
- ) {
- var node = cached.nodes[0]
-
- if (hasKeys) {
- setAttributes(node, data.tag, data.attrs, cached.attrs, namespace)
- }
-
- cached.children = build(
- node,
- data.tag,
- undefined,
- undefined,
- data.children,
- cached.children,
- false,
- 0,
- data.attrs.contenteditable ? node : editable,
- namespace,
- configs
- )
-
- cached.nodes.intact = true
-
- if (controllers.length) {
- cached.views = views
- cached.controllers = controllers
- }
-
- return node
- }
-
- function handleNonexistentNodes(data, parentElement, index) {
- var nodes
- if (data.$trusted) {
- nodes = injectHTML(parentElement, index, data)
- } else {
- nodes = [$document.createTextNode(data)]
- if (!parentElement.nodeName.match(voidElements)) {
- insertNode(parentElement, nodes[0], index)
- }
- }
-
- var cached
-
- if (typeof data === "string" ||
- typeof data === "number" ||
- typeof data === "boolean") {
- cached = new data.constructor(data)
- } else {
- cached = data
- }
-
- cached.nodes = nodes
- return cached
- }
-
- function reattachNodes(
- data,
- cached,
- parentElement,
- editable,
- index,
- parentTag
- ) {
- var nodes = cached.nodes
- if (!editable || editable !== $document.activeElement) {
- if (data.$trusted) {
- clear(nodes, cached)
- nodes = injectHTML(parentElement, index, data)
- } else if (parentTag === "textarea") {
- // <textarea> uses `value` instead of `nodeValue`.
- parentElement.value = data
- } else if (editable) {
- // contenteditable nodes use `innerHTML` instead of `nodeValue`.
- editable.innerHTML = data
- } else {
- // was a trusted string
- if (nodes[0].nodeType === 1 || nodes.length > 1 ||
- (nodes[0].nodeValue.trim &&
- !nodes[0].nodeValue.trim())) {
- clear(cached.nodes, cached)
- nodes = [$document.createTextNode(data)]
- }
-
- injectTextNode(parentElement, nodes[0], index, data)
- }
- }
- cached = new data.constructor(data)
- cached.nodes = nodes
- return cached
- }
-
- function handleTextNode(
- cached,
- data,
- index,
- parentElement,
- shouldReattach,
- editable,
- parentTag
- ) {
- if (!cached.nodes.length) {
- return handleNonexistentNodes(data, parentElement, index)
- } else if (cached.valueOf() !== data.valueOf() || shouldReattach) {
- return reattachNodes(data, cached, parentElement, editable, index,
- parentTag)
- } else {
- return (cached.nodes.intact = true, cached)
- }
- }
-
- function getSubArrayCount(item) {
- if (item.$trusted) {
- // fix offset of next element if item was a trusted string w/ more
- // than one html element
- // the first clause in the regexp matches elements
- // the second clause (after the pipe) matches text nodes
- var match = item.match(/<[^\/]|\>\s*[^<]/g)
- if (match != null) return match.length
- } else if (isArray(item)) {
- return item.length
- }
- return 1
- }
-
- function buildArray(
- data,
- cached,
- parentElement,
- index,
- parentTag,
- shouldReattach,
- editable,
- namespace,
- configs
- ) {
- data = flatten(data)
- var nodes = []
- var intact = cached.length === data.length
- var subArrayCount = 0
-
- // keys algorithm: sort elements without recreating them if keys are
- // present
- //
- // 1) create a map of all existing keys, and mark all for deletion
- // 2) add new keys to map and mark them for addition
- // 3) if key exists in new list, change action from deletion to a move
- // 4) for each key, handle its corresponding action as marked in
- // previous steps
-
- var existing = {}
- var shouldMaintainIdentities = false
-
- forKeys(cached, function (attrs, i) {
- shouldMaintainIdentities = true
- existing[cached[i].attrs.key] = {action: DELETION, index: i}
- })
-
- buildArrayKeys(data)
- if (shouldMaintainIdentities) {
- cached = diffKeys(data, cached, existing, parentElement)
- }
- // end key algorithm
-
- var cacheCount = 0
- // faster explicitly written
- for (var i = 0, len = data.length; i < len; i++) {
- // diff each item in the array
- var item = build(
- parentElement,
- parentTag,
- cached,
- index,
- data[i],
- cached[cacheCount],
- shouldReattach,
- index + subArrayCount || subArrayCount,
- editable,
- namespace,
- configs)
-
- if (item !== undefined) {
- intact = intact && item.nodes.intact
- subArrayCount += getSubArrayCount(item)
- cached[cacheCount++] = item
- }
- }
-
- if (!intact) diffArray(data, cached, nodes)
- return cached
- }
-
- function makeCache(data, cached, index, parentIndex, parentCache) {
- if (cached != null) {
- if (type.call(cached) === type.call(data)) return cached
-
- if (parentCache && parentCache.nodes) {
- var offset = index - parentIndex
- var end = offset + (isArray(data) ? data : cached.nodes).length
- clear(
- parentCache.nodes.slice(offset, end),
- parentCache.slice(offset, end))
- } else if (cached.nodes) {
- clear(cached.nodes, cached)
- }
- }
-
- cached = new data.constructor()
- // if constructor creates a virtual dom element, use a blank object as
- // the base cached node instead of copying the virtual el (#277)
- if (cached.tag) cached = {}
- cached.nodes = []
- return cached
- }
-
- function constructNode(data, namespace) {
- if (data.attrs.is) {
- if (namespace == null) {
- return $document.createElement(data.tag, data.attrs.is)
- } else {
- return $document.createElementNS(namespace, data.tag,
- data.attrs.is)
- }
- } else if (namespace == null) {
- return $document.createElement(data.tag)
- } else {
- return $document.createElementNS(namespace, data.tag)
- }
- }
-
- function constructAttrs(data, node, namespace, hasKeys) {
- if (hasKeys) {
- return setAttributes(node, data.tag, data.attrs, {}, namespace)
- } else {
- return data.attrs
- }
- }
-
- function constructChildren(
- data,
- node,
- cached,
- editable,
- namespace,
- configs
- ) {
- if (data.children != null && data.children.length > 0) {
- return build(
- node,
- data.tag,
- undefined,
- undefined,
- data.children,
- cached.children,
- true,
- 0,
- data.attrs.contenteditable ? node : editable,
- namespace,
- configs)
- } else {
- return data.children
- }
- }
-
- function reconstructCached(
- data,
- attrs,
- children,
- node,
- namespace,
- views,
- controllers
- ) {
- var cached = {
- tag: data.tag,
- attrs: attrs,
- children: children,
- nodes: [node]
- }
-
- unloadCachedControllers(cached, views, controllers)
-
- if (cached.children && !cached.children.nodes) {
- cached.children.nodes = []
- }
-
- // edge case: setting value on <select> doesn't work before children
- // exist, so set it again after children have been created
- if (data.tag === "select" && "value" in data.attrs) {
- setAttributes(node, data.tag, {value: data.attrs.value}, {},
- namespace)
- }
-
- return cached
- }
-
- function getController(views, view, cachedControllers, controller) {
- var controllerIndex
-
- if (m.redraw.strategy() === "diff" && views) {
- controllerIndex = views.indexOf(view)
- } else {
- controllerIndex = -1
- }
-
- if (controllerIndex > -1) {
- return cachedControllers[controllerIndex]
- } else if (isFunction(controller)) {
- return new controller()
- } else {
- return {}
- }
- }
-
- var unloaders = []
-
- function updateLists(views, controllers, view, controller) {
- if (controller.onunload != null) {
- unloaders.push({
- controller: controller,
- handler: controller.onunload
- })
- }
-
- views.push(view)
- controllers.push(controller)
- }
-
- var forcing = false
- function checkView(data, view, cached, cachedControllers, controllers, views) {
- var controller = getController(cached.views, view, cachedControllers, data.controller)
- var key = data && data.attrs && data.attrs.key
- data = pendingRequests === 0 || forcing || cachedControllers && cachedControllers.indexOf(controller) > -1 ? data.view(controller) : {tag: "placeholder"}
- if (data.subtree === "retain") return data;
- data.attrs = data.attrs || {}
- data.attrs.key = key
- updateLists(views, controllers, view, controller)
- return data
- }
-
- function markViews(data, cached, views, controllers) {
- var cachedControllers = cached && cached.controllers
-
- while (data.view != null) {
- data = checkView(
- data,
- data.view.$original || data.view,
- cached,
- cachedControllers,
- controllers,
- views)
- }
-
- return data
- }
-
- function buildObject( // eslint-disable-line max-statements
- data,
- cached,
- editable,
- parentElement,
- index,
- shouldReattach,
- namespace,
- configs
- ) {
- var views = []
- var controllers = []
-
- data = markViews(data, cached, views, controllers)
-
- if (data.subtree === "retain") return cached
-
- if (!data.tag && controllers.length) {
- throw new Error("Component template must return a virtual " +
- "element, not an array, string, etc.")
- }
-
- data.attrs = data.attrs || {}
- cached.attrs = cached.attrs || {}
-
- var dataAttrKeys = Object.keys(data.attrs)
- var hasKeys = dataAttrKeys.length > ("key" in data.attrs ? 1 : 0)
-
- maybeRecreateObject(data, cached, dataAttrKeys)
-
- if (!isString(data.tag)) return
-
- var isNew = cached.nodes.length === 0
-
- namespace = getObjectNamespace(data, namespace)
-
- var node
- if (isNew) {
- node = constructNode(data, namespace)
- // set attributes first, then create children
- var attrs = constructAttrs(data, node, namespace, hasKeys)
-
- var children = constructChildren(data, node, cached, editable,
- namespace, configs)
-
- cached = reconstructCached(
- data,
- attrs,
- children,
- node,
- namespace,
- views,
- controllers)
- } else {
- node = buildUpdatedNode(
- cached,
- data,
- editable,
- hasKeys,
- namespace,
- views,
- configs,
- controllers)
- }
-
- if (isNew || shouldReattach === true && node != null) {
- insertNode(parentElement, node, index)
- }
-
- // The configs are called after `build` finishes running
- scheduleConfigsToBeCalled(configs, data, node, isNew, cached)
-
- return cached
- }
-
- function build(
- parentElement,
- parentTag,
- parentCache,
- parentIndex,
- data,
- cached,
- shouldReattach,
- index,
- editable,
- namespace,
- configs
- ) {
- /*
- * `build` is a recursive function that manages creation/diffing/removal
- * of DOM elements based on comparison between `data` and `cached` the
- * diff algorithm can be summarized as this:
- *
- * 1 - compare `data` and `cached`
- * 2 - if they are different, copy `data` to `cached` and update the DOM
- * based on what the difference is
- * 3 - recursively apply this algorithm for every array and for the
- * children of every virtual element
- *
- * The `cached` data structure is essentially the same as the previous
- * redraw's `data` data structure, with a few additions:
- * - `cached` always has a property called `nodes`, which is a list of
- * DOM elements that correspond to the data represented by the
- * respective virtual element
- * - in order to support attaching `nodes` as a property of `cached`,
- * `cached` is *always* a non-primitive object, i.e. if the data was
- * a string, then cached is a String instance. If data was `null` or
- * `undefined`, cached is `new String("")`
- * - `cached also has a `configContext` property, which is the state
- * storage object exposed by config(element, isInitialized, context)
- * - when `cached` is an Object, it represents a virtual element; when
- * it's an Array, it represents a list of elements; when it's a
- * String, Number or Boolean, it represents a text node
- *
- * `parentElement` is a DOM element used for W3C DOM API calls
- * `parentTag` is only used for handling a corner case for textarea
- * values
- * `parentCache` is used to remove nodes in some multi-node cases
- * `parentIndex` and `index` are used to figure out the offset of nodes.
- * They're artifacts from before arrays started being flattened and are
- * likely refactorable
- * `data` and `cached` are, respectively, the new and old nodes being
- * diffed
- * `shouldReattach` is a flag indicating whether a parent node was
- * recreated (if so, and if this node is reused, then this node must
- * reattach itself to the new parent)
- * `editable` is a flag that indicates whether an ancestor is
- * contenteditable
- * `namespace` indicates the closest HTML namespace as it cascades down
- * from an ancestor
- * `configs` is a list of config functions to run after the topmost
- * `build` call finishes running
- *
- * there's logic that relies on the assumption that null and undefined
- * data are equivalent to empty strings
- * - this prevents lifecycle surprises from procedural helpers that mix
- * implicit and explicit return statements (e.g.
- * function foo() {if (cond) return m("div")}
- * - it simplifies diffing code
- */
- data = dataToString(data)
- if (data.subtree === "retain") return cached
- cached = makeCache(data, cached, index, parentIndex, parentCache)
-
- if (isArray(data)) {
- return buildArray(
- data,
- cached,
- parentElement,
- index,
- parentTag,
- shouldReattach,
- editable,
- namespace,
- configs)
- } else if (data != null && isObject(data)) {
- return buildObject(
- data,
- cached,
- editable,
- parentElement,
- index,
- shouldReattach,
- namespace,
- configs)
- } else if (!isFunction(data)) {
- return handleTextNode(
- cached,
- data,
- index,
- parentElement,
- shouldReattach,
- editable,
- parentTag)
- } else {
- return cached
- }
- }
-
- function sortChanges(a, b) {
- return a.action - b.action || a.index - b.index
- }
-
- function copyStyleAttrs(node, dataAttr, cachedAttr) {
- for (var rule in dataAttr) if (hasOwn.call(dataAttr, rule)) {
- if (cachedAttr == null || cachedAttr[rule] !== dataAttr[rule]) {
- node.style[rule] = dataAttr[rule]
- }
- }
-
- for (rule in cachedAttr) if (hasOwn.call(cachedAttr, rule)) {
- if (!hasOwn.call(dataAttr, rule)) node.style[rule] = ""
- }
- }
-
- function shouldUseSetAttribute(attrName) {
- return attrName !== "list" &&
- attrName !== "style" &&
- attrName !== "form" &&
- attrName !== "type" &&
- attrName !== "width" &&
- attrName !== "height"
- }
-
- function setSingleAttr(
- node,
- attrName,
- dataAttr,
- cachedAttr,
- tag,
- namespace
- ) {
- if (attrName === "config" || attrName === "key") {
- // `config` isn't a real attribute, so ignore it
- return true
- } else if (isFunction(dataAttr) && attrName.slice(0, 2) === "on") {
- // hook event handlers to the auto-redrawing system
- node[attrName] = autoredraw(dataAttr, node)
- } else if (attrName === "style" && dataAttr != null &&
- isObject(dataAttr)) {
- // handle `style: {...}`
- copyStyleAttrs(node, dataAttr, cachedAttr)
- } else if (namespace != null) {
- // handle SVG
- if (attrName === "href") {
- node.setAttributeNS("http://www.w3.org/1999/xlink",
- "href", dataAttr)
- } else {
- node.setAttribute(
- attrName === "className" ? "class" : attrName,
- dataAttr)
- }
- } else if (attrName in node && shouldUseSetAttribute(attrName)) {
- // handle cases that are properties (but ignore cases where we
- // should use setAttribute instead)
- //
- // - list and form are typically used as strings, but are DOM
- // element references in js
- //
- // - when using CSS selectors (e.g. `m("[style='']")`), style is
- // used as a string, but it's an object in js
- //
- // #348 don't set the value if not needed - otherwise, cursor
- // placement breaks in Chrome
- try {
- if (tag !== "input" || node[attrName] !== dataAttr) {
- node[attrName] = dataAttr
- }
- } catch (e) {
- node.setAttribute(attrName, dataAttr)
- }
- }
- else node.setAttribute(attrName, dataAttr)
- }
-
- function trySetAttr(
- node,
- attrName,
- dataAttr,
- cachedAttr,
- cachedAttrs,
- tag,
- namespace
- ) {
- if (!(attrName in cachedAttrs) || (cachedAttr !== dataAttr)) {
- cachedAttrs[attrName] = dataAttr
- try {
- return setSingleAttr(
- node,
- attrName,
- dataAttr,
- cachedAttr,
- tag,
- namespace)
- } catch (e) {
- // swallow IE's invalid argument errors to mimic HTML's
- // fallback-to-doing-nothing-on-invalid-attributes behavior
- if (e.message.indexOf("Invalid argument") < 0) throw e
- }
- } else if (attrName === "value" && tag === "input" &&
- node.value !== dataAttr) {
- // #348 dataAttr may not be a string, so use loose comparison
- node.value = dataAttr
- }
- }
-
- function setAttributes(node, tag, dataAttrs, cachedAttrs, namespace) {
- for (var attrName in dataAttrs) if (hasOwn.call(dataAttrs, attrName)) {
- if (trySetAttr(
- node,
- attrName,
- dataAttrs[attrName],
- cachedAttrs[attrName],
- cachedAttrs,
- tag,
- namespace)) {
- continue
- }
- }
- return cachedAttrs
- }
-
- function clear(nodes, cached) {
- for (var i = nodes.length - 1; i > -1; i--) {
- if (nodes[i] && nodes[i].parentNode) {
- try {
- nodes[i].parentNode.removeChild(nodes[i])
- } catch (e) {
- /* eslint-disable max-len */
- // ignore if this fails due to order of events (see
- // http://stackoverflow.com/questions/21926083/failed-to-execute-removechild-on-node)
- /* eslint-enable max-len */
- }
- cached = [].concat(cached)
- if (cached[i]) unload(cached[i])
- }
- }
- // release memory if nodes is an array. This check should fail if nodes
- // is a NodeList (see loop above)
- if (nodes.length) {
- nodes.length = 0
- }
- }
-
- function unload(cached) {
- if (cached.configContext && isFunction(cached.configContext.onunload)) {
- cached.configContext.onunload()
- cached.configContext.onunload = null
- }
- if (cached.controllers) {
- forEach(cached.controllers, function (controller) {
- if (isFunction(controller.onunload)) {
- controller.onunload({preventDefault: noop})
- }
- })
- }
- if (cached.children) {
- if (isArray(cached.children)) forEach(cached.children, unload)
- else if (cached.children.tag) unload(cached.children)
- }
- }
-
- function appendTextFragment(parentElement, data) {
- try {
- parentElement.appendChild(
- $document.createRange().createContextualFragment(data))
- } catch (e) {
- parentElement.insertAdjacentHTML("beforeend", data)
- }
- }
-
- function injectHTML(parentElement, index, data) {
- var nextSibling = parentElement.childNodes[index]
- if (nextSibling) {
- var isElement = nextSibling.nodeType !== 1
- var placeholder = $document.createElement("span")
- if (isElement) {
- parentElement.insertBefore(placeholder, nextSibling || null)
- placeholder.insertAdjacentHTML("beforebegin", data)
- parentElement.removeChild(placeholder)
- } else {
- nextSibling.insertAdjacentHTML("beforebegin", data)
- }
- } else {
- appendTextFragment(parentElement, data)
- }
-
- var nodes = []
-
- while (parentElement.childNodes[index] !== nextSibling) {
- nodes.push(parentElement.childNodes[index])
- index++
- }
-
- return nodes
- }
-
- function autoredraw(callback, object) {
- return function (e) {
- e = e || event
- m.redraw.strategy("diff")
- m.startComputation()
- try {
- return callback.call(object, e)
- } finally {
- endFirstComputation()
- }
- }
- }
-
- var html
- var documentNode = {
- appendChild: function (node) {
- if (html === undefined) html = $document.createElement("html")
- if ($document.documentElement &&
- $document.documentElement !== node) {
- $document.replaceChild(node, $document.documentElement)
- } else {
- $document.appendChild(node)
- }
-
- this.childNodes = $document.childNodes
- },
-
- insertBefore: function (node) {
- this.appendChild(node)
- },
-
- childNodes: []
- }
-
- var nodeCache = []
- var cellCache = {}
-
- m.render = function (root, cell, forceRecreation) {
- if (!root) {
- throw new Error("Ensure the DOM element being passed to " +
- "m.route/m.mount/m.render is not undefined.")
- }
- var configs = []
- var id = getCellCacheKey(root)
- var isDocumentRoot = root === $document
- var node
-
- if (isDocumentRoot || root === $document.documentElement) {
- node = documentNode
- } else {
- node = root
- }
-
- if (isDocumentRoot && cell.tag !== "html") {
- cell = {tag: "html", attrs: {}, children: cell}
- }
-
- if (cellCache[id] === undefined) clear(node.childNodes)
- if (forceRecreation === true) reset(root)
-
- cellCache[id] = build(
- node,
- null,
- undefined,
- undefined,
- cell,
- cellCache[id],
- false,
- 0,
- null,
- undefined,
- configs)
-
- forEach(configs, function (config) { config() })
- }
-
- function getCellCacheKey(element) {
- var index = nodeCache.indexOf(element)
- return index < 0 ? nodeCache.push(element) - 1 : index
- }
-
- m.trust = function (value) {
- value = new String(value) // eslint-disable-line no-new-wrappers
- value.$trusted = true
- return value
- }
-
- function gettersetter(store) {
- function prop() {
- if (arguments.length) store = arguments[0]
- return store
- }
-
- prop.toJSON = function () {
- return store
- }
-
- return prop
- }
-
- m.prop = function (store) {
- if ((store != null && isObject(store) || isFunction(store)) &&
- isFunction(store.then)) {
- return propify(store)
- }
-
- return gettersetter(store)
- }
-
- var roots = []
- var components = []
- var controllers = []
- var lastRedrawId = null
- var lastRedrawCallTime = 0
- var computePreRedrawHook = null
- var computePostRedrawHook = null
- var topComponent
- var FRAME_BUDGET = 16 // 60 frames per second = 1 call per 16 ms
-
- function parameterize(component, args) {
- function controller() {
- /* eslint-disable no-invalid-this */
- return (component.controller || noop).apply(this, args) || this
- /* eslint-enable no-invalid-this */
- }
-
- if (component.controller) {
- controller.prototype = component.controller.prototype
- }
-
- function view(ctrl) {
- var currentArgs = [ctrl].concat(args)
- for (var i = 1; i < arguments.length; i++) {
- currentArgs.push(arguments[i])
- }
-
- return component.view.apply(component, currentArgs)
- }
-
- view.$original = component.view
- var output = {controller: controller, view: view}
- if (args[0] && args[0].key != null) output.attrs = {key: args[0].key}
- return output
- }
-
- m.component = function (component) {
- for (var args = [], i = 1; i < arguments.length; i++) {
- args.push(arguments[i])
- }
-
- return parameterize(component, args)
- }
-
- function checkPrevented(component, root, index, isPrevented) {
- if (!isPrevented) {
- m.redraw.strategy("all")
- m.startComputation()
- roots[index] = root
- var currentComponent
-
- if (component) {
- currentComponent = topComponent = component
- } else {
- currentComponent = topComponent = component = {controller: noop}
- }
-
- var controller = new (component.controller || noop)()
-
- // controllers may call m.mount recursively (via m.route redirects,
- // for example)
- // this conditional ensures only the last recursive m.mount call is
- // applied
- if (currentComponent === topComponent) {
- controllers[index] = controller
- components[index] = component
- }
- endFirstComputation()
- if (component === null) {
- removeRootElement(root, index)
- }
- return controllers[index]
- } else if (component == null) {
- removeRootElement(root, index)
- }
- }
-
- m.mount = m.module = function (root, component) {
- if (!root) {
- throw new Error("Please ensure the DOM element exists before " +
- "rendering a template into it.")
- }
-
- var index = roots.indexOf(root)
- if (index < 0) index = roots.length
-
- var isPrevented = false
- var event = {
- preventDefault: function () {
- isPrevented = true
- computePreRedrawHook = computePostRedrawHook = null
- }
- }
-
- forEach(unloaders, function (unloader) {
- unloader.handler.call(unloader.controller, event)
- unloader.controller.onunload = null
- })
-
- if (isPrevented) {
- forEach(unloaders, function (unloader) {
- unloader.controller.onunload = unloader.handler
- })
- } else {
- unloaders = []
- }
-
- if (controllers[index] && isFunction(controllers[index].onunload)) {
- controllers[index].onunload(event)
- }
-
- return checkPrevented(component, root, index, isPrevented)
- }
-
- function removeRootElement(root, index) {
- roots.splice(index, 1)
- controllers.splice(index, 1)
- components.splice(index, 1)
- reset(root)
- nodeCache.splice(getCellCacheKey(root), 1)
- }
-
- var redrawing = false
- m.redraw = function (force) {
- if (redrawing) return
- redrawing = true
- if (force) forcing = true
-
- try {
- // lastRedrawId is a positive number if a second redraw is requested
- // before the next animation frame
- // lastRedrawID is null if it's the first redraw and not an event
- // handler
- if (lastRedrawId && !force) {
- // when setTimeout: only reschedule redraw if time between now
- // and previous redraw is bigger than a frame, otherwise keep
- // currently scheduled timeout
- // when rAF: always reschedule redraw
- if ($requestAnimationFrame === global.requestAnimationFrame ||
- new Date() - lastRedrawCallTime > FRAME_BUDGET) {
- if (lastRedrawId > 0) $cancelAnimationFrame(lastRedrawId)
- lastRedrawId = $requestAnimationFrame(redraw, FRAME_BUDGET)
- }
- } else {
- redraw()
- lastRedrawId = $requestAnimationFrame(function () {
- lastRedrawId = null
- }, FRAME_BUDGET)
- }
- } finally {
- redrawing = forcing = false
- }
- }
-
- m.redraw.strategy = m.prop()
- function redraw() {
- if (computePreRedrawHook) {
- computePreRedrawHook()
- computePreRedrawHook = null
- }
- forEach(roots, function (root, i) {
- var component = components[i]
- if (controllers[i]) {
- var args = [controllers[i]]
- m.render(root,
- component.view ? component.view(controllers[i], args) : "")
- }
- })
- // after rendering within a routed context, we need to scroll back to
- // the top, and fetch the document title for history.pushState
- if (computePostRedrawHook) {
- computePostRedrawHook()
- computePostRedrawHook = null
- }
- lastRedrawId = null
- lastRedrawCallTime = new Date()
- m.redraw.strategy("diff")
- }
-
- function endFirstComputation() {
- if (m.redraw.strategy() === "none") {
- pendingRequests--
- m.redraw.strategy("diff")
- } else {
- m.endComputation()
- }
- }
-
- m.withAttr = function (prop, withAttrCallback, callbackThis) {
- return function (e) {
- e = e || event
- /* eslint-disable no-invalid-this */
- var currentTarget = e.currentTarget || this
- var _this = callbackThis || this
- /* eslint-enable no-invalid-this */
- var target = prop in currentTarget ?
- currentTarget[prop] :
- currentTarget.getAttribute(prop)
- withAttrCallback.call(_this, target)
- }
- }
-
- // routing
- var modes = {pathname: "", hash: "#", search: "?"}
- var redirect = noop
- var isDefaultRoute = false
- var routeParams, currentRoute
-
- m.route = function (root, arg1, arg2, vdom) { // eslint-disable-line
- // m.route()
- if (arguments.length === 0) return currentRoute
- // m.route(el, defaultRoute, routes)
- if (arguments.length === 3 && isString(arg1)) {
- redirect = function (source) {
- var path = currentRoute = normalizeRoute(source)
- if (!routeByValue(root, arg2, path)) {
- if (isDefaultRoute) {
- throw new Error("Ensure the default route matches " +
- "one of the routes defined in m.route")
- }
-
- isDefaultRoute = true
- m.route(arg1, true)
- isDefaultRoute = false
- }
- }
-
- var listener = m.route.mode === "hash" ?
- "onhashchange" :
- "onpopstate"
-
- global[listener] = function () {
- var path = $location[m.route.mode]
- if (m.route.mode === "pathname") path += $location.search
- if (currentRoute !== normalizeRoute(path)) redirect(path)
- }
-
- computePreRedrawHook = setScroll
- global[listener]()
-
- return
- }
-
- // config: m.route
- if (root.addEventListener || root.attachEvent) {
- var base = m.route.mode !== "pathname" ? $location.pathname : ""
- root.href = base + modes[m.route.mode] + vdom.attrs.href
- if (root.addEventListener) {
- root.removeEventListener("click", routeUnobtrusive)
- root.addEventListener("click", routeUnobtrusive)
- } else {
- root.detachEvent("onclick", routeUnobtrusive)
- root.attachEvent("onclick", routeUnobtrusive)
- }
-
- return
- }
- // m.route(route, params, shouldReplaceHistoryEntry)
- if (isString(root)) {
- var oldRoute = currentRoute
- currentRoute = root
-
- var args = arg1 || {}
- var queryIndex = currentRoute.indexOf("?")
- var params
-
- if (queryIndex > -1) {
- params = parseQueryString(currentRoute.slice(queryIndex + 1))
- } else {
- params = {}
- }
-
- for (var i in args) if (hasOwn.call(args, i)) {
- params[i] = args[i]
- }
-
- var querystring = buildQueryString(params)
- var currentPath
-
- if (queryIndex > -1) {
- currentPath = currentRoute.slice(0, queryIndex)
- } else {
- currentPath = currentRoute
- }
-
- if (querystring) {
- currentRoute = currentPath +
- (currentPath.indexOf("?") === -1 ? "?" : "&") +
- querystring
- }
-
- var replaceHistory =
- (arguments.length === 3 ? arg2 : arg1) === true ||
- oldRoute === root
-
- if (global.history.pushState) {
- var method = replaceHistory ? "replaceState" : "pushState"
- computePreRedrawHook = setScroll
- computePostRedrawHook = function () {
- global.history[method](null, $document.title,
- modes[m.route.mode] + currentRoute)
- }
- redirect(modes[m.route.mode] + currentRoute)
- } else {
- $location[m.route.mode] = currentRoute
- redirect(modes[m.route.mode] + currentRoute)
- }
- }
- }
-
- m.route.param = function (key) {
- if (!routeParams) {
- throw new Error("You must call m.route(element, defaultRoute, " +
- "routes) before calling m.route.param()")
- }
-
- if (!key) {
- return routeParams
- }
-
- return routeParams[key]
- }
-
- m.route.mode = "search"
-
- function normalizeRoute(route) {
- return route.slice(modes[m.route.mode].length)
- }
-
- function routeByValue(root, router, path) {
- routeParams = {}
-
- var queryStart = path.indexOf("?")
- if (queryStart !== -1) {
- routeParams = parseQueryString(
- path.substr(queryStart + 1, path.length))
- path = path.substr(0, queryStart)
- }
-
- // Get all routes and check if there's
- // an exact match for the current path
- var keys = Object.keys(router)
- var index = keys.indexOf(path)
-
- if (index !== -1){
- m.mount(root, router[keys [index]])
- return true
- }
-
- for (var route in router) if (hasOwn.call(router, route)) {
- if (route === path) {
- m.mount(root, router[route])
- return true
- }
-
- var matcher = new RegExp("^" + route
- .replace(/:[^\/]+?\.{3}/g, "(.*?)")
- .replace(/:[^\/]+/g, "([^\\/]+)") + "\/?$")
-
- if (matcher.test(path)) {
- /* eslint-disable no-loop-func */
- path.replace(matcher, function () {
- var keys = route.match(/:[^\/]+/g) || []
- var values = [].slice.call(arguments, 1, -2)
- forEach(keys, function (key, i) {
- routeParams[key.replace(/:|\./g, "")] =
- decodeURIComponent(values[i])
- })
- m.mount(root, router[route])
- })
- /* eslint-enable no-loop-func */
- return true
- }
- }
- }
-
- function routeUnobtrusive(e) {
- e = e || event
- if (e.ctrlKey || e.metaKey || e.shiftKey || e.which === 2) return
-
- if (e.preventDefault) {
- e.preventDefault()
- } else {
- e.returnValue = false
- }
-
- var currentTarget = e.currentTarget || e.srcElement
- var args
-
- if (m.route.mode === "pathname" && currentTarget.search) {
- args = parseQueryString(currentTarget.search.slice(1))
- } else {
- args = {}
- }
-
- while (currentTarget && !/a/i.test(currentTarget.nodeName)) {
- currentTarget = currentTarget.parentNode
- }
-
- // clear pendingRequests because we want an immediate route change
- pendingRequests = 0
- m.route(currentTarget[m.route.mode]
- .slice(modes[m.route.mode].length), args)
- }
-
- function setScroll() {
- if (m.route.mode !== "hash" && $location.hash) {
- $location.hash = $location.hash
- } else {
- global.scrollTo(0, 0)
- }
- }
-
- function buildQueryString(object, prefix) {
- var duplicates = {}
- var str = []
-
- for (var prop in object) if (hasOwn.call(object, prop)) {
- var key = prefix ? prefix + "[" + prop + "]" : prop
- var value = object[prop]
-
- if (value === null) {
- str.push(encodeURIComponent(key))
- } else if (isObject(value)) {
- str.push(buildQueryString(value, key))
- } else if (isArray(value)) {
- var keys = []
- duplicates[key] = duplicates[key] || {}
- /* eslint-disable no-loop-func */
- forEach(value, function (item) {
- /* eslint-enable no-loop-func */
- if (!duplicates[key][item]) {
- duplicates[key][item] = true
- keys.push(encodeURIComponent(key) + "=" +
- encodeURIComponent(item))
- }
- })
- str.push(keys.join("&"))
- } else if (value !== undefined) {
- str.push(encodeURIComponent(key) + "=" +
- encodeURIComponent(value))
- }
- }
- return str.join("&")
- }
-
- function parseQueryString(str) {
- if (str === "" || str == null) return {}
- if (str.charAt(0) === "?") str = str.slice(1)
-
- var pairs = str.split("&")
- var params = {}
-
- forEach(pairs, function (string) {
- var pair = string.split("=")
- var key = decodeURIComponent(pair[0])
- var value = pair.length === 2 ? decodeURIComponent(pair[1]) : null
- if (params[key] != null) {
- if (!isArray(params[key])) params[key] = [params[key]]
- params[key].push(value)
- }
- else params[key] = value
- })
-
- return params
- }
-
- m.route.buildQueryString = buildQueryString
- m.route.parseQueryString = parseQueryString
-
- function reset(root) {
- var cacheKey = getCellCacheKey(root)
- clear(root.childNodes, cellCache[cacheKey])
- cellCache[cacheKey] = undefined
- }
-
- m.deferred = function () {
- var deferred = new Deferred()
- deferred.promise = propify(deferred.promise)
- return deferred
- }
-
- function propify(promise, initialValue) {
- var prop = m.prop(initialValue)
- promise.then(prop)
- prop.then = function (resolve, reject) {
- return propify(promise.then(resolve, reject), initialValue)
- }
-
- prop.catch = prop.then.bind(null, null)
- return prop
- }
- // Promiz.mithril.js | Zolmeister | MIT
- // a modified version of Promiz.js, which does not conform to Promises/A+
- // for two reasons:
- //
- // 1) `then` callbacks are called synchronously (because setTimeout is too
- // slow, and the setImmediate polyfill is too big
- //
- // 2) throwing subclasses of Error cause the error to be bubbled up instead
- // of triggering rejection (because the spec does not account for the
- // important use case of default browser error handling, i.e. message w/
- // line number)
-
- var RESOLVING = 1
- var REJECTING = 2
- var RESOLVED = 3
- var REJECTED = 4
-
- function Deferred(onSuccess, onFailure) {
- var self = this
- var state = 0
- var promiseValue = 0
- var next = []
-
- self.promise = {}
-
- self.resolve = function (value) {
- if (!state) {
- promiseValue = value
- state = RESOLVING
-
- fire()
- }
-
- return self
- }
-
- self.reject = function (value) {
- if (!state) {
- promiseValue = value
- state = REJECTING
-
- fire()
- }
-
- return self
- }
-
- self.promise.then = function (onSuccess, onFailure) {
- var deferred = new Deferred(onSuccess, onFailure)
-
- if (state === RESOLVED) {
- deferred.resolve(promiseValue)
- } else if (state === REJECTED) {
- deferred.reject(promiseValue)
- } else {
- next.push(deferred)
- }
-
- return deferred.promise
- }
-
- function finish(type) {
- state = type || REJECTED
- next.map(function (deferred) {
- if (state === RESOLVED) {
- deferred.resolve(promiseValue)
- } else {
- deferred.reject(promiseValue)
- }
- })
- }
-
- function thennable(then, success, failure, notThennable) {
- if (((promiseValue != null && isObject(promiseValue)) ||
- isFunction(promiseValue)) && isFunction(then)) {
- try {
- // count protects against abuse calls from spec checker
- var count = 0
- then.call(promiseValue, function (value) {
- if (count++) return
- promiseValue = value
- success()
- }, function (value) {
- if (count++) return
- promiseValue = value
- failure()
- })
- } catch (e) {
- m.deferred.onerror(e)
- promiseValue = e
- failure()
- }
- } else {
- notThennable()
- }
- }
-
- function fire() {
- // check if it's a thenable
- var then
- try {
- then = promiseValue && promiseValue.then
- } catch (e) {
- m.deferred.onerror(e)
- promiseValue = e
- state = REJECTING
- return fire()
- }
-
- if (state === REJECTING) {
- m.deferred.onerror(promiseValue)
- }
-
- thennable(then, function () {
- state = RESOLVING
- fire()
- }, function () {
- state = REJECTING
- fire()
- }, function () {
- try {
- if (state === RESOLVING && isFunction(onSuccess)) {
- promiseValue = onSuccess(promiseValue)
- } else if (state === REJECTING && isFunction(onFailure)) {
- promiseValue = onFailure(promiseValue)
- state = RESOLVING
- }
- } catch (e) {
- m.deferred.onerror(e)
- promiseValue = e
- return finish()
- }
-
- if (promiseValue === self) {
- promiseValue = TypeError()
- finish()
- } else {
- thennable(then, function () {
- finish(RESOLVED)
- }, finish, function () {
- finish(state === RESOLVING && RESOLVED)
- })
- }
- })
- }
- }
-
- m.deferred.onerror = function (e) {
- if (type.call(e) === "[object Error]" &&
- !e.constructor.toString().match(/ Error/)) {
- pendingRequests = 0
- throw e
- }
- }
-
- m.sync = function (args) {
- var deferred = m.deferred()
- var outstanding = args.length
- var results = new Array(outstanding)
- var method = "resolve"
-
- function synchronizer(pos, resolved) {
- return function (value) {
- results[pos] = value
- if (!resolved) method = "reject"
- if (--outstanding === 0) {
- deferred.promise(results)
- deferred[method](results)
- }
- return value
- }
- }
-
- if (args.length > 0) {
- forEach(args, function (arg, i) {
- arg.then(synchronizer(i, true), synchronizer(i, false))
- })
- } else {
- deferred.resolve([])
- }
-
- return deferred.promise
- }
-
- function identity(value) { return value }
-
- function handleJsonp(options) {
- var callbackKey = "mithril_callback_" +
- new Date().getTime() + "_" +
- (Math.round(Math.random() * 1e16)).toString(36)
-
- var script = $document.createElement("script")
-
- global[callbackKey] = function (resp) {
- script.parentNode.removeChild(script)
- options.onload({
- type: "load",
- target: {
- responseText: resp
- }
- })
- global[callbackKey] = undefined
- }
-
- script.onerror = function () {
- script.parentNode.removeChild(script)
-
- options.onerror({
- type: "error",
- target: {
- status: 500,
- responseText: JSON.stringify({
- error: "Error making jsonp request"
- })
- }
- })
- global[callbackKey] = undefined
-
- return false
- }
-
- script.onload = function () {
- return false
- }
-
- script.src = options.url +
- (options.url.indexOf("?") > 0 ? "&" : "?") +
- (options.callbackKey ? options.callbackKey : "callback") +
- "=" + callbackKey +
- "&" + buildQueryString(options.data || {})
-
- $document.body.appendChild(script)
- }
-
- function createXhr(options) {
- var xhr = new global.XMLHttpRequest()
- xhr.open(options.method, options.url, true, options.user,
- options.password)
-
- xhr.onreadystatechange = function () {
- if (xhr.readyState === 4) {
- if (xhr.status >= 200 && xhr.status < 300) {
- options.onload({type: "load", target: xhr})
- } else {
- options.onerror({type: "error", target: xhr})
- }
- }
- }
-
- if (options.serialize === JSON.stringify &&
- options.data &&
- options.method !== "GET") {
- xhr.setRequestHeader("Content-Type",
- "application/json; charset=utf-8")
- }
-
- if (options.deserialize === JSON.parse) {
- xhr.setRequestHeader("Accept", "application/json, text/*")
- }
-
- if (isFunction(options.config)) {
- var maybeXhr = options.config(xhr, options)
- if (maybeXhr != null) xhr = maybeXhr
- }
-
- var data = options.method === "GET" || !options.data ? "" : options.data
-
- if (data && !isString(data) && data.constructor !== global.FormData) {
- throw new Error("Request data should be either be a string or " +
- "FormData. Check the `serialize` option in `m.request`")
- }
-
- xhr.send(data)
- return xhr
- }
-
- function ajax(options) {
- if (options.dataType && options.dataType.toLowerCase() === "jsonp") {
- return handleJsonp(options)
- } else {
- return createXhr(options)
- }
- }
-
- function bindData(options, data, serialize) {
- if (options.method === "GET" && options.dataType !== "jsonp") {
- var prefix = options.url.indexOf("?") < 0 ? "?" : "&"
- var querystring = buildQueryString(data)
- options.url += (querystring ? prefix + querystring : "")
- } else {
- options.data = serialize(data)
- }
- }
-
- function parameterizeUrl(url, data) {
- var tokens = url.match(/:[a-z]\w+/gi)
-
- if (tokens && data) {
- forEach(tokens, function (token) {
- var key = token.slice(1)
- url = url.replace(token, data[key])
- delete data[key]
- })
- }
-
- return url
- }
-
- m.request = function (options) {
- if (options.background !== true) m.startComputation()
- var deferred = new Deferred()
- var isJSONP = options.dataType &&
- options.dataType.toLowerCase() === "jsonp"
-
- var serialize, deserialize, extract
-
- if (isJSONP) {
- serialize = options.serialize =
- deserialize = options.deserialize = identity
-
- extract = function (jsonp) { return jsonp.responseText }
- } else {
- serialize = options.serialize = options.serialize || JSON.stringify
-
- deserialize = options.deserialize =
- options.deserialize || JSON.parse
- extract = options.extract || function (xhr) {
- if (xhr.responseText.length || deserialize !== JSON.parse) {
- return xhr.responseText
- } else {
- return null
- }
- }
- }
-
- options.method = (options.method || "GET").toUpperCase()
- options.url = parameterizeUrl(options.url, options.data)
- bindData(options, options.data, serialize)
- options.onload = options.onerror = function (ev) {
- try {
- ev = ev || event
- var response = deserialize(extract(ev.target, options))
- if (ev.type === "load") {
- if (options.unwrapSuccess) {
- response = options.unwrapSuccess(response, ev.target)
- }
-
- if (isArray(response) && options.type) {
- forEach(response, function (res, i) {
- response[i] = new options.type(res)
- })
- } else if (options.type) {
- response = new options.type(response)
- }
-
- deferred.resolve(response)
- } else {
- if (options.unwrapError) {
- response = options.unwrapError(response, ev.target)
- }
-
- deferred.reject(response)
- }
- } catch (e) {
- deferred.reject(e)
- } finally {
- if (options.background !== true) m.endComputation()
- }
- }
-
- ajax(options)
- deferred.promise = propify(deferred.promise, options.initialValue)
- return deferred.promise
- }
-
- return m
-})
+;(function (global, factory) { // eslint-disable-line
+ "use strict"
+ /* eslint-disable no-undef */
+ var m = factory(global)
+ if (typeof module === "object" && module != null && module.exports) {
+ module.exports = m
+ } else if (typeof define === "function" && define.amd) {
+ define(function () { return m })
+ } else {
+ global.m = m
+ }
+ /* eslint-enable no-undef */
+})(typeof window !== "undefined" ? window : this, function (global, undefined) { // eslint-disable-line
+ "use strict"
+
+ m.version = function () {
+ return "v0.2.5"
+ }
+
+ var hasOwn = {}.hasOwnProperty
+ var type = {}.toString
+
+ function isFunction(object) {
+ return typeof object === "function"
+ }
+
+ function isObject(object) {
+ return type.call(object) === "[object Object]"
+ }
+
+ function isString(object) {
+ return type.call(object) === "[object String]"
+ }
+
+ var isArray = Array.isArray || function (object) {
+ return type.call(object) === "[object Array]"
+ }
+
+ function noop() {}
+
+ var voidElements = {
+ AREA: 1,
+ BASE: 1,
+ BR: 1,
+ COL: 1,
+ COMMAND: 1,
+ EMBED: 1,
+ HR: 1,
+ IMG: 1,
+ INPUT: 1,
+ KEYGEN: 1,
+ LINK: 1,
+ META: 1,
+ PARAM: 1,
+ SOURCE: 1,
+ TRACK: 1,
+ WBR: 1
+ }
+
+ // caching commonly used variables
+ var $document, $location, $requestAnimationFrame, $cancelAnimationFrame
+
+ // self invoking function needed because of the way mocks work
+ function initialize(mock) {
+ $document = mock.document
+ $location = mock.location
+ $cancelAnimationFrame = mock.cancelAnimationFrame || mock.clearTimeout
+ $requestAnimationFrame = mock.requestAnimationFrame || mock.setTimeout
+ }
+
+ // testing API
+ m.deps = function (mock) {
+ initialize(global = mock || window)
+ return global
+ }
+
+ m.deps(global)
+
+ /**
+ * @typedef {String} Tag
+ * A string that looks like -> div.classname#id[param=one][param2=two]
+ * Which describes a DOM node
+ */
+
+ function parseTagAttrs(cell, tag) {
+ var classes = []
+ var parser = /(?:(^|#|\.)([^#\.\[\]]+))|(\[.+?\])/g
+ var match
+
+ while ((match = parser.exec(tag))) {
+ if (match[1] === "" && match[2]) {
+ cell.tag = match[2]
+ } else if (match[1] === "#") {
+ cell.attrs.id = match[2]
+ } else if (match[1] === ".") {
+ classes.push(match[2])
+ } else if (match[3][0] === "[") {
+ var pair = /\[(.+?)(?:=("|'|)(.*?)\2)?\]/.exec(match[3])
+ cell.attrs[pair[1]] = pair[3] || ""
+ }
+ }
+
+ return classes
+ }
+
+ function getVirtualChildren(args, hasAttrs) {
+ var children = hasAttrs ? args.slice(1) : args
+
+ if (children.length === 1 && isArray(children[0])) {
+ return children[0]
+ } else {
+ return children
+ }
+ }
+
+ function assignAttrs(target, attrs, classes) {
+ var classAttr = "class" in attrs ? "class" : "className"
+
+ for (var attrName in attrs) {
+ if (hasOwn.call(attrs, attrName)) {
+ if (attrName === classAttr &&
+ attrs[attrName] != null &&
+ attrs[attrName] !== "") {
+ classes.push(attrs[attrName])
+ // create key in correct iteration order
+ target[attrName] = ""
+ } else {
+ target[attrName] = attrs[attrName]
+ }
+ }
+ }
+
+ if (classes.length) target[classAttr] = classes.join(" ")
+ }
+
+ /**
+ *
+ * @param {Tag} The DOM node tag
+ * @param {Object=[]} optional key-value pairs to be mapped to DOM attrs
+ * @param {...mNode=[]} Zero or more Mithril child nodes. Can be an array,
+ * or splat (optional)
+ */
+ function m(tag, pairs) {
+ var args = []
+
+ for (var i = 1, length = arguments.length; i < length; i++) {
+ args[i - 1] = arguments[i]
+ }
+
+ if (isObject(tag)) return parameterize(tag, args)
+
+ if (!isString(tag)) {
+ throw new Error("selector in m(selector, attrs, children) should " +
+ "be a string")
+ }
+
+ var hasAttrs = pairs != null && isObject(pairs) &&
+ !("tag" in pairs || "view" in pairs || "subtree" in pairs)
+
+ var attrs = hasAttrs ? pairs : {}
+ var cell = {
+ tag: "div",
+ attrs: {},
+ children: getVirtualChildren(args, hasAttrs)
+ }
+
+ assignAttrs(cell.attrs, attrs, parseTagAttrs(cell, tag))
+ return cell
+ }
+
+ function forEach(list, f) {
+ for (var i = 0; i < list.length && !f(list[i], i++);) {
+ // function called in condition
+ }
+ }
+
+ function forKeys(list, f) {
+ forEach(list, function (attrs, i) {
+ return (attrs = attrs && attrs.attrs) &&
+ attrs.key != null &&
+ f(attrs, i)
+ })
+ }
+ // This function was causing deopts in Chrome.
+ function dataToString(data) {
+ // data.toString() might throw or return null if data is the return
+ // value of Console.log in some versions of Firefox (behavior depends on
+ // version)
+ try {
+ if (data != null && data.toString() != null) return data
+ } catch (e) {
+ // silently ignore errors
+ }
+ return ""
+ }
+
+ // This function was causing deopts in Chrome.
+ function injectTextNode(parentElement, first, index, data) {
+ try {
+ insertNode(parentElement, first, index)
+ first.nodeValue = data
+ } catch (e) {
+ // IE erroneously throws error when appending an empty text node
+ // after a null
+ }
+ }
+
+ function flatten(list) {
+ // recursively flatten array
+ for (var i = 0; i < list.length; i++) {
+ if (isArray(list[i])) {
+ list = list.concat.apply([], list)
+ // check current index again and flatten until there are no more
+ // nested arrays at that index
+ i--
+ }
+ }
+ return list
+ }
+
+ function insertNode(parentElement, node, index) {
+ parentElement.insertBefore(node,
+ parentElement.childNodes[index] || null)
+ }
+
+ var DELETION = 1
+ var INSERTION = 2
+ var MOVE = 3
+
+ function handleKeysDiffer(data, existing, cached, parentElement) {
+ forKeys(data, function (key, i) {
+ existing[key = key.key] = existing[key] ? {
+ action: MOVE,
+ index: i,
+ from: existing[key].index,
+ element: cached.nodes[existing[key].index] ||
+ $document.createElement("div")
+ } : {action: INSERTION, index: i}
+ })
+
+ var actions = []
+ for (var prop in existing) {
+ if (hasOwn.call(existing, prop)) {
+ actions.push(existing[prop])
+ }
+ }
+
+ var changes = actions.sort(sortChanges)
+ var newCached = new Array(cached.length)
+
+ newCached.nodes = cached.nodes.slice()
+
+ forEach(changes, function (change) {
+ var index = change.index
+ if (change.action === DELETION) {
+ clear(cached[index].nodes, cached[index])
+ newCached.splice(index, 1)
+ }
+ if (change.action === INSERTION) {
+ var dummy = $document.createElement("div")
+ dummy.key = data[index].attrs.key
+ insertNode(parentElement, dummy, index)
+ newCached.splice(index, 0, {
+ attrs: {key: data[index].attrs.key},
+ nodes: [dummy]
+ })
+ newCached.nodes[index] = dummy
+ }
+
+ if (change.action === MOVE) {
+ var changeElement = change.element
+ var maybeChanged = parentElement.childNodes[index]
+ if (maybeChanged !== changeElement && changeElement !== null) {
+ parentElement.insertBefore(changeElement,
+ maybeChanged || null)
+ }
+ newCached[index] = cached[change.from]
+ newCached.nodes[index] = changeElement
+ }
+ })
+
+ return newCached
+ }
+
+ function diffKeys(data, cached, existing, parentElement) {
+ var keysDiffer = data.length !== cached.length
+
+ if (!keysDiffer) {
+ forKeys(data, function (attrs, i) {
+ var cachedCell = cached[i]
+ return keysDiffer = cachedCell &&
+ cachedCell.attrs &&
+ cachedCell.attrs.key !== attrs.key
+ })
+ }
+
+ if (keysDiffer) {
+ return handleKeysDiffer(data, existing, cached, parentElement)
+ } else {
+ return cached
+ }
+ }
+
+ function diffArray(data, cached, nodes) {
+ // diff the array itself
+
+ // update the list of DOM nodes by collecting the nodes from each item
+ forEach(data, function (_, i) {
+ if (cached[i] != null) nodes.push.apply(nodes, cached[i].nodes)
+ })
+ // remove items from the end of the array if the new array is shorter
+ // than the old one. if errors ever happen here, the issue is most
+ // likely a bug in the construction of the `cached` data structure
+ // somewhere earlier in the program
+ forEach(cached.nodes, function (node, i) {
+ if (node.parentNode != null && nodes.indexOf(node) < 0) {
+ clear([node], [cached[i]])
+ }
+ })
+
+ if (data.length < cached.length) cached.length = data.length
+ cached.nodes = nodes
+ }
+
+ function buildArrayKeys(data) {
+ var guid = 0
+ forKeys(data, function () {
+ forEach(data, function (attrs) {
+ if ((attrs = attrs && attrs.attrs) && attrs.key == null) {
+ attrs.key = "__mithril__" + guid++
+ }
+ })
+ return 1
+ })
+ }
+
+ function isDifferentEnough(data, cached, dataAttrKeys) {
+ if (data.tag !== cached.tag) return true
+
+ if (dataAttrKeys.sort().join() !==
+ Object.keys(cached.attrs).sort().join()) {
+ return true
+ }
+
+ if (data.attrs.id !== cached.attrs.id) {
+ return true
+ }
+
+ if (data.attrs.key !== cached.attrs.key) {
+ return true
+ }
+
+ if (m.redraw.strategy() === "all") {
+ return !cached.configContext || cached.configContext.retain !== true
+ }
+
+ if (m.redraw.strategy() === "diff") {
+ return cached.configContext && cached.configContext.retain === false
+ }
+
+ return false
+ }
+
+ function maybeRecreateObject(data, cached, dataAttrKeys) {
+ // if an element is different enough from the one in cache, recreate it
+ if (isDifferentEnough(data, cached, dataAttrKeys)) {
+ if (cached.nodes.length) clear(cached.nodes)
+
+ if (cached.configContext &&
+ isFunction(cached.configContext.onunload)) {
+ cached.configContext.onunload()
+ }
+
+ if (cached.controllers) {
+ forEach(cached.controllers, function (controller) {
+ if (controller.onunload) {
+ controller.onunload({preventDefault: noop})
+ }
+ })
+ }
+ }
+ }
+
+ function getObjectNamespace(data, namespace) {
+ if (data.attrs.xmlns) return data.attrs.xmlns
+ if (data.tag === "svg") return "http://www.w3.org/2000/svg"
+ if (data.tag === "math") return "http://www.w3.org/1998/Math/MathML"
+ return namespace
+ }
+
+ var pendingRequests = 0
+ m.startComputation = function () { pendingRequests++ }
+ m.endComputation = function () {
+ if (pendingRequests > 1) {
+ pendingRequests--
+ } else {
+ pendingRequests = 0
+ m.redraw()
+ }
+ }
+
+ function unloadCachedControllers(cached, views, controllers) {
+ if (controllers.length) {
+ cached.views = views
+ cached.controllers = controllers
+ forEach(controllers, function (controller) {
+ if (controller.onunload && controller.onunload.$old) {
+ controller.onunload = controller.onunload.$old
+ }
+
+ if (pendingRequests && controller.onunload) {
+ var onunload = controller.onunload
+ controller.onunload = noop
+ controller.onunload.$old = onunload
+ }
+ })
+ }
+ }
+
+ function scheduleConfigsToBeCalled(configs, data, node, isNew, cached) {
+ // schedule configs to be called. They are called after `build` finishes
+ // running
+ if (isFunction(data.attrs.config)) {
+ var context = cached.configContext = cached.configContext || {}
+
+ // bind
+ configs.push(function () {
+ return data.attrs.config.call(data, node, !isNew, context,
+ cached)
+ })
+ }
+ }
+
+ function buildUpdatedNode(
+ cached,
+ data,
+ editable,
+ hasKeys,
+ namespace,
+ views,
+ configs,
+ controllers
+ ) {
+ var node = cached.nodes[0]
+
+ if (hasKeys) {
+ setAttributes(node, data.tag, data.attrs, cached.attrs, namespace)
+ }
+
+ cached.children = build(
+ node,
+ data.tag,
+ undefined,
+ undefined,
+ data.children,
+ cached.children,
+ false,
+ 0,
+ data.attrs.contenteditable ? node : editable,
+ namespace,
+ configs
+ )
+
+ cached.nodes.intact = true
+
+ if (controllers.length) {
+ cached.views = views
+ cached.controllers = controllers
+ }
+
+ return node
+ }
+
+ function handleNonexistentNodes(data, parentElement, index) {
+ var nodes
+ if (data.$trusted) {
+ nodes = injectHTML(parentElement, index, data)
+ } else {
+ nodes = [$document.createTextNode(data)]
+ if (!(parentElement.nodeName in voidElements)) {
+ insertNode(parentElement, nodes[0], index)
+ }
+ }
+
+ var cached
+
+ if (typeof data === "string" ||
+ typeof data === "number" ||
+ typeof data === "boolean") {
+ cached = new data.constructor(data)
+ } else {
+ cached = data
+ }
+
+ cached.nodes = nodes
+ return cached
+ }
+
+ function reattachNodes(
+ data,
+ cached,
+ parentElement,
+ editable,
+ index,
+ parentTag
+ ) {
+ var nodes = cached.nodes
+ if (!editable || editable !== $document.activeElement) {
+ if (data.$trusted) {
+ clear(nodes, cached)
+ nodes = injectHTML(parentElement, index, data)
+ } else if (parentTag === "textarea") {
+ // <textarea> uses `value` instead of `nodeValue`.
+ parentElement.value = data
+ } else if (editable) {
+ // contenteditable nodes use `innerHTML` instead of `nodeValue`.
+ editable.innerHTML = data
+ } else {
+ // was a trusted string
+ if (nodes[0].nodeType === 1 || nodes.length > 1 ||
+ (nodes[0].nodeValue.trim &&
+ !nodes[0].nodeValue.trim())) {
+ clear(cached.nodes, cached)
+ nodes = [$document.createTextNode(data)]
+ }
+
+ injectTextNode(parentElement, nodes[0], index, data)
+ }
+ }
+ cached = new data.constructor(data)
+ cached.nodes = nodes
+ return cached
+ }
+
+ function handleTextNode(
+ cached,
+ data,
+ index,
+ parentElement,
+ shouldReattach,
+ editable,
+ parentTag
+ ) {
+ if (!cached.nodes.length) {
+ return handleNonexistentNodes(data, parentElement, index)
+ } else if (cached.valueOf() !== data.valueOf() || shouldReattach) {
+ return reattachNodes(data, cached, parentElement, editable, index,
+ parentTag)
+ } else {
+ return (cached.nodes.intact = true, cached)
+ }
+ }
+
+ function getSubArrayCount(item) {
+ if (item.$trusted) {
+ // fix offset of next element if item was a trusted string w/ more
+ // than one html element
+ // the first clause in the regexp matches elements
+ // the second clause (after the pipe) matches text nodes
+ var match = item.match(/<[^\/]|\>\s*[^<]/g)
+ if (match != null) return match.length
+ } else if (isArray(item)) {
+ return item.length
+ }
+ return 1
+ }
+
+ function buildArray(
+ data,
+ cached,
+ parentElement,
+ index,
+ parentTag,
+ shouldReattach,
+ editable,
+ namespace,
+ configs
+ ) {
+ data = flatten(data)
+ var nodes = []
+ var intact = cached.length === data.length
+ var subArrayCount = 0
+
+ // keys algorithm: sort elements without recreating them if keys are
+ // present
+ //
+ // 1) create a map of all existing keys, and mark all for deletion
+ // 2) add new keys to map and mark them for addition
+ // 3) if key exists in new list, change action from deletion to a move
+ // 4) for each key, handle its corresponding action as marked in
+ // previous steps
+
+ var existing = {}
+ var shouldMaintainIdentities = false
+
+ forKeys(cached, function (attrs, i) {
+ shouldMaintainIdentities = true
+ existing[cached[i].attrs.key] = {action: DELETION, index: i}
+ })
+
+ buildArrayKeys(data)
+ if (shouldMaintainIdentities) {
+ cached = diffKeys(data, cached, existing, parentElement)
+ }
+ // end key algorithm
+
+ var cacheCount = 0
+ // faster explicitly written
+ for (var i = 0, len = data.length; i < len; i++) {
+ // diff each item in the array
+ var item = build(
+ parentElement,
+ parentTag,
+ cached,
+ index,
+ data[i],
+ cached[cacheCount],
+ shouldReattach,
+ index + subArrayCount || subArrayCount,
+ editable,
+ namespace,
+ configs)
+
+ if (item !== undefined) {
+ intact = intact && item.nodes.intact
+ subArrayCount += getSubArrayCount(item)
+ cached[cacheCount++] = item
+ }
+ }
+
+ if (!intact) diffArray(data, cached, nodes)
+ return cached
+ }
+
+ function makeCache(data, cached, index, parentIndex, parentCache) {
+ if (cached != null) {
+ if (type.call(cached) === type.call(data)) return cached
+
+ if (parentCache && parentCache.nodes) {
+ var offset = index - parentIndex
+ var end = offset + (isArray(data) ? data : cached.nodes).length
+ clear(
+ parentCache.nodes.slice(offset, end),
+ parentCache.slice(offset, end))
+ } else if (cached.nodes) {
+ clear(cached.nodes, cached)
+ }
+ }
+
+ cached = new data.constructor()
+ // if constructor creates a virtual dom element, use a blank object as
+ // the base cached node instead of copying the virtual el (#277)
+ if (cached.tag) cached = {}
+ cached.nodes = []
+ return cached
+ }
+
+ function constructNode(data, namespace) {
+ if (data.attrs.is) {
+ if (namespace == null) {
+ return $document.createElement(data.tag, data.attrs.is)
+ } else {
+ return $document.createElementNS(namespace, data.tag,
+ data.attrs.is)
+ }
+ } else if (namespace == null) {
+ return $document.createElement(data.tag)
+ } else {
+ return $document.createElementNS(namespace, data.tag)
+ }
+ }
+
+ function constructAttrs(data, node, namespace, hasKeys) {
+ if (hasKeys) {
+ return setAttributes(node, data.tag, data.attrs, {}, namespace)
+ } else {
+ return data.attrs
+ }
+ }
+
+ function constructChildren(
+ data,
+ node,
+ cached,
+ editable,
+ namespace,
+ configs
+ ) {
+ if (data.children != null && data.children.length > 0) {
+ return build(
+ node,
+ data.tag,
+ undefined,
+ undefined,
+ data.children,
+ cached.children,
+ true,
+ 0,
+ data.attrs.contenteditable ? node : editable,
+ namespace,
+ configs)
+ } else {
+ return data.children
+ }
+ }
+
+ function reconstructCached(
+ data,
+ attrs,
+ children,
+ node,
+ namespace,
+ views,
+ controllers
+ ) {
+ var cached = {
+ tag: data.tag,
+ attrs: attrs,
+ children: children,
+ nodes: [node]
+ }
+
+ unloadCachedControllers(cached, views, controllers)
+
+ if (cached.children && !cached.children.nodes) {
+ cached.children.nodes = []
+ }
+
+ // edge case: setting value on <select> doesn't work before children
+ // exist, so set it again after children have been created
+ if (data.tag === "select" && "value" in data.attrs) {
+ setAttributes(node, data.tag, {value: data.attrs.value}, {},
+ namespace)
+ }
+
+ return cached
+ }
+
+ function getController(views, view, cachedControllers, controller) {
+ var controllerIndex
+
+ if (m.redraw.strategy() === "diff" && views) {
+ controllerIndex = views.indexOf(view)
+ } else {
+ controllerIndex = -1
+ }
+
+ if (controllerIndex > -1) {
+ return cachedControllers[controllerIndex]
+ } else if (isFunction(controller)) {
+ return new controller()
+ } else {
+ return {}
+ }
+ }
+
+ var unloaders = []
+
+ function updateLists(views, controllers, view, controller) {
+ if (controller.onunload != null &&
+ unloaders.map(function (u) { return u.handler })
+ .indexOf(controller.onunload) < 0) {
+ unloaders.push({
+ controller: controller,
+ handler: controller.onunload
+ })
+ }
+
+ views.push(view)
+ controllers.push(controller)
+ }
+
+ var forcing = false
+ function checkView(
+ data,
+ view,
+ cached,
+ cachedControllers,
+ controllers,
+ views
+ ) {
+ var controller = getController(
+ cached.views,
+ view,
+ cachedControllers,
+ data.controller)
+
+ var key = data && data.attrs && data.attrs.key
+
+ if (pendingRequests === 0 ||
+ forcing ||
+ cachedControllers &&
+ cachedControllers.indexOf(controller) > -1) {
+ data = data.view(controller)
+ } else {
+ data = {tag: "placeholder"}
+ }
+
+ if (data.subtree === "retain") return data
+ data.attrs = data.attrs || {}
+ data.attrs.key = key
+ updateLists(views, controllers, view, controller)
+ return data
+ }
+
+ function markViews(data, cached, views, controllers) {
+ var cachedControllers = cached && cached.controllers
+
+ while (data.view != null) {
+ data = checkView(
+ data,
+ data.view.$original || data.view,
+ cached,
+ cachedControllers,
+ controllers,
+ views)
+ }
+
+ return data
+ }
+
+ function buildObject( // eslint-disable-line max-statements
+ data,
+ cached,
+ editable,
+ parentElement,
+ index,
+ shouldReattach,
+ namespace,
+ configs
+ ) {
+ var views = []
+ var controllers = []
+
+ data = markViews(data, cached, views, controllers)
+
+ if (data.subtree === "retain") return cached
+
+ if (!data.tag && controllers.length) {
+ throw new Error("Component template must return a virtual " +
+ "element, not an array, string, etc.")
+ }
+
+ data.attrs = data.attrs || {}
+ cached.attrs = cached.attrs || {}
+
+ var dataAttrKeys = Object.keys(data.attrs)
+ var hasKeys = dataAttrKeys.length > ("key" in data.attrs ? 1 : 0)
+
+ maybeRecreateObject(data, cached, dataAttrKeys)
+
+ if (!isString(data.tag)) return
+
+ var isNew = cached.nodes.length === 0
+
+ namespace = getObjectNamespace(data, namespace)
+
+ var node
+ if (isNew) {
+ node = constructNode(data, namespace)
+ // set attributes first, then create children
+ var attrs = constructAttrs(data, node, namespace, hasKeys)
+
+ // add the node to its parent before attaching children to it
+ insertNode(parentElement, node, index)
+
+ var children = constructChildren(data, node, cached, editable,
+ namespace, configs)
+
+ cached = reconstructCached(
+ data,
+ attrs,
+ children,
+ node,
+ namespace,
+ views,
+ controllers)
+ } else {
+ node = buildUpdatedNode(
+ cached,
+ data,
+ editable,
+ hasKeys,
+ namespace,
+ views,
+ configs,
+ controllers)
+ }
+
+ if (!isNew && shouldReattach === true && node != null) {
+ insertNode(parentElement, node, index)
+ }
+
+ // The configs are called after `build` finishes running
+ scheduleConfigsToBeCalled(configs, data, node, isNew, cached)
+
+ return cached
+ }
+
+ function build(
+ parentElement,
+ parentTag,
+ parentCache,
+ parentIndex,
+ data,
+ cached,
+ shouldReattach,
+ index,
+ editable,
+ namespace,
+ configs
+ ) {
+ /*
+ * `build` is a recursive function that manages creation/diffing/removal
+ * of DOM elements based on comparison between `data` and `cached` the
+ * diff algorithm can be summarized as this:
+ *
+ * 1 - compare `data` and `cached`
+ * 2 - if they are different, copy `data` to `cached` and update the DOM
+ * based on what the difference is
+ * 3 - recursively apply this algorithm for every array and for the
+ * children of every virtual element
+ *
+ * The `cached` data structure is essentially the same as the previous
+ * redraw's `data` data structure, with a few additions:
+ * - `cached` always has a property called `nodes`, which is a list of
+ * DOM elements that correspond to the data represented by the
+ * respective virtual element
+ * - in order to support attaching `nodes` as a property of `cached`,
+ * `cached` is *always* a non-primitive object, i.e. if the data was
+ * a string, then cached is a String instance. If data was `null` or
+ * `undefined`, cached is `new String("")`
+ * - `cached also has a `configContext` property, which is the state
+ * storage object exposed by config(element, isInitialized, context)
+ * - when `cached` is an Object, it represents a virtual element; when
+ * it's an Array, it represents a list of elements; when it's a
+ * String, Number or Boolean, it represents a text node
+ *
+ * `parentElement` is a DOM element used for W3C DOM API calls
+ * `parentTag` is only used for handling a corner case for textarea
+ * values
+ * `parentCache` is used to remove nodes in some multi-node cases
+ * `parentIndex` and `index` are used to figure out the offset of nodes.
+ * They're artifacts from before arrays started being flattened and are
+ * likely refactorable
+ * `data` and `cached` are, respectively, the new and old nodes being
+ * diffed
+ * `shouldReattach` is a flag indicating whether a parent node was
+ * recreated (if so, and if this node is reused, then this node must
+ * reattach itself to the new parent)
+ * `editable` is a flag that indicates whether an ancestor is
+ * contenteditable
+ * `namespace` indicates the closest HTML namespace as it cascades down
+ * from an ancestor
+ * `configs` is a list of config functions to run after the topmost
+ * `build` call finishes running
+ *
+ * there's logic that relies on the assumption that null and undefined
+ * data are equivalent to empty strings
+ * - this prevents lifecycle surprises from procedural helpers that mix
+ * implicit and explicit return statements (e.g.
+ * function foo() {if (cond) return m("div")}
+ * - it simplifies diffing code
+ */
+ data = dataToString(data)
+ if (data.subtree === "retain") return cached
+ cached = makeCache(data, cached, index, parentIndex, parentCache)
+
+ if (isArray(data)) {
+ return buildArray(
+ data,
+ cached,
+ parentElement,
+ index,
+ parentTag,
+ shouldReattach,
+ editable,
+ namespace,
+ configs)
+ } else if (data != null && isObject(data)) {
+ return buildObject(
+ data,
+ cached,
+ editable,
+ parentElement,
+ index,
+ shouldReattach,
+ namespace,
+ configs)
+ } else if (!isFunction(data)) {
+ return handleTextNode(
+ cached,
+ data,
+ index,
+ parentElement,
+ shouldReattach,
+ editable,
+ parentTag)
+ } else {
+ return cached
+ }
+ }
+
+ function sortChanges(a, b) {
+ return a.action - b.action || a.index - b.index
+ }
+
+ function copyStyleAttrs(node, dataAttr, cachedAttr) {
+ for (var rule in dataAttr) {
+ if (hasOwn.call(dataAttr, rule)) {
+ if (cachedAttr == null || cachedAttr[rule] !== dataAttr[rule]) {
+ node.style[rule] = dataAttr[rule]
+ }
+ }
+ }
+
+ for (rule in cachedAttr) {
+ if (hasOwn.call(cachedAttr, rule)) {
+ if (!hasOwn.call(dataAttr, rule)) node.style[rule] = ""
+ }
+ }
+ }
+
+ var shouldUseSetAttribute = {
+ list: 1,
+ style: 1,
+ form: 1,
+ type: 1,
+ width: 1,
+ height: 1
+ }
+
+ function setSingleAttr(
+ node,
+ attrName,
+ dataAttr,
+ cachedAttr,
+ tag,
+ namespace
+ ) {
+ if (attrName === "config" || attrName === "key") {
+ // `config` isn't a real attribute, so ignore it
+ return true
+ } else if (isFunction(dataAttr) && attrName.slice(0, 2) === "on") {
+ // hook event handlers to the auto-redrawing system
+ node[attrName] = autoredraw(dataAttr, node)
+ } else if (attrName === "style" && dataAttr != null &&
+ isObject(dataAttr)) {
+ // handle `style: {...}`
+ copyStyleAttrs(node, dataAttr, cachedAttr)
+ } else if (namespace != null) {
+ // handle SVG
+ if (attrName === "href") {
+ node.setAttributeNS("http://www.w3.org/1999/xlink",
+ "href", dataAttr)
+ } else {
+ node.setAttribute(
+ attrName === "className" ? "class" : attrName,
+ dataAttr)
+ }
+ } else if (attrName in node && !shouldUseSetAttribute[attrName]) {
+ // handle cases that are properties (but ignore cases where we
+ // should use setAttribute instead)
+ //
+ // - list and form are typically used as strings, but are DOM
+ // element references in js
+ //
+ // - when using CSS selectors (e.g. `m("[style='']")`), style is
+ // used as a string, but it's an object in js
+ //
+ // #348 don't set the value if not needed - otherwise, cursor
+ // placement breaks in Chrome
+ try {
+ if (tag !== "input" || node[attrName] !== dataAttr) {
+ node[attrName] = dataAttr
+ }
+ } catch (e) {
+ node.setAttribute(attrName, dataAttr)
+ }
+ }
+ else node.setAttribute(attrName, dataAttr)
+ }
+
+ function trySetAttr(
+ node,
+ attrName,
+ dataAttr,
+ cachedAttr,
+ cachedAttrs,
+ tag,
+ namespace
+ ) {
+ if (!(attrName in cachedAttrs) || (cachedAttr !== dataAttr) || ($document.activeElement === node)) {
+ cachedAttrs[attrName] = dataAttr
+ try {
+ return setSingleAttr(
+ node,
+ attrName,
+ dataAttr,
+ cachedAttr,
+ tag,
+ namespace)
+ } catch (e) {
+ // swallow IE's invalid argument errors to mimic HTML's
+ // fallback-to-doing-nothing-on-invalid-attributes behavior
+ if (e.message.indexOf("Invalid argument") < 0) throw e
+ }
+ } else if (attrName === "value" && tag === "input" &&
+ node.value !== dataAttr) {
+ // #348 dataAttr may not be a string, so use loose comparison
+ node.value = dataAttr
+ }
+ }
+
+ function setAttributes(node, tag, dataAttrs, cachedAttrs, namespace) {
+ for (var attrName in dataAttrs) {
+ if (hasOwn.call(dataAttrs, attrName)) {
+ if (trySetAttr(
+ node,
+ attrName,
+ dataAttrs[attrName],
+ cachedAttrs[attrName],
+ cachedAttrs,
+ tag,
+ namespace)) {
+ continue
+ }
+ }
+ }
+ return cachedAttrs
+ }
+
+ function clear(nodes, cached) {
+ for (var i = nodes.length - 1; i > -1; i--) {
+ if (nodes[i] && nodes[i].parentNode) {
+ try {
+ nodes[i].parentNode.removeChild(nodes[i])
+ } catch (e) {
+ /* eslint-disable max-len */
+ // ignore if this fails due to order of events (see
+ // http://stackoverflow.com/questions/21926083/failed-to-execute-removechild-on-node)
+ /* eslint-enable max-len */
+ }
+ cached = [].concat(cached)
+ if (cached[i]) unload(cached[i])
+ }
+ }
+ // release memory if nodes is an array. This check should fail if nodes
+ // is a NodeList (see loop above)
+ if (nodes.length) {
+ nodes.length = 0
+ }
+ }
+
+ function unload(cached) {
+ if (cached.configContext && isFunction(cached.configContext.onunload)) {
+ cached.configContext.onunload()
+ cached.configContext.onunload = null
+ }
+ if (cached.controllers) {
+ forEach(cached.controllers, function (controller) {
+ if (isFunction(controller.onunload)) {
+ controller.onunload({preventDefault: noop})
+ }
+ })
+ }
+ if (cached.children) {
+ if (isArray(cached.children)) forEach(cached.children, unload)
+ else if (cached.children.tag) unload(cached.children)
+ }
+ }
+
+ function appendTextFragment(parentElement, data) {
+ try {
+ parentElement.appendChild(
+ $document.createRange().createContextualFragment(data))
+ } catch (e) {
+ parentElement.insertAdjacentHTML("beforeend", data)
+ replaceScriptNodes(parentElement)
+ }
+ }
+
+ // Replace script tags inside given DOM element with executable ones.
+ // Will also check children recursively and replace any found script
+ // tags in same manner.
+ function replaceScriptNodes(node) {
+ if (node.tagName === "SCRIPT") {
+ node.parentNode.replaceChild(buildExecutableNode(node), node)
+ } else {
+ var children = node.childNodes
+ if (children && children.length) {
+ for (var i = 0; i < children.length; i++) {
+ replaceScriptNodes(children[i])
+ }
+ }
+ }
+
+ return node
+ }
+
+ // Replace script element with one whose contents are executable.
+ function buildExecutableNode(node){
+ var scriptEl = document.createElement("script")
+ var attrs = node.attributes
+
+ for (var i = 0; i < attrs.length; i++) {
+ scriptEl.setAttribute(attrs[i].name, attrs[i].value)
+ }
+
+ scriptEl.text = node.innerHTML
+ return scriptEl
+ }
+
+ function injectHTML(parentElement, index, data) {
+ var nextSibling = parentElement.childNodes[index]
+ if (nextSibling) {
+ var isElement = nextSibling.nodeType !== 1
+ var placeholder = $document.createElement("span")
+ if (isElement) {
+ parentElement.insertBefore(placeholder, nextSibling || null)
+ placeholder.insertAdjacentHTML("beforebegin", data)
+ parentElement.removeChild(placeholder)
+ } else {
+ nextSibling.insertAdjacentHTML("beforebegin", data)
+ }
+ } else {
+ appendTextFragment(parentElement, data)
+ }
+
+ var nodes = []
+
+ while (parentElement.childNodes[index] !== nextSibling) {
+ nodes.push(parentElement.childNodes[index])
+ index++
+ }
+
+ return nodes
+ }
+
+ function autoredraw(callback, object) {
+ return function (e) {
+ e = e || event
+ m.redraw.strategy("diff")
+ m.startComputation()
+ try {
+ return callback.call(object, e)
+ } finally {
+ endFirstComputation()
+ }
+ }
+ }
+
+ var html
+ var documentNode = {
+ appendChild: function (node) {
+ if (html === undefined) html = $document.createElement("html")
+ if ($document.documentElement &&
+ $document.documentElement !== node) {
+ $document.replaceChild(node, $document.documentElement)
+ } else {
+ $document.appendChild(node)
+ }
+
+ this.childNodes = $document.childNodes
+ },
+
+ insertBefore: function (node) {
+ this.appendChild(node)
+ },
+
+ childNodes: []
+ }
+
+ var nodeCache = []
+ var cellCache = {}
+
+ m.render = function (root, cell, forceRecreation) {
+ if (!root) {
+ throw new Error("Ensure the DOM element being passed to " +
+ "m.route/m.mount/m.render is not undefined.")
+ }
+ var configs = []
+ var id = getCellCacheKey(root)
+ var isDocumentRoot = root === $document
+ var node
+
+ if (isDocumentRoot || root === $document.documentElement) {
+ node = documentNode
+ } else {
+ node = root
+ }
+
+ if (isDocumentRoot && cell.tag !== "html") {
+ cell = {tag: "html", attrs: {}, children: cell}
+ }
+
+ if (cellCache[id] === undefined) clear(node.childNodes)
+ if (forceRecreation === true) reset(root)
+
+ cellCache[id] = build(
+ node,
+ null,
+ undefined,
+ undefined,
+ cell,
+ cellCache[id],
+ false,
+ 0,
+ null,
+ undefined,
+ configs)
+
+ forEach(configs, function (config) { config() })
+ }
+
+ function getCellCacheKey(element) {
+ var index = nodeCache.indexOf(element)
+ return index < 0 ? nodeCache.push(element) - 1 : index
+ }
+
+ m.trust = function (value) {
+ value = new String(value) // eslint-disable-line no-new-wrappers
+ value.$trusted = true
+ return value
+ }
+
+ function gettersetter(store) {
+ function prop() {
+ if (arguments.length) store = arguments[0]
+ return store
+ }
+
+ prop.toJSON = function () {
+ return store
+ }
+
+ return prop
+ }
+
+ m.prop = function (store) {
+ if ((store != null && (isObject(store) || isFunction(store)) || ((typeof Promise !== "undefined") && (store instanceof Promise))) &&
+ isFunction(store.then)) {
+ return propify(store)
+ }
+
+ return gettersetter(store)
+ }
+
+ var roots = []
+ var components = []
+ var controllers = []
+ var lastRedrawId = null
+ var lastRedrawCallTime = 0
+ var computePreRedrawHook = null
+ var computePostRedrawHook = null
+ var topComponent
+ var FRAME_BUDGET = 16 // 60 frames per second = 1 call per 16 ms
+
+ function parameterize(component, args) {
+ function controller() {
+ /* eslint-disable no-invalid-this */
+ return (component.controller || noop).apply(this, args) || this
+ /* eslint-enable no-invalid-this */
+ }
+
+ if (component.controller) {
+ controller.prototype = component.controller.prototype
+ }
+
+ function view(ctrl) {
+ var currentArgs = [ctrl].concat(args)
+ for (var i = 1; i < arguments.length; i++) {
+ currentArgs.push(arguments[i])
+ }
+
+ return component.view.apply(component, currentArgs)
+ }
+
+ view.$original = component.view
+ var output = {controller: controller, view: view}
+ if (args[0] && args[0].key != null) output.attrs = {key: args[0].key}
+ return output
+ }
+
+ m.component = function (component) {
+ var args = new Array(arguments.length - 1)
+
+ for (var i = 1; i < arguments.length; i++) {
+ args[i - 1] = arguments[i]
+ }
+
+ return parameterize(component, args)
+ }
+
+ function checkPrevented(component, root, index, isPrevented) {
+ if (!isPrevented) {
+ m.redraw.strategy("all")
+ m.startComputation()
+ roots[index] = root
+ var currentComponent
+
+ if (component) {
+ currentComponent = topComponent = component
+ } else {
+ currentComponent = topComponent = component = {controller: noop}
+ }
+
+ var controller = new (component.controller || noop)()
+
+ // controllers may call m.mount recursively (via m.route redirects,
+ // for example)
+ // this conditional ensures only the last recursive m.mount call is
+ // applied
+ if (currentComponent === topComponent) {
+ controllers[index] = controller
+ components[index] = component
+ }
+ endFirstComputation()
+ if (component === null) {
+ removeRootElement(root, index)
+ }
+ return controllers[index]
+ } else if (component == null) {
+ removeRootElement(root, index)
+ }
+ }
+
+ m.mount = m.module = function (root, component) {
+ if (!root) {
+ throw new Error("Please ensure the DOM element exists before " +
+ "rendering a template into it.")
+ }
+
+ var index = roots.indexOf(root)
+ if (index < 0) index = roots.length
+
+ var isPrevented = false
+ var event = {
+ preventDefault: function () {
+ isPrevented = true
+ computePreRedrawHook = computePostRedrawHook = null
+ }
+ }
+
+ forEach(unloaders, function (unloader) {
+ unloader.handler.call(unloader.controller, event)
+ unloader.controller.onunload = null
+ })
+
+ if (isPrevented) {
+ forEach(unloaders, function (unloader) {
+ unloader.controller.onunload = unloader.handler
+ })
+ } else {
+ unloaders = []
+ }
+
+ if (controllers[index] && isFunction(controllers[index].onunload)) {
+ controllers[index].onunload(event)
+ }
+
+ return checkPrevented(component, root, index, isPrevented)
+ }
+
+ function removeRootElement(root, index) {
+ roots.splice(index, 1)
+ controllers.splice(index, 1)
+ components.splice(index, 1)
+ reset(root)
+ nodeCache.splice(getCellCacheKey(root), 1)
+ }
+
+ var redrawing = false
+ m.redraw = function (force) {
+ if (redrawing) return
+ redrawing = true
+ if (force) forcing = true
+
+ try {
+ // lastRedrawId is a positive number if a second redraw is requested
+ // before the next animation frame
+ // lastRedrawId is null if it's the first redraw and not an event
+ // handler
+ if (lastRedrawId && !force) {
+ // when setTimeout: only reschedule redraw if time between now
+ // and previous redraw is bigger than a frame, otherwise keep
+ // currently scheduled timeout
+ // when rAF: always reschedule redraw
+ if ($requestAnimationFrame === global.requestAnimationFrame ||
+ new Date() - lastRedrawCallTime > FRAME_BUDGET) {
+ if (lastRedrawId > 0) $cancelAnimationFrame(lastRedrawId)
+ lastRedrawId = $requestAnimationFrame(redraw, FRAME_BUDGET)
+ }
+ } else {
+ redraw()
+ lastRedrawId = $requestAnimationFrame(function () {
+ lastRedrawId = null
+ }, FRAME_BUDGET)
+ }
+ } finally {
+ redrawing = forcing = false
+ }
+ }
+
+ m.redraw.strategy = m.prop()
+ function redraw() {
+ if (computePreRedrawHook) {
+ computePreRedrawHook()
+ computePreRedrawHook = null
+ }
+ forEach(roots, function (root, i) {
+ var component = components[i]
+ if (controllers[i]) {
+ var args = [controllers[i]]
+ m.render(root,
+ component.view ? component.view(controllers[i], args) : "")
+ }
+ })
+ // after rendering within a routed context, we need to scroll back to
+ // the top, and fetch the document title for history.pushState
+ if (computePostRedrawHook) {
+ computePostRedrawHook()
+ computePostRedrawHook = null
+ }
+ lastRedrawId = null
+ lastRedrawCallTime = new Date()
+ m.redraw.strategy("diff")
+ }
+
+ function endFirstComputation() {
+ if (m.redraw.strategy() === "none") {
+ pendingRequests--
+ m.redraw.strategy("diff")
+ } else {
+ m.endComputation()
+ }
+ }
+
+ m.withAttr = function (prop, withAttrCallback, callbackThis) {
+ return function (e) {
+ e = e || window.event
+ /* eslint-disable no-invalid-this */
+ var currentTarget = e.currentTarget || this
+ var _this = callbackThis || this
+ /* eslint-enable no-invalid-this */
+ var target = prop in currentTarget ?
+ currentTarget[prop] :
+ currentTarget.getAttribute(prop)
+ withAttrCallback.call(_this, target)
+ }
+ }
+
+ // routing
+ var modes = {pathname: "", hash: "#", search: "?"}
+ var redirect = noop
+ var isDefaultRoute = false
+ var routeParams, currentRoute
+
+ m.route = function (root, arg1, arg2, vdom) { // eslint-disable-line
+ // m.route()
+ if (arguments.length === 0) return currentRoute
+ // m.route(el, defaultRoute, routes)
+ if (arguments.length === 3 && isString(arg1)) {
+ redirect = function (source) {
+ var path = currentRoute = normalizeRoute(source)
+ if (!routeByValue(root, arg2, path)) {
+ if (isDefaultRoute) {
+ throw new Error("Ensure the default route matches " +
+ "one of the routes defined in m.route")
+ }
+
+ isDefaultRoute = true
+ m.route(arg1, true)
+ isDefaultRoute = false
+ }
+ }
+
+ var listener = m.route.mode === "hash" ?
+ "onhashchange" :
+ "onpopstate"
+
+ global[listener] = function () {
+ var path = $location[m.route.mode]
+ if (m.route.mode === "pathname") path += $location.search
+ if (currentRoute !== normalizeRoute(path)) redirect(path)
+ }
+
+ computePreRedrawHook = setScroll
+ global[listener]()
+
+ return
+ }
+
+ // config: m.route
+ if (root.addEventListener || root.attachEvent) {
+ var base = m.route.mode !== "pathname" ? $location.pathname : ""
+ root.href = base + modes[m.route.mode] + vdom.attrs.href
+ if (root.addEventListener) {
+ root.removeEventListener("click", routeUnobtrusive)
+ root.addEventListener("click", routeUnobtrusive)
+ } else {
+ root.detachEvent("onclick", routeUnobtrusive)
+ root.attachEvent("onclick", routeUnobtrusive)
+ }
+
+ return
+ }
+ // m.route(route, params, shouldReplaceHistoryEntry)
+ if (isString(root)) {
+ var oldRoute = currentRoute
+ currentRoute = root
+
+ var args = arg1 || {}
+ var queryIndex = currentRoute.indexOf("?")
+ var params
+
+ if (queryIndex > -1) {
+ params = parseQueryString(currentRoute.slice(queryIndex + 1))
+ } else {
+ params = {}
+ }
+
+ for (var i in args) {
+ if (hasOwn.call(args, i)) {
+ params[i] = args[i]
+ }
+ }
+
+ var querystring = buildQueryString(params)
+ var currentPath
+
+ if (queryIndex > -1) {
+ currentPath = currentRoute.slice(0, queryIndex)
+ } else {
+ currentPath = currentRoute
+ }
+
+ if (querystring) {
+ currentRoute = currentPath +
+ (currentPath.indexOf("?") === -1 ? "?" : "&") +
+ querystring
+ }
+
+ var replaceHistory =
+ (arguments.length === 3 ? arg2 : arg1) === true ||
+ oldRoute === root
+
+ if (global.history.pushState) {
+ var method = replaceHistory ? "replaceState" : "pushState"
+ computePreRedrawHook = setScroll
+ computePostRedrawHook = function () {
+ try {
+ global.history[method](null, $document.title,
+ modes[m.route.mode] + currentRoute)
+ } catch (err) {
+ // In the event of a pushState or replaceState failure,
+ // fallback to a standard redirect. This is specifically
+ // to address a Safari security error when attempting to
+ // call pushState more than 100 times.
+ $location[m.route.mode] = currentRoute
+ }
+ }
+ redirect(modes[m.route.mode] + currentRoute)
+ } else {
+ $location[m.route.mode] = currentRoute
+ redirect(modes[m.route.mode] + currentRoute)
+ }
+ }
+ }
+
+ m.route.param = function (key) {
+ if (!routeParams) {
+ throw new Error("You must call m.route(element, defaultRoute, " +
+ "routes) before calling m.route.param()")
+ }
+
+ if (!key) {
+ return routeParams
+ }
+
+ return routeParams[key]
+ }
+
+ m.route.mode = "search"
+
+ function normalizeRoute(route) {
+ return route.slice(modes[m.route.mode].length)
+ }
+
+ function routeByValue(root, router, path) {
+ routeParams = {}
+
+ var queryStart = path.indexOf("?")
+ if (queryStart !== -1) {
+ routeParams = parseQueryString(
+ path.substr(queryStart + 1, path.length))
+ path = path.substr(0, queryStart)
+ }
+
+ // Get all routes and check if there's
+ // an exact match for the current path
+ var keys = Object.keys(router)
+ var index = keys.indexOf(path)
+
+ if (index !== -1){
+ m.mount(root, router[keys [index]])
+ return true
+ }
+
+ for (var route in router) {
+ if (hasOwn.call(router, route)) {
+ if (route === path) {
+ m.mount(root, router[route])
+ return true
+ }
+
+ var matcher = new RegExp("^" + route
+ .replace(/:[^\/]+?\.{3}/g, "(.*?)")
+ .replace(/:[^\/]+/g, "([^\\/]+)") + "\/?$")
+
+ if (matcher.test(path)) {
+ /* eslint-disable no-loop-func */
+ path.replace(matcher, function () {
+ var keys = route.match(/:[^\/]+/g) || []
+ var values = [].slice.call(arguments, 1, -2)
+ forEach(keys, function (key, i) {
+ routeParams[key.replace(/:|\./g, "")] =
+ decodeURIComponent(values[i])
+ })
+ m.mount(root, router[route])
+ })
+ /* eslint-enable no-loop-func */
+ return true
+ }
+ }
+ }
+ }
+
+ function routeUnobtrusive(e) {
+ e = e || event
+ if (e.ctrlKey || e.metaKey || e.shiftKey || e.which === 2) return
+
+ if (e.preventDefault) {
+ e.preventDefault()
+ } else {
+ e.returnValue = false
+ }
+
+ var currentTarget = e.currentTarget || e.srcElement
+ var args
+
+ if (m.route.mode === "pathname" && currentTarget.search) {
+ args = parseQueryString(currentTarget.search.slice(1))
+ } else {
+ args = {}
+ }
+
+ while (currentTarget && !/a/i.test(currentTarget.nodeName)) {
+ currentTarget = currentTarget.parentNode
+ }
+
+ // clear pendingRequests because we want an immediate route change
+ pendingRequests = 0
+ m.route(currentTarget[m.route.mode]
+ .slice(modes[m.route.mode].length), args)
+ }
+
+ function setScroll() {
+ if (m.route.mode !== "hash" && $location.hash) {
+ $location.hash = $location.hash
+ } else {
+ global.scrollTo(0, 0)
+ }
+ }
+
+ function buildQueryString(object, prefix) {
+ var duplicates = {}
+ var str = []
+
+ for (var prop in object) {
+ if (hasOwn.call(object, prop)) {
+ var key = prefix ? prefix + "[" + prop + "]" : prop
+ var value = object[prop]
+
+ if (value === null) {
+ str.push(encodeURIComponent(key))
+ } else if (isObject(value)) {
+ str.push(buildQueryString(value, key))
+ } else if (isArray(value)) {
+ var keys = []
+ duplicates[key] = duplicates[key] || {}
+ /* eslint-disable no-loop-func */
+ forEach(value, function (item) {
+ /* eslint-enable no-loop-func */
+ if (!duplicates[key][item]) {
+ duplicates[key][item] = true
+ keys.push(encodeURIComponent(key) + "=" +
+ encodeURIComponent(item))
+ }
+ })
+ str.push(keys.join("&"))
+ } else if (value !== undefined) {
+ str.push(encodeURIComponent(key) + "=" +
+ encodeURIComponent(value))
+ }
+ }
+ }
+
+ return str.join("&")
+ }
+
+ function parseQueryString(str) {
+ if (str === "" || str == null) return {}
+ if (str.charAt(0) === "?") str = str.slice(1)
+
+ var pairs = str.split("&")
+ var params = {}
+
+ forEach(pairs, function (string) {
+ var pair = string.split("=")
+ var key = decodeURIComponent(pair[0])
+ var value = pair.length === 2 ? decodeURIComponent(pair[1]) : null
+ if (params[key] != null) {
+ if (!isArray(params[key])) params[key] = [params[key]]
+ params[key].push(value)
+ }
+ else params[key] = value
+ })
+
+ return params
+ }
+
+ m.route.buildQueryString = buildQueryString
+ m.route.parseQueryString = parseQueryString
+
+ function reset(root) {
+ var cacheKey = getCellCacheKey(root)
+ clear(root.childNodes, cellCache[cacheKey])
+ cellCache[cacheKey] = undefined
+ }
+
+ m.deferred = function () {
+ var deferred = new Deferred()
+ deferred.promise = propify(deferred.promise)
+ return deferred
+ }
+
+ function propify(promise, initialValue) {
+ var prop = m.prop(initialValue)
+ promise.then(prop)
+ prop.then = function (resolve, reject) {
+ return propify(promise.then(resolve, reject), initialValue)
+ }
+
+ prop.catch = prop.then.bind(null, null)
+ return prop
+ }
+ // Promiz.mithril.js | Zolmeister | MIT
+ // a modified version of Promiz.js, which does not conform to Promises/A+
+ // for two reasons:
+ //
+ // 1) `then` callbacks are called synchronously (because setTimeout is too
+ // slow, and the setImmediate polyfill is too big
+ //
+ // 2) throwing subclasses of Error cause the error to be bubbled up instead
+ // of triggering rejection (because the spec does not account for the
+ // important use case of default browser error handling, i.e. message w/
+ // line number)
+
+ var RESOLVING = 1
+ var REJECTING = 2
+ var RESOLVED = 3
+ var REJECTED = 4
+
+ function Deferred(onSuccess, onFailure) {
+ var self = this
+ var state = 0
+ var promiseValue = 0
+ var next = []
+
+ self.promise = {}
+
+ self.resolve = function (value) {
+ if (!state) {
+ promiseValue = value
+ state = RESOLVING
+
+ fire()
+ }
+
+ return self
+ }
+
+ self.reject = function (value) {
+ if (!state) {
+ promiseValue = value
+ state = REJECTING
+
+ fire()
+ }
+
+ return self
+ }
+
+ self.promise.then = function (onSuccess, onFailure) {
+ var deferred = new Deferred(onSuccess, onFailure)
+
+ if (state === RESOLVED) {
+ deferred.resolve(promiseValue)
+ } else if (state === REJECTED) {
+ deferred.reject(promiseValue)
+ } else {
+ next.push(deferred)
+ }
+
+ return deferred.promise
+ }
+
+ function finish(type) {
+ state = type || REJECTED
+ next.map(function (deferred) {
+ if (state === RESOLVED) {
+ deferred.resolve(promiseValue)
+ } else {
+ deferred.reject(promiseValue)
+ }
+ })
+ }
+
+ function thennable(then, success, failure, notThennable) {
+ if (((promiseValue != null && isObject(promiseValue)) ||
+ isFunction(promiseValue)) && isFunction(then)) {
+ try {
+ // count protects against abuse calls from spec checker
+ var count = 0
+ then.call(promiseValue, function (value) {
+ if (count++) return
+ promiseValue = value
+ success()
+ }, function (value) {
+ if (count++) return
+ promiseValue = value
+ failure()
+ })
+ } catch (e) {
+ m.deferred.onerror(e)
+ promiseValue = e
+ failure()
+ }
+ } else {
+ notThennable()
+ }
+ }
+
+ function fire() {
+ // check if it's a thenable
+ var then
+ try {
+ then = promiseValue && promiseValue.then
+ } catch (e) {
+ m.deferred.onerror(e)
+ promiseValue = e
+ state = REJECTING
+ return fire()
+ }
+
+ if (state === REJECTING) {
+ m.deferred.onerror(promiseValue)
+ }
+
+ thennable(then, function () {
+ state = RESOLVING
+ fire()
+ }, function () {
+ state = REJECTING
+ fire()
+ }, function () {
+ try {
+ if (state === RESOLVING && isFunction(onSuccess)) {
+ promiseValue = onSuccess(promiseValue)
+ } else if (state === REJECTING && isFunction(onFailure)) {
+ promiseValue = onFailure(promiseValue)
+ state = RESOLVING
+ }
+ } catch (e) {
+ m.deferred.onerror(e)
+ promiseValue = e
+ return finish()
+ }
+
+ if (promiseValue === self) {
+ promiseValue = TypeError()
+ finish()
+ } else {
+ thennable(then, function () {
+ finish(RESOLVED)
+ }, finish, function () {
+ finish(state === RESOLVING && RESOLVED)
+ })
+ }
+ })
+ }
+ }
+
+ m.deferred.onerror = function (e) {
+ if (type.call(e) === "[object Error]" &&
+ !/ Error/.test(e.constructor.toString())) {
+ pendingRequests = 0
+ throw e
+ }
+ }
+
+ m.sync = function (args) {
+ var deferred = m.deferred()
+ var outstanding = args.length
+ var results = []
+ var method = "resolve"
+
+ function synchronizer(pos, resolved) {
+ return function (value) {
+ results[pos] = value
+ if (!resolved) method = "reject"
+ if (--outstanding === 0) {
+ deferred.promise(results)
+ deferred[method](results)
+ }
+ return value
+ }
+ }
+
+ if (args.length > 0) {
+ forEach(args, function (arg, i) {
+ arg.then(synchronizer(i, true), synchronizer(i, false))
+ })
+ } else {
+ deferred.resolve([])
+ }
+
+ return deferred.promise
+ }
+
+ function identity(value) { return value }
+
+ function handleJsonp(options) {
+ var callbackKey = options.callbackName || "mithril_callback_" +
+ new Date().getTime() + "_" +
+ (Math.round(Math.random() * 1e16)).toString(36)
+
+ var script = $document.createElement("script")
+
+ global[callbackKey] = function (resp) {
+ script.parentNode.removeChild(script)
+ options.onload({
+ type: "load",
+ target: {
+ responseText: resp
+ }
+ })
+ global[callbackKey] = undefined
+ }
+
+ script.onerror = function () {
+ script.parentNode.removeChild(script)
+
+ options.onerror({
+ type: "error",
+ target: {
+ status: 500,
+ responseText: JSON.stringify({
+ error: "Error making jsonp request"
+ })
+ }
+ })
+ global[callbackKey] = undefined
+
+ return false
+ }
+
+ script.onload = function () {
+ return false
+ }
+
+ script.src = options.url +
+ (options.url.indexOf("?") > 0 ? "&" : "?") +
+ (options.callbackKey ? options.callbackKey : "callback") +
+ "=" + callbackKey +
+ "&" + buildQueryString(options.data || {})
+
+ $document.body.appendChild(script)
+ }
+
+ function createXhr(options) {
+ var xhr = new global.XMLHttpRequest()
+ xhr.open(options.method, options.url, true, options.user,
+ options.password)
+
+ xhr.onreadystatechange = function () {
+ if (xhr.readyState === 4) {
+ if (xhr.status >= 200 && xhr.status < 300) {
+ options.onload({type: "load", target: xhr})
+ } else {
+ options.onerror({type: "error", target: xhr})
+ }
+ }
+ }
+
+ if (options.serialize === JSON.stringify &&
+ options.data &&
+ options.method !== "GET") {
+ xhr.setRequestHeader("Content-Type",
+ "application/json; charset=utf-8")
+ }
+
+ if (options.deserialize === JSON.parse) {
+ xhr.setRequestHeader("Accept", "application/json, text/*")
+ }
+
+ if (isFunction(options.config)) {
+ var maybeXhr = options.config(xhr, options)
+ if (maybeXhr != null) xhr = maybeXhr
+ }
+
+ var data = options.method === "GET" || !options.data ? "" : options.data
+
+ if (data && !isString(data) && data.constructor !== global.FormData) {
+ throw new Error("Request data should be either be a string or " +
+ "FormData. Check the `serialize` option in `m.request`")
+ }
+
+ xhr.send(data)
+ return xhr
+ }
+
+ function ajax(options) {
+ if (options.dataType && options.dataType.toLowerCase() === "jsonp") {
+ return handleJsonp(options)
+ } else {
+ return createXhr(options)
+ }
+ }
+
+ function bindData(options, data, serialize) {
+ if (options.method === "GET" && options.dataType !== "jsonp") {
+ var prefix = options.url.indexOf("?") < 0 ? "?" : "&"
+ var querystring = buildQueryString(data)
+ options.url += (querystring ? prefix + querystring : "")
+ } else {
+ options.data = serialize(data)
+ }
+ }
+
+ function parameterizeUrl(url, data) {
+ if (data) {
+ url = url.replace(/:[a-z]\w+/gi, function (token){
+ var key = token.slice(1)
+ var value = data[key] || token
+ delete data[key]
+ return value
+ })
+ }
+ return url
+ }
+
+ m.request = function (options) {
+ if (options.background !== true) m.startComputation()
+ var deferred = new Deferred()
+ var isJSONP = options.dataType &&
+ options.dataType.toLowerCase() === "jsonp"
+
+ var serialize, deserialize, extract
+
+ if (isJSONP) {
+ serialize = options.serialize =
+ deserialize = options.deserialize = identity
+
+ extract = function (jsonp) { return jsonp.responseText }
+ } else {
+ serialize = options.serialize = options.serialize || JSON.stringify
+
+ deserialize = options.deserialize =
+ options.deserialize || JSON.parse
+ extract = options.extract || function (xhr) {
+ if (xhr.responseText.length || deserialize !== JSON.parse) {
+ return xhr.responseText
+ } else {
+ return null
+ }
+ }
+ }
+
+ options.method = (options.method || "GET").toUpperCase()
+ options.url = parameterizeUrl(options.url, options.data)
+ bindData(options, options.data, serialize)
+ options.onload = options.onerror = function (ev) {
+ try {
+ ev = ev || event
+ var response = deserialize(extract(ev.target, options))
+ if (ev.type === "load") {
+ if (options.unwrapSuccess) {
+ response = options.unwrapSuccess(response, ev.target)
+ }
+
+ if (isArray(response) && options.type) {
+ forEach(response, function (res, i) {
+ response[i] = new options.type(res)
+ })
+ } else if (options.type) {
+ response = new options.type(response)
+ }
+
+ deferred.resolve(response)
+ } else {
+ if (options.unwrapError) {
+ response = options.unwrapError(response, ev.target)
+ }
+
+ deferred.reject(response)
+ }
+ } catch (e) {
+ deferred.reject(e)
+ m.deferred.onerror(e)
+ } finally {
+ if (options.background !== true) m.endComputation()
+ }
+ }
+
+ ajax(options)
+ deferred.promise = propify(deferred.promise, options.initialValue)
+ return deferred.promise
+ }
+
+ return m
+}); // eslint-disable-line
diff --git a/lib/wallet/checkable.ts b/lib/wallet/checkable.ts
index a35634e81..9fd816578 100644
--- a/lib/wallet/checkable.ts
+++ b/lib/wallet/checkable.ts
@@ -25,18 +25,39 @@
*/
export namespace Checkable {
- export function SchemaError(message) {
+
+ type Path = (number|string)[];
+
+ interface SchemaErrorConstructor {
+ new (err: string): SchemaError;
+ }
+
+ interface SchemaError {
+ name: string;
+ message: string;
+ }
+
+ interface Prop {
+ propertyKey: any;
+ checker: any;
+ type: any;
+ elementChecker?: any;
+ elementProp?: any;
+ }
+
+ export let SchemaError = (function SchemaError(message: string) {
this.name = 'SchemaError';
this.message = message;
this.stack = (<any>new Error()).stack;
- }
+ }) as any as SchemaErrorConstructor;
+
SchemaError.prototype = new Error;
let chkSym = Symbol("checkable");
- function checkNumber(target, prop, path): any {
+ function checkNumber(target: any, prop: Prop, path: Path): any {
if ((typeof target) !== "number") {
throw new SchemaError(`expected number for ${path}`);
}
@@ -44,7 +65,7 @@ export namespace Checkable {
}
- function checkString(target, prop, path): any {
+ function checkString(target: any, prop: Prop, path: Path): any {
if (typeof target !== "string") {
throw new SchemaError(`expected string for ${path}, got ${typeof target} instead`);
}
@@ -52,7 +73,7 @@ export namespace Checkable {
}
- function checkAnyObject(target, prop, path): any {
+ function checkAnyObject(target: any, prop: Prop, path: Path): any {
if (typeof target !== "object") {
throw new SchemaError(`expected (any) object for ${path}, got ${typeof target} instead`);
}
@@ -60,12 +81,12 @@ export namespace Checkable {
}
- function checkAny(target, prop, path): any {
+ function checkAny(target: any, prop: Prop, path: Path): any {
return target;
}
- function checkList(target, prop, path): any {
+ function checkList(target: any, prop: Prop, path: Path): any {
if (!Array.isArray(target)) {
throw new SchemaError(`array expected for ${path}, got ${typeof target} instead`);
}
@@ -77,7 +98,7 @@ export namespace Checkable {
}
- function checkOptional(target, prop, path): any {
+ function checkOptional(target: any, prop: Prop, path: Path): any {
console.assert(prop.propertyKey);
prop.elementChecker(target,
prop.elementProp,
@@ -86,7 +107,7 @@ export namespace Checkable {
}
- function checkValue(target, prop, path): any {
+ function checkValue(target: any, prop: Prop, path: Path): any {
let type = prop.type;
if (!type) {
throw Error(`assertion failed (prop is ${JSON.stringify(prop)})`);
@@ -123,8 +144,8 @@ export namespace Checkable {
}
- export function Class(target) {
- target.checked = (v) => {
+ export function Class(target: any) {
+ target.checked = (v: any) => {
return checkValue(v, {
propertyKey: "(root)",
type: target,
@@ -135,7 +156,7 @@ export namespace Checkable {
}
- export function Value(type) {
+ export function Value(type: any) {
if (!type) {
throw Error("Type does not exist yet (wrong order of definitions?)");
}
@@ -152,7 +173,7 @@ export namespace Checkable {
}
- export function List(type) {
+ export function List(type: any) {
let stub = {};
type(stub, "(list-element)");
let elementProp = mkChk(stub).props[0];
@@ -174,7 +195,7 @@ export namespace Checkable {
}
- export function Optional(type) {
+ export function Optional(type: any) {
let stub = {};
type(stub, "(optional-element)");
let elementProp = mkChk(stub).props[0];
@@ -230,7 +251,7 @@ export namespace Checkable {
}
- function mkChk(target) {
+ function mkChk(target: any) {
let chk = target[chkSym];
if (!chk) {
chk = {props: []};
diff --git a/lib/wallet/cryptoApi.ts b/lib/wallet/cryptoApi.ts
index a0113b2ea..2a2a7d319 100644
--- a/lib/wallet/cryptoApi.ts
+++ b/lib/wallet/cryptoApi.ts
@@ -27,9 +27,10 @@ import {Denomination} from "./types";
import {Offer} from "./wallet";
import {CoinWithDenom} from "./wallet";
import {PayCoinInfo} from "./types";
+type RegistryEntry = {resolve: any; reject: any};
export class CryptoApi {
private nextRpcId: number = 1;
- private rpcRegistry = {};
+ private rpcRegistry: {[n: number]: RegistryEntry} = {};
private cryptoWorker: Worker;
@@ -52,14 +53,14 @@ export class CryptoApi {
}
- private registerRpcId(resolve, reject): number {
+ private registerRpcId(resolve: any, reject: any): number {
let id = this.nextRpcId++;
this.rpcRegistry[id] = {resolve, reject};
return id;
}
- private doRpc<T>(methodName: string, ...args): Promise<T> {
+ private doRpc<T>(methodName: string, ...args: any[]): Promise<T> {
return new Promise<T>((resolve, reject) => {
let msg = {
operation: methodName,
diff --git a/lib/wallet/cryptoLib.ts b/lib/wallet/cryptoLib.ts
index 1acbdaa16..1ca7b856f 100644
--- a/lib/wallet/cryptoLib.ts
+++ b/lib/wallet/cryptoLib.ts
@@ -28,6 +28,7 @@ import {Offer} from "./wallet";
import {CoinWithDenom} from "./wallet";
import {CoinPaySig} from "./types";
import {Denomination} from "./types";
+import {Amount} from "./emscriptif";
export function main(worker: Worker) {
@@ -43,7 +44,7 @@ export function main(worker: Worker) {
if (typeof msg.data.operation != "string") {
console.error("RPC operation must be string");
}
- let f = RpcFunctions[msg.data.operation];
+ let f = (RpcFunctions as any)[msg.data.operation];
if (!f) {
console.error(`unknown operation: '${msg.data.operation}'`);
return;
@@ -156,7 +157,7 @@ namespace RpcFunctions {
}
- export function rsaUnblind(sig, bk, pk): string {
+ export function rsaUnblind(sig: string, bk: string, pk: string): string {
let denomSig = native.rsaUnblind(native.RsaSignature.fromCrock(sig),
native.RsaBlindingKeySecret.fromCrock(bk),
native.RsaPublicKey.fromCrock(pk));
@@ -170,11 +171,11 @@ namespace RpcFunctions {
*/
export function signDeposit(offer: Offer,
cds: CoinWithDenom[]): PayCoinInfo {
- let ret = [];
+ let ret: PayCoinInfo = [];
let amountSpent = native.Amount.getZero(cds[0].coin.currentAmount.currency);
let amountRemaining = new native.Amount(offer.contract.amount);
for (let cd of cds) {
- let coinSpend;
+ let coinSpend: Amount;
if (amountRemaining.value == 0 && amountRemaining.fraction == 0) {
break;
diff --git a/lib/wallet/db.ts b/lib/wallet/db.ts
index 6cd25ee27..5104f28fb 100644
--- a/lib/wallet/db.ts
+++ b/lib/wallet/db.ts
@@ -15,6 +15,7 @@
*/
"use strict";
+import Dictionary = _.Dictionary;
/**
* Declarations and helpers for
@@ -83,27 +84,27 @@ export function openTalerDb(): Promise<IDBDatabase> {
}
-export function exportDb(db): Promise<any> {
+export function exportDb(db: IDBDatabase): Promise<any> {
let dump = {
name: db.name,
version: db.version,
- stores: {}
+ stores: {} as Dictionary<any>,
};
return new Promise((resolve, reject) => {
- let tx = db.transaction(db.objectStoreNames);
- tx.addEventListener("complete", (e) => {
+ let tx = db.transaction(Array.from(db.objectStoreNames));
+ tx.addEventListener("complete", () => {
resolve(dump);
});
for (let i = 0; i < db.objectStoreNames.length; i++) {
let name = db.objectStoreNames[i];
- let storeDump = {};
+ let storeDump = {} as Dictionary<any>;
dump.stores[name] = storeDump;
let store = tx.objectStore(name)
.openCursor()
- .addEventListener("success", (e) => {
- let cursor = e.target.result;
+ .addEventListener("success", (e: Event) => {
+ let cursor = (e.target as any).result;
if (cursor) {
storeDump[cursor.key] = cursor.value;
cursor.continue();
diff --git a/lib/wallet/emscriptif.ts b/lib/wallet/emscriptif.ts
index 8540d15d0..1e5fb0283 100644
--- a/lib/wallet/emscriptif.ts
+++ b/lib/wallet/emscriptif.ts
@@ -36,11 +36,11 @@ const GNUNET_SYSERR = -1;
let Module = EmscWrapper.Module;
-let getEmsc: EmscWrapper.EmscFunGen = (...args) => Module.cwrap.apply(null,
+let getEmsc: EmscWrapper.EmscFunGen = (...args: any[]) => Module.cwrap.apply(null,
args);
var emsc = {
- free: (ptr) => Module._free(ptr),
+ free: (ptr: number) => Module._free(ptr),
get_value: getEmsc('TALER_WR_get_value',
'number',
['number']),
@@ -164,13 +164,12 @@ enum RandomQuality {
abstract class ArenaObject {
- private _nativePtr: number;
+ protected _nativePtr: number | undefined = undefined;
arena: Arena;
abstract destroy(): void;
constructor(arena?: Arena) {
- this.nativePtr = null;
if (!arena) {
if (arenaStack.length == 0) {
throw Error("No arena available")
@@ -192,14 +191,14 @@ abstract class ArenaObject {
}
free() {
- if (this.nativePtr !== undefined) {
+ if (this.nativePtr) {
emsc.free(this.nativePtr);
- this.nativePtr = undefined;
+ this._nativePtr = undefined;
}
}
alloc(size: number) {
- if (this.nativePtr !== undefined) {
+ if (this._nativePtr !== undefined) {
throw Error("Double allocation");
}
this.nativePtr = emscAlloc.malloc(size);
@@ -212,21 +211,22 @@ abstract class ArenaObject {
this._nativePtr = n;
}
- set nativePtr(v) {
+ set nativePtr(v: number) {
this.setNative(v);
}
get nativePtr() {
return this.getNative();
}
-
}
+
interface Arena {
put(obj: ArenaObject): void;
destroy(): void;
}
+
class DefaultArena implements Arena {
heap: Array<ArenaObject>;
@@ -234,7 +234,7 @@ class DefaultArena implements Arena {
this.heap = [];
}
- put(obj) {
+ put(obj: ArenaObject) {
this.heap.push(obj);
}
@@ -269,7 +269,7 @@ class SyncArena extends DefaultArena {
super();
}
- pub(obj) {
+ pub(obj: ArenaObject) {
super.put(obj);
if (!this.isScheduled) {
this.schedule();
@@ -308,14 +308,12 @@ export class Amount extends ArenaObject {
}
destroy() {
- if (this.nativePtr != 0) {
- emsc.free(this.nativePtr);
- }
+ super.free();
}
static getZero(currency: string, a?: Arena): Amount {
- let am = new Amount(null, a);
+ let am = new Amount(undefined, a);
let r = emsc.amount_get_zero(currency, am.getNative());
if (r != GNUNET_OK) {
throw Error("invalid currency");
@@ -442,7 +440,8 @@ abstract class PackedArenaObject extends ArenaObject {
}
alloc() {
- if (this.nativePtr === null) {
+ // FIXME: should the client be allowed to call alloc multiple times?
+ if (!this._nativePtr) {
this.nativePtr = emscAlloc.malloc(this.size());
}
}
@@ -466,7 +465,7 @@ abstract class PackedArenaObject extends ArenaObject {
b = (b + 256) % 256;
bytes.push("0".concat(b.toString(16)).slice(-2));
}
- let lines = [];
+ let lines: string[] = [];
for (let i = 0; i < bytes.length; i += 8) {
lines.push(bytes.slice(i, i + 8).join(","));
}
@@ -482,7 +481,7 @@ export class AmountNbo extends PackedArenaObject {
toJson(): any {
let a = new DefaultArena();
- let am = new Amount(null, a);
+ let am = new Amount(undefined, a);
am.fromNbo(this);
let json = am.toJson();
a.destroy();
@@ -508,7 +507,7 @@ export class EddsaPrivateKey extends PackedArenaObject {
return obj;
}
- static fromCrock: (string) => EddsaPrivateKey;
+ static fromCrock: (s: string) => EddsaPrivateKey;
}
mixinStatic(EddsaPrivateKey, fromCrock);
@@ -521,7 +520,7 @@ function fromCrock(s: string) {
}
-function mixin(obj, method, name?: string) {
+function mixin(obj: any, method: any, name?: string) {
if (!name) {
name = method.name;
}
@@ -532,7 +531,7 @@ function mixin(obj, method, name?: string) {
}
-function mixinStatic(obj, method, name?: string) {
+function mixinStatic(obj: any, method: any, name?: string) {
if (!name) {
name = method.name;
}
@@ -595,7 +594,7 @@ export class RsaBlindingKeySecret extends PackedArenaObject {
return o;
}
- static fromCrock: (string) => RsaBlindingKeySecret;
+ static fromCrock: (s: string) => RsaBlindingKeySecret;
}
mixinStatic(RsaBlindingKeySecret, fromCrock);
@@ -622,9 +621,9 @@ export class ByteArray extends PackedArenaObject {
return this.allocatedSize;
}
- constructor(desiredSize: number, init: number, a?: Arena) {
+ constructor(desiredSize: number, init?: number, a?: Arena) {
super(a);
- if (init === undefined || init === null) {
+ if (init === undefined) {
this.nativePtr = emscAlloc.malloc(desiredSize);
} else {
this.nativePtr = init;
@@ -642,7 +641,7 @@ export class ByteArray extends PackedArenaObject {
let hstr = emscAlloc.malloc(s.length + 1);
Module.writeStringToMemory(s, hstr);
let decodedLen = Math.floor((s.length * 5) / 8);
- let ba = new ByteArray(decodedLen, null, a);
+ let ba = new ByteArray(decodedLen, undefined, a);
let res = emsc.string_to_data(hstr, s.length, ba.nativePtr, decodedLen);
emsc.free(hstr);
if (res != GNUNET_OK) {
@@ -777,7 +776,7 @@ export class AbsoluteTimeNbo extends PackedArenaObject {
x.alloc();
let r = /Date\(([0-9]+)\)/;
let m = r.exec(s);
- if (m.length != 2) {
+ if (!m || m.length != 2) {
throw Error();
}
let n = parseInt(m[1]) * 1000000;
@@ -899,11 +898,11 @@ interface Encodeable {
encode(arena?: Arena): ByteArray;
}
-function makeEncode(encodeFn) {
+function makeEncode(encodeFn: any) {
function encode(arena?: Arena) {
let ptr = emscAlloc.malloc(PTR_SIZE);
let len = encodeFn(this.getNative(), ptr);
- let res = new ByteArray(len, null, arena);
+ let res = new ByteArray(len, undefined, arena);
res.setNative(Module.getValue(ptr, '*'));
emsc.free(ptr);
return res;
diff --git a/lib/wallet/helpers.ts b/lib/wallet/helpers.ts
index fd1650758..5d231fe64 100644
--- a/lib/wallet/helpers.ts
+++ b/lib/wallet/helpers.ts
@@ -24,7 +24,7 @@
import {AmountJson} from "./types";
-export function substituteFulfillmentUrl(url: string, vars) {
+export function substituteFulfillmentUrl(url: string, vars: any) {
url = url.replace("${H_contract}", vars.H_contract);
url = url.replace("${$}", "$");
return url;
@@ -42,7 +42,7 @@ export function amountToPretty(amount: AmountJson): string {
*
* See http://api.taler.net/wallet.html#general
*/
-export function canonicalizeBaseUrl(url) {
+export function canonicalizeBaseUrl(url: string) {
let x = new URI(url);
if (!x.protocol()) {
x.protocol("https");
@@ -54,10 +54,10 @@ export function canonicalizeBaseUrl(url) {
}
-export function parsePrettyAmount(pretty: string): AmountJson {
+export function parsePrettyAmount(pretty: string): AmountJson|undefined {
const res = /([0-9]+)(.[0-9]+)?\s*(\w+)/.exec(pretty);
if (!res) {
- return null;
+ return undefined;
}
return {
value: parseInt(res[1], 10),
diff --git a/lib/wallet/http.ts b/lib/wallet/http.ts
index 60f388e4b..8f82ceaff 100644
--- a/lib/wallet/http.ts
+++ b/lib/wallet/http.ts
@@ -66,19 +66,19 @@ export class BrowserHttpLib {
}
- postJson(url: string|uri.URI, body) {
+ postJson(url: string|uri.URI, body: any) {
return this.req("post", url, {req: JSON.stringify(body)});
}
- postForm(url: string|uri.URI, form) {
+ postForm(url: string|uri.URI, form: any) {
return this.req("post", url, {req: form});
}
}
export class RequestException {
- constructor(detail) {
+ constructor(detail: any) {
}
}
diff --git a/lib/wallet/query.ts b/lib/wallet/query.ts
index 4eccb696b..c7420a3f7 100644
--- a/lib/wallet/query.ts
+++ b/lib/wallet/query.ts
@@ -24,7 +24,7 @@
"use strict";
-export function Query(db) {
+export function Query(db: IDBDatabase) {
return new QueryRoot(db);
}
@@ -36,24 +36,27 @@ export interface QueryStream<T> {
indexJoin<S>(storeName: string,
indexName: string,
keyFn: (obj: any) => any): QueryStream<[T,S]>;
- filter(f: (any) => boolean): QueryStream<T>;
+ filter(f: (x: any) => boolean): QueryStream<T>;
reduce<S>(f: (v: T, acc: S) => S, start?: S): Promise<S>;
- flatMap(f: (T) => T[]): QueryStream<T>;
+ flatMap(f: (x: T) => T[]): QueryStream<T>;
}
/**
* Get an unresolved promise together with its extracted resolve / reject
* function.
- *
- * @returns {{resolve: any, reject: any, promise: Promise<T>}}
*/
function openPromise<T>() {
- let resolve, reject;
+ let resolve: ((value?: T | PromiseLike<T>) => void) | null = null;
+ let reject: ((reason?: any) => void) | null = null;
const promise = new Promise<T>((res, rej) => {
resolve = res;
reject = rej;
});
+ if (!(resolve && reject)) {
+ // Never happens, unless JS implementation is broken
+ throw Error();
+ }
return {resolve, reject, promise};
}
@@ -61,7 +64,7 @@ function openPromise<T>() {
abstract class QueryStreamBase<T> implements QueryStream<T> {
abstract subscribe(f: (isDone: boolean,
value: any,
- tx: IDBTransaction) => void);
+ tx: IDBTransaction) => void): void;
root: QueryRoot;
@@ -69,30 +72,28 @@ abstract class QueryStreamBase<T> implements QueryStream<T> {
this.root = root;
}
- flatMap(f: (T) => T[]): QueryStream<T> {
+ flatMap(f: (x: T) => T[]): QueryStream<T> {
return new QueryStreamFlatMap(this, f);
}
indexJoin<S>(storeName: string,
indexName: string,
key: any): QueryStream<[T,S]> {
- this.root.addWork(null, storeName, false);
+ this.root.addStoreAccess(storeName, false);
return new QueryStreamIndexJoin(this, storeName, indexName, key);
}
- filter(f: (any) => boolean): QueryStream<T> {
+ filter(f: (x: any) => boolean): QueryStream<T> {
return new QueryStreamFilter(this, f);
}
- reduce(f, acc?): Promise<any> {
- let leakedResolve;
- let p = new Promise((resolve, reject) => {
- leakedResolve = resolve;
- });
+ reduce<A>(f: (x: any, acc?: A) => A, init?: A): Promise<any> {
+ let {resolve, promise} = openPromise();
+ let acc = init;
this.subscribe((isDone, value) => {
if (isDone) {
- leakedResolve(acc);
+ resolve(acc);
return;
}
acc = f(value, acc);
@@ -100,22 +101,28 @@ abstract class QueryStreamBase<T> implements QueryStream<T> {
return Promise.resolve()
.then(() => this.root.finish())
- .then(() => p);
+ .then(() => promise);
}
}
+type FilterFn = (e: any) => boolean;
+type SubscribeFn = (done: boolean, value: any, tx: IDBTransaction) => void;
+
+interface FlatMapFn<T> {
+ (v: T): T[];
+}
class QueryStreamFilter<T> extends QueryStreamBase<T> {
s: QueryStreamBase<T>;
- filterFn;
+ filterFn: FilterFn;
- constructor(s: QueryStreamBase<T>, filterFn) {
+ constructor(s: QueryStreamBase<T>, filterFn: FilterFn) {
super(s.root);
this.s = s;
this.filterFn = filterFn;
}
- subscribe(f) {
+ subscribe(f: SubscribeFn) {
this.s.subscribe((isDone, value, tx) => {
if (isDone) {
f(true, undefined, tx);
@@ -131,15 +138,15 @@ class QueryStreamFilter<T> extends QueryStreamBase<T> {
class QueryStreamFlatMap<T> extends QueryStreamBase<T> {
s: QueryStreamBase<T>;
- flatMapFn;
+ flatMapFn: (v: T) => T[];
- constructor(s: QueryStreamBase<T>, flatMapFn) {
+ constructor(s: QueryStreamBase<T>, flatMapFn: (v: T) => T[]) {
super(s.root);
this.s = s;
- this.flatMap = flatMapFn;
+ this.flatMapFn = flatMapFn;
}
- subscribe(f) {
+ subscribe(f: SubscribeFn) {
this.s.subscribe((isDone, value, tx) => {
if (isDone) {
f(true, undefined, tx);
@@ -154,13 +161,13 @@ class QueryStreamFlatMap<T> extends QueryStreamBase<T> {
}
-class QueryStreamIndexJoin<T> extends QueryStreamBase<T> {
+class QueryStreamIndexJoin<T,S> extends QueryStreamBase<[T, S]> {
s: QueryStreamBase<T>;
- storeName;
- key;
- indexName;
+ storeName: string;
+ key: any;
+ indexName: string;
- constructor(s, storeName: string, indexName: string, key: any) {
+ constructor(s: QueryStreamBase<T>, storeName: string, indexName: string, key: any) {
super(s.root);
this.s = s;
this.storeName = storeName;
@@ -168,7 +175,7 @@ class QueryStreamIndexJoin<T> extends QueryStreamBase<T> {
this.indexName = indexName;
}
- subscribe(f) {
+ subscribe(f: SubscribeFn) {
this.s.subscribe((isDone, value, tx) => {
if (isDone) {
f(true, undefined, tx);
@@ -192,31 +199,31 @@ class QueryStreamIndexJoin<T> extends QueryStreamBase<T> {
class IterQueryStream<T> extends QueryStreamBase<T> {
- private storeName;
- private options;
- private subscribers;
+ private storeName: string;
+ private options: any;
+ private subscribers: SubscribeFn[];
- constructor(qr, storeName, options) {
+ constructor(qr: QueryRoot, storeName: string, options: any) {
super(qr);
this.options = options;
this.storeName = storeName;
this.subscribers = [];
- let doIt = (tx) => {
+ let doIt = (tx: IDBTransaction) => {
const {indexName = void 0, only = void 0} = this.options;
- let s;
+ let s: any;
if (indexName !== void 0) {
s = tx.objectStore(this.storeName)
.index(this.options.indexName);
} else {
s = tx.objectStore(this.storeName);
}
- let kr = undefined;
- if (only !== void 0) {
+ let kr: IDBKeyRange|undefined = undefined;
+ if (only !== undefined) {
kr = IDBKeyRange.only(this.options.only);
}
let req = s.openCursor(kr);
- req.onsuccess = (e) => {
+ req.onsuccess = () => {
let cursor: IDBCursorWithValue = req.result;
if (cursor) {
for (let f of this.subscribers) {
@@ -231,32 +238,33 @@ class IterQueryStream<T> extends QueryStreamBase<T> {
}
};
- this.root.addWork(doIt, null, false);
+ this.root.addWork(doIt);
}
- subscribe(f) {
+ subscribe(f: SubscribeFn) {
this.subscribers.push(f);
}
}
class QueryRoot {
- private work = [];
+ private work: ((t: IDBTransaction) => void)[] = [];
private db: IDBDatabase;
private stores = new Set();
- private kickoffPromise;
+ private kickoffPromise: Promise<void>;
/**
* Some operations is a write operation,
* and we need to do a "readwrite" transaction/
*/
- private hasWrite;
+ private hasWrite: boolean;
- constructor(db) {
+ constructor(db: IDBDatabase) {
this.db = db;
}
- iter<T>(storeName, {only = void 0, indexName = void 0} = {}): QueryStream<T> {
+ iter<T>(storeName: string,
+ {only = <string|undefined>undefined, indexName = <string|undefined>undefined} = {}): QueryStream<T> {
this.stores.add(storeName);
return new IterQueryStream(this, storeName, {only, indexName});
}
@@ -266,7 +274,7 @@ class QueryRoot {
* Overrides if an existing object with the same key exists
* in the store.
*/
- put(storeName, val): QueryRoot {
+ put(storeName: string, val: any): QueryRoot {
let doPut = (tx: IDBTransaction) => {
tx.objectStore(storeName).put(val);
};
@@ -280,7 +288,7 @@ class QueryRoot {
* Fails if the object's key is already present
* in the object store.
*/
- putAll(storeName, iterable): QueryRoot {
+ putAll(storeName: string, iterable: any[]): QueryRoot {
const doPutAll = (tx: IDBTransaction) => {
for (const obj of iterable) {
tx.objectStore(storeName).put(obj);
@@ -295,7 +303,7 @@ class QueryRoot {
* Fails if the object's key is already present
* in the object store.
*/
- add(storeName, val): QueryRoot {
+ add(storeName: string, val: any): QueryRoot {
const doAdd = (tx: IDBTransaction) => {
tx.objectStore(storeName).add(val);
};
@@ -306,16 +314,16 @@ class QueryRoot {
/**
* Get one object from a store by its key.
*/
- get(storeName, key): Promise<any> {
+ get(storeName: any, key: any): Promise<any> {
if (key === void 0) {
throw Error("key must not be undefined");
}
const {resolve, promise} = openPromise();
- const doGet = (tx) => {
+ const doGet = (tx: IDBTransaction) => {
const req = tx.objectStore(storeName).get(key);
- req.onsuccess = (r) => {
+ req.onsuccess = () => {
resolve(req.result);
};
};
@@ -329,16 +337,16 @@ class QueryRoot {
/**
* Get one object from a store by its key.
*/
- getIndexed(storeName, indexName, key): Promise<any> {
+ getIndexed(storeName: string, indexName: string, key: any): Promise<any> {
if (key === void 0) {
throw Error("key must not be undefined");
}
const {resolve, promise} = openPromise();
- const doGetIndexed = (tx) => {
+ const doGetIndexed = (tx: IDBTransaction) => {
const req = tx.objectStore(storeName).index(indexName).get(key);
- req.onsuccess = (r) => {
+ req.onsuccess = () => {
resolve(req.result);
};
};
@@ -356,7 +364,7 @@ class QueryRoot {
if (this.kickoffPromise) {
return this.kickoffPromise;
}
- this.kickoffPromise = new Promise((resolve, reject) => {
+ this.kickoffPromise = new Promise<void>((resolve, reject) => {
if (this.work.length == 0) {
resolve();
return;
@@ -376,8 +384,8 @@ class QueryRoot {
/**
* Delete an object by from the given object store.
*/
- delete(storeName: string, key): QueryRoot {
- const doDelete = (tx) => {
+ delete(storeName: string, key: any): QueryRoot {
+ const doDelete = (tx: IDBTransaction) => {
tx.objectStore(storeName).delete(key);
};
this.addWork(doDelete, storeName, true);
@@ -387,17 +395,21 @@ class QueryRoot {
/**
* Low-level function to add a task to the internal work queue.
*/
- addWork(workFn: (IDBTransaction) => void,
- storeName: string,
- isWrite: boolean) {
+ addWork(workFn: (t: IDBTransaction) => void,
+ storeName?: string,
+ isWrite?: boolean) {
+ this.work.push(workFn);
+ if (storeName) {
+ this.addStoreAccess(storeName, isWrite);
+ }
+ }
+
+ addStoreAccess(storeName: string, isWrite?: boolean) {
if (storeName) {
this.stores.add(storeName);
}
if (isWrite) {
this.hasWrite = true;
}
- if (workFn) {
- this.work.push(workFn);
- }
}
} \ No newline at end of file
diff --git a/lib/wallet/types.ts b/lib/wallet/types.ts
index 2434dca32..e8b7a1e39 100644
--- a/lib/wallet/types.ts
+++ b/lib/wallet/types.ts
@@ -392,5 +392,5 @@ export interface CheckRepurchaseResult {
export interface Notifier {
- notify();
+ notify(): void;
}
diff --git a/lib/wallet/wallet.ts b/lib/wallet/wallet.ts
index 9edad2c5c..367c9cbcd 100644
--- a/lib/wallet/wallet.ts
+++ b/lib/wallet/wallet.ts
@@ -154,12 +154,12 @@ interface Transaction {
export interface Badge {
setText(s: string): void;
setColor(c: string): void;
- startBusy();
- stopBusy();
+ startBusy(): void;
+ stopBusy(): void;
}
-function deepEquals(x, y) {
+function deepEquals(x: any, y: any): boolean {
if (x === y) {
return true;
}
@@ -179,7 +179,7 @@ function flatMap<T, U>(xs: T[], f: (x: T) => U[]): U[] {
}
-function getTalerStampSec(stamp: string): number {
+function getTalerStampSec(stamp: string): number|null {
const m = stamp.match(/\/?Date\(([0-9]*)\)\/?/);
if (!m) {
return null;
@@ -188,7 +188,7 @@ function getTalerStampSec(stamp: string): number {
}
-function setTimeout(f, t) {
+function setTimeout(f: any, t: number) {
return chrome.extension.getBackgroundPage().setTimeout(f, t);
}
@@ -211,13 +211,13 @@ interface HttpRequestLibrary {
get(url: string|uri.URI): Promise<HttpResponse>;
- postJson(url: string|uri.URI, body): Promise<HttpResponse>;
+ postJson(url: string|uri.URI, body: any): Promise<HttpResponse>;
- postForm(url: string|uri.URI, form): Promise<HttpResponse>;
+ postForm(url: string|uri.URI, form: any): Promise<HttpResponse>;
}
-function copy(o) {
+function copy(o: any) {
return JSON.parse(JSON.stringify(o));
}
@@ -240,11 +240,18 @@ interface KeyUpdateInfo {
function getWithdrawDenomList(amountAvailable: AmountJson,
denoms: Denomination[]): Denomination[] {
let remaining = Amounts.copy(amountAvailable);
- let ds: Denomination[] = [];
+ const ds: Denomination[] = [];
+
+ console.log("available denoms");
+ console.log(denoms);
denoms = denoms.filter(isWithdrawableDenom);
denoms.sort((d1, d2) => Amounts.cmp(d2.value, d1.value));
+ console.log("withdrawable denoms");
+ console.log(denoms);
+
+
// This is an arbitrary number of coins
// we can withdraw in one go. It's not clear if this limit
// is useful ...
@@ -355,7 +362,7 @@ export class Wallet {
let x: number;
- function storeExchangeCoin(mc, url) {
+ function storeExchangeCoin(mc: any, url: string) {
let exchange: IExchangeInfo = mc[0];
console.log("got coin for exchange", url);
let coin: Coin = mc[1];
@@ -366,18 +373,16 @@ export class Wallet {
exchange.baseUrl);
return;
}
- let cd = {
- coin: coin,
- denom: exchange.active_denoms.find((e) => e.denom_pub === coin.denomPub)
- };
- if (!cd.denom) {
+ let denom = exchange.active_denoms.find((e) => e.denom_pub === coin.denomPub);
+ if (!denom) {
console.warn("denom not found (database inconsistent)");
return;
}
- if (cd.denom.value.currency !== paymentAmount.currency) {
+ if (denom.value.currency !== paymentAmount.currency) {
console.warn("same pubkey for different currencies");
return;
}
+ let cd = {coin, denom};
let x = m[url];
if (!x) {
m[url] = [cd];
@@ -464,7 +469,7 @@ export class Wallet {
private recordConfirmPay(offer: Offer,
payCoinInfo: PayCoinInfo,
chosenExchange: string): Promise<void> {
- let payReq = {};
+ let payReq: any = {};
payReq["amount"] = offer.contract.amount;
payReq["coins"] = payCoinInfo.map((x) => x.sig);
payReq["H_contract"] = offer.H_contract;
@@ -581,7 +586,7 @@ export class Wallet {
* Retrieve all necessary information for looking up the contract
* with the given hash.
*/
- executePayment(H_contract): Promise<any> {
+ executePayment(H_contract: string): Promise<any> {
return Promise.resolve().then(() => {
return Query(this.db)
.get("transactions", H_contract)
@@ -607,7 +612,7 @@ export class Wallet {
* First fetch information requred to withdraw from the reserve,
* then deplete the reserve, withdrawing coins until it is empty.
*/
- private processReserve(reserveRecord): void {
+ private processReserve(reserveRecord: any): void {
let retryDelayMs = 100;
const opId = "reserve-" + reserveRecord.reserve_pub;
this.startOperation(opId);
@@ -637,7 +642,7 @@ export class Wallet {
}
- private processPreCoin(preCoin, retryDelayMs = 100): void {
+ private processPreCoin(preCoin: any, retryDelayMs = 100): void {
this.withdrawExecute(preCoin)
.then((c) => this.storeCoin(c))
.catch((e) => {
@@ -803,7 +808,7 @@ export class Wallet {
/**
* Withdraw coins from a reserve until it is empty.
*/
- private depleteReserve(reserve, exchange: IExchangeInfo): Promise<void> {
+ private depleteReserve(reserve: any, exchange: IExchangeInfo): Promise<void> {
let denomsAvailable: Denomination[] = copy(exchange.active_denoms);
let denomsForWithdraw = getWithdrawDenomList(reserve.current_amount,
denomsAvailable);
@@ -912,7 +917,7 @@ export class Wallet {
* Optionally link the reserve entry to the new or existing
* exchange entry in then DB.
*/
- updateExchangeFromUrl(baseUrl): Promise<IExchangeInfo> {
+ updateExchangeFromUrl(baseUrl: string): Promise<IExchangeInfo> {
baseUrl = canonicalizeBaseUrl(baseUrl);
let reqUrl = URI("keys").absoluteTo(baseUrl);
return this.http.get(reqUrl).then((resp) => {
@@ -927,8 +932,8 @@ export class Wallet {
private updateExchangeFromJson(baseUrl: string,
exchangeKeysJson: KeysJson): Promise<IExchangeInfo> {
- let updateTimeSec = getTalerStampSec(exchangeKeysJson.list_issue_date);
- if (!updateTimeSec) {
+ const updateTimeSec = getTalerStampSec(exchangeKeysJson.list_issue_date);
+ if (updateTimeSec === null) {
throw Error("invalid update time");
}
@@ -947,7 +952,7 @@ export class Wallet {
console.log("making fresh exchange");
} else {
if (updateTimeSec < r.last_update_time) {
- console.log("outdated /keys, not updating")
+ console.log("outdated /keys, not updating");
return Promise.resolve(r);
}
exchangeInfo = r;
@@ -966,9 +971,9 @@ export class Wallet {
{indexName: "exchangeBaseUrl", only: baseUrl})
.reduce((coin: Coin, suspendedCoins: Coin[]) => {
if (!updatedExchangeInfo.active_denoms.find((c) => c.denom_pub == coin.denomPub)) {
- return [].concat(suspendedCoins, [coin]);
+ return Array.prototype.concat(suspendedCoins, [coin]);
}
- return [].concat(suspendedCoins);
+ return Array.prototype.concat(suspendedCoins);
}, [])
.then((suspendedCoins: Coin[]) => {
let q = Query(this.db);
@@ -999,8 +1004,8 @@ export class Wallet {
let found = false;
for (let oldDenom of exchangeInfo.all_denoms) {
if (oldDenom.denom_pub === newDenom.denom_pub) {
- let a = Object.assign({}, oldDenom);
- let b = Object.assign({}, newDenom);
+ let a: any = Object.assign({}, oldDenom);
+ let b: any = Object.assign({}, newDenom);
// pub hash is only there for convenience in the wallet
delete a["pub_hash"];
delete b["pub_hash"];
@@ -1048,7 +1053,7 @@ export class Wallet {
* that is currenctly available for spending in the wallet.
*/
getBalances(): Promise<any> {
- function collectBalances(c: Coin, byCurrency) {
+ function collectBalances(c: Coin, byCurrency: any) {
if (c.suspended) {
return byCurrency;
}
@@ -1074,7 +1079,7 @@ export class Wallet {
* Retrive the full event history for this wallet.
*/
getHistory(): Promise<any> {
- function collect(x, acc) {
+ function collect(x: any, acc: any) {
acc.push(x);
return acc;
}
@@ -1099,7 +1104,7 @@ export class Wallet {
[contract.merchant_pub, contract.repurchase_correlation_id])
.then((result: Transaction) => {
console.log("db result", result);
- let isRepurchase;
+ let isRepurchase: boolean;
if (result) {
console.assert(result.contract.repurchase_correlation_id == contract.repurchase_correlation_id);
return {
diff --git a/lib/wallet/wxMessaging.ts b/lib/wallet/wxMessaging.ts
index a8dc27524..9c08b20ca 100644
--- a/lib/wallet/wxMessaging.ts
+++ b/lib/wallet/wxMessaging.ts
@@ -15,7 +15,13 @@
*/
-import {Wallet, Offer, Badge, ConfirmReserveRequest, CreateReserveRequest} from "./wallet";
+import {
+ Wallet,
+ Offer,
+ Badge,
+ ConfirmReserveRequest,
+ CreateReserveRequest
+} from "./wallet";
import {deleteDb, exportDb, openTalerDb} from "./db";
import {BrowserHttpLib} from "./http";
import {Checkable} from "./checkable";
@@ -48,11 +54,17 @@ function makeHandlers(db: IDBDatabase,
return exportDb(db);
},
["ping"]: function(detail, sender) {
- return Promise.resolve({});
+ if (!sender || !sender.tab || !sender.tab.id) {
+ return Promise.resolve();
+ }
+ let id: number = sender.tab.id;
+ let info: any = <any>paymentRequestCookies[id];
+ delete paymentRequestCookies[id];
+ return Promise.resolve(info);
},
["reset"]: function(detail, sender) {
if (db) {
- let tx = db.transaction(db.objectStoreNames, 'readwrite');
+ let tx = db.transaction(Array.from(db.objectStoreNames), 'readwrite');
for (let i = 0; i < db.objectStoreNames.length; i++) {
tx.objectStore(db.objectStoreNames[i]).clear();
}
@@ -81,7 +93,7 @@ function makeHandlers(db: IDBDatabase,
return wallet.confirmReserve(req);
},
["confirm-pay"]: function(detail, sender) {
- let offer;
+ let offer: Offer;
try {
offer = Offer.checked(detail.offer);
} catch (e) {
@@ -100,7 +112,7 @@ function makeHandlers(db: IDBDatabase,
return wallet.confirmPay(offer);
},
["check-pay"]: function(detail, sender) {
- let offer;
+ let offer: Offer;
try {
offer = Offer.checked(detail.offer);
} catch (e) {
@@ -173,14 +185,14 @@ class ChromeBadge implements Badge {
}
-function dispatch(handlers, req, sender, sendResponse) {
+function dispatch(handlers: any, req: any, sender: any, sendResponse: any) {
if (req.type in handlers) {
Promise
.resolve()
.then(() => {
const p = handlers[req.type](req.detail, sender);
- return p.then((r) => {
+ return p.then((r: any) => {
sendResponse(r);
})
})
@@ -231,12 +243,58 @@ class ChromeNotifier implements Notifier {
}
+/**
+ * Mapping from tab ID to payment information (if any).
+ */
+let paymentRequestCookies: {[n: number]: any} = {};
+
+function handleHttpPayment(headerList: chrome.webRequest.HttpHeader[],
+ url: string, tabId: number): any {
+ const headers: {[s: string]: string} = {};
+ for (let kv of headerList) {
+ if (kv.value) {
+ headers[kv.name.toLowerCase()] = kv.value;
+ }
+ }
+
+ const contractUrl = headers["x-taler-contract-url"];
+ if (contractUrl !== undefined) {
+ paymentRequestCookies[tabId] = {type: "fetch", contractUrl};
+ return;
+ }
+
+ const contractHash = headers["x-taler-contract-hash"];
+
+ if (contractHash !== undefined) {
+ const payUrl = headers["x-taler-pay-url"];
+ if (payUrl === undefined) {
+ console.log("malformed 402, X-Taler-Pay-Url missing");
+ return;
+ }
+
+ // Offer URL is optional
+ const offerUrl = headers["x-taler-offer-url"];
+ paymentRequestCookies[tabId] = {
+ type: "execute",
+ offerUrl,
+ payUrl,
+ contractHash
+ };
+ return;
+ }
+
+ // looks like it's not a taler request, it might be
+ // for a different payment system (or the shop is buggy)
+ console.log("ignoring non-taler 402 response");
+}
+
+
export function wxMain() {
chrome.browserAction.setBadgeText({text: ""});
chrome.tabs.query({}, function(tabs) {
for (let tab of tabs) {
- if (!tab.url) {
+ if (!tab.url || !tab.id) {
return;
}
let uri = URI(tab.url);
@@ -255,11 +313,14 @@ export function wxMain() {
console.error("could not open database");
console.error(e);
})
- .then((db) => {
+ .then((db: IDBDatabase) => {
let http = new BrowserHttpLib();
let badge = new ChromeBadge();
let notifier = new ChromeNotifier();
let wallet = new Wallet(db, http, badge, notifier);
+
+ // Handlers for messages coming directly from the content
+ // script on the page
let handlers = makeHandlers(db, wallet);
chrome.runtime.onMessage.addListener((req, sender, sendResponse) => {
try {
@@ -276,6 +337,19 @@ export function wxMain() {
return false;
}
});
+
+ // Handlers for catching HTTP requests
+ chrome.webRequest.onHeadersReceived.addListener((details) => {
+ if (details.statusCode != 402) {
+ return;
+ }
+ console.log(`got 402 from ${details.url}`);
+ return handleHttpPayment(details.responseHeaders || [],
+ details.url,
+ details.tabId);
+ }, {urls: ["<all_urls>"]}, ["responseHeaders", "blocking"]);
+
+
})
.catch((e) => {
console.error("could not initialize wallet messaging");
diff --git a/manifest.json b/manifest.json
index 9874882d8..d885aebb0 100644
--- a/manifest.json
+++ b/manifest.json
@@ -14,6 +14,8 @@
"permissions": [
"storage",
"tabs",
+ "webRequest",
+ "webRequestBlocking",
"http://*/*",
"https://*/*"
],
diff --git a/package.json b/package.json
index f86943a13..9ff26935a 100644
--- a/package.json
+++ b/package.json
@@ -34,7 +34,7 @@
"po2json": "git+https://github.com/mikeedwards/po2json",
"systemjs": "^0.19.14",
"through2": "^2.0.1",
- "typescript": "^1.9.0-dev.20160225",
+ "typescript": "^2.0.2",
"typhonjs-istanbul-instrument-jspm": "^0.1.0",
"vinyl": "^1.1.1"
}
diff --git a/pages/confirm-contract.html b/pages/confirm-contract.html
index ec7eab8c1..c2d75ef5a 100644
--- a/pages/confirm-contract.html
+++ b/pages/confirm-contract.html
@@ -11,8 +11,8 @@
<script src="../lib/vendor/lodash.core.min.js"></script>
<script src="../lib/vendor/system-csp-production.src.js"></script>
<script src="../lib/vendor/jed.js"></script>
- <script src="../i18n/strings.js"></script>
<script src="../lib/i18n.js"></script>
+ <script src="../i18n/strings.js"></script>
<script src="../lib/module-trampoline.js"></script>
<style>
diff --git a/pages/confirm-contract.tsx b/pages/confirm-contract.tsx
index fadbc3233..19b049eb5 100644
--- a/pages/confirm-contract.tsx
+++ b/pages/confirm-contract.tsx
@@ -26,11 +26,11 @@
import MithrilComponent = _mithril.MithrilComponent;
import {substituteFulfillmentUrl} from "../lib/wallet/helpers";
import m from "mithril";
-import {Contract} from "../lib/wallet/types";
+import {Contract, AmountJson} from "../lib/wallet/types";
"use strict";
-function prettyAmount(amount) {
+function prettyAmount(amount: AmountJson) {
let v = amount.value + amount.fraction / 1e6;
return `${v.toFixed(2)} ${amount.currency}`;
}
@@ -40,7 +40,7 @@ const Details = {
controller() {
return {collapsed: m.prop(true)};
},
- view(ctrl, contract: Contract) {
+ view(ctrl: any, contract: Contract) {
if (ctrl.collapsed()) {
return m("div", [
m("button.linky", {
@@ -71,11 +71,11 @@ export function main() {
let offer = JSON.parse(query.offer);
console.dir(offer);
let contract = offer.contract;
- let error = null;
+ let error: string|null = null;
let payDisabled = true;
var Contract = {
- view(ctrl) {
+ view(ctrl: any) {
return [
m("p",
i18n.parts`${m("strong", contract.merchant.name)}
@@ -95,7 +95,7 @@ export function main() {
}
};
- m.mount(document.getElementById("contract"), Contract);
+ m.mount(document.getElementById("contract")!, Contract);
function checkPayment() {
chrome.runtime.sendMessage({type: 'check-pay', detail: {offer}}, (resp) => {
diff --git a/pages/confirm-create-reserve.html b/pages/confirm-create-reserve.html
index 1612340e8..995a85aec 100644
--- a/pages/confirm-create-reserve.html
+++ b/pages/confirm-create-reserve.html
@@ -8,8 +8,8 @@
<script src="../lib/vendor/mithril.js"></script>
<script src="../lib/vendor/system-csp-production.src.js"></script>
<script src="../lib/vendor/jed.js"></script>
- <script src="../i18n/strings.js"></script>
<script src="../lib/i18n.js"></script>
+ <script src="../i18n/strings.js"></script>
<script src="../lib/module-trampoline.js"></script>
<style>
diff --git a/pages/confirm-create-reserve.tsx b/pages/confirm-create-reserve.tsx
index dafd3ef33..0a509118d 100644
--- a/pages/confirm-create-reserve.tsx
+++ b/pages/confirm-create-reserve.tsx
@@ -27,7 +27,6 @@
import {amountToPretty, canonicalizeBaseUrl} from "../lib/wallet/helpers";
import {AmountJson, CreateReserveResponse} from "../lib/wallet/types";
import m from "mithril";
-import {IExchangeInfo} from "../lib/wallet/types";
import {ReserveCreationInfo, Amounts} from "../lib/wallet/types";
import MithrilComponent = _mithril.MithrilComponent;
import {Denomination} from "../lib/wallet/types";
@@ -41,10 +40,10 @@ import {getReserveCreationInfo} from "../lib/wallet/wxApi";
*/
class DelayTimer {
ms: number;
- f;
- timerId: number = null;
+ f: () => void;
+ timerId: number|undefined = undefined;
- constructor(ms: number, f) {
+ constructor(ms: number, f: () => void) {
this.f = f;
this.ms = ms;
}
@@ -58,7 +57,7 @@ class DelayTimer {
}
stop() {
- if (this.timerId !== null) {
+ if (this.timerId != undefined) {
window.clearTimeout(this.timerId);
}
}
@@ -67,11 +66,10 @@ class DelayTimer {
class Controller {
url = m.prop<string>();
- statusString = null;
+ statusString: string | null = null;
isValidExchange = false;
- reserveCreationInfo: ReserveCreationInfo = null;
+ reserveCreationInfo?: ReserveCreationInfo;
private timer: DelayTimer;
- private request: XMLHttpRequest;
amount: AmountJson;
callbackUrl: string;
wtTypes: string[];
@@ -97,7 +95,7 @@ class Controller {
private update() {
this.timer.stop();
const doUpdate = () => {
- this.reserveCreationInfo = null;
+ this.reserveCreationInfo = undefined;
if (!this.url()) {
this.statusString = i18n`Error: URL is empty`;
m.redraw(true);
@@ -126,7 +124,7 @@ class Controller {
.catch((e) => {
console.log("get exchange info rejected");
if (e.hasOwnProperty("httpStatus")) {
- this.statusString = `Error: request failed with status ${this.request.status}`;
+ this.statusString = `Error: request failed with status ${e.httpStatus}`;
} else if (e.hasOwnProperty("errorResponse")) {
let resp = e.errorResponse;
this.statusString = `Error: ${resp.error} (${resp.hint})`;
@@ -143,11 +141,7 @@ class Controller {
reset() {
this.isValidExchange = false;
this.statusString = null;
- this.reserveCreationInfo = null;
- if (this.request) {
- this.request.abort();
- this.request = null;
- }
+ this.reserveCreationInfo = undefined;
}
confirmReserve(rci: ReserveCreationInfo,
@@ -155,7 +149,7 @@ class Controller {
amount: AmountJson,
callback_url: string) {
const d = {exchange, amount};
- const cb = (rawResp) => {
+ const cb = (rawResp: any) => {
if (!rawResp) {
throw Error("empty response");
}
@@ -195,127 +189,122 @@ class Controller {
}
function view(ctrl: Controller): any {
- let controls = [];
- let mx = (x, ...args) => controls.push(m(x, ...args));
-
- mx("p",
- i18n.parts`You are about to withdraw ${m("strong", amountToPretty(
- ctrl.amount))} from your bank account into your wallet.`);
+ function* f(): IterableIterator<any> {
+ yield m("p",
+ i18n.parts`You are about to withdraw ${m("strong", amountToPretty(
+ ctrl.amount))} from your bank account into your wallet.`);
+
+ if (ctrl.complexViewRequested || !ctrl.suggestedExchangeUrl) {
+ yield viewComplex(ctrl);
+ return;
+ }
+ yield viewSimple(ctrl);
+ }
+ return Array.from(f());
+}
- if (ctrl.complexViewRequested || !ctrl.suggestedExchangeUrl) {
- return controls.concat(viewComplex(ctrl));
+function viewSimple(ctrl: Controller) {
+ function *f() {
+ if (ctrl.statusString) {
+ yield m("p", "Error: ", ctrl.statusString);
+ yield m("button.linky", {
+ onclick: () => {
+ ctrl.complexViewRequested = true;
+ }
+ }, "advanced options");
+ }
+ else if (ctrl.reserveCreationInfo != undefined) {
+ yield m("button.accept", {
+ onclick: () => ctrl.confirmReserve(ctrl.reserveCreationInfo!,
+ ctrl.url(),
+ ctrl.amount,
+ ctrl.callbackUrl),
+ disabled: !ctrl.isValidExchange
+ },
+ "Accept fees and withdraw");
+ yield m("span.spacer");
+ yield m("button.linky", {
+ onclick: () => {
+ ctrl.complexViewRequested = true;
+ }
+ }, "advanced options");
+ let totalCost = Amounts.add(ctrl.reserveCreationInfo.overhead,
+ ctrl.reserveCreationInfo.withdrawFee).amount;
+ yield m("p", `Withdraw cost: ${amountToPretty(totalCost)}`);
+ } else {
+ yield m("p", "Please wait ...");
+ }
}
- return controls.concat(viewSimple(ctrl));
+ return Array.from(f());
}
-function viewSimple(ctrl: Controller) {
- let controls = [];
- let mx = (x, ...args) => controls.push(m(x, ...args));
- if (ctrl.statusString) {
- mx("p", "Error: ", ctrl.statusString);
- mx("button.linky", {
- onclick: () => {
- ctrl.complexViewRequested = true;
- }
- }, "advanced options");
- }
- else if (ctrl.reserveCreationInfo) {
- mx("button.accept", {
- onclick: () => ctrl.confirmReserve(ctrl.reserveCreationInfo,
+function viewComplex(ctrl: Controller) {
+ function *f() {
+ yield m("button.accept", {
+ onclick: () => ctrl.confirmReserve(ctrl.reserveCreationInfo!,
ctrl.url(),
ctrl.amount,
ctrl.callbackUrl),
disabled: !ctrl.isValidExchange
},
"Accept fees and withdraw");
- mx("span.spacer");
- mx("button.linky", {
+ yield m("span.spacer");
+ yield m("button.linky", {
onclick: () => {
- ctrl.complexViewRequested = true;
+ ctrl.complexViewRequested = false;
}
- }, "advanced options");
- let totalCost = Amounts.add(ctrl.reserveCreationInfo.overhead,
- ctrl.reserveCreationInfo.withdrawFee).amount;
- mx("p", `Withdraw cost: ${amountToPretty(totalCost)}`);
- } else {
- mx("p", "Please wait ...");
- }
-
+ }, "back to simple view");
- return controls;
-}
-
-
-function viewComplex(ctrl: Controller) {
- let controls = [];
- let mx = (x, ...args) => controls.push(m(x, ...args));
-
- mx("button.accept", {
- onclick: () => ctrl.confirmReserve(ctrl.reserveCreationInfo,
- ctrl.url(),
- ctrl.amount,
- ctrl.callbackUrl),
- disabled: !ctrl.isValidExchange
- },
- "Accept fees and withdraw");
- mx("span.spacer");
- mx("button.linky", {
- onclick: () => {
- ctrl.complexViewRequested = false;
- }
- }, "back to simple view");
+ yield m("br");
- mx("br");
+ yield m("input", {
+ className: "url",
+ type: "text",
+ spellcheck: false,
+ value: ctrl.url(),
+ oninput: m.withAttr("value", ctrl.onUrlChanged.bind(ctrl)),
+ });
- mx("input",
- {
- className: "url",
- type: "text",
- spellcheck: false,
- value: ctrl.url(),
- oninput: m.withAttr("value", ctrl.onUrlChanged.bind(ctrl)),
- });
+ yield m("br");
- mx("br");
-
- if (ctrl.statusString) {
- mx("p", ctrl.statusString);
- } else if (!ctrl.reserveCreationInfo) {
- mx("p", "Checking URL, please wait ...");
- }
+ if (ctrl.statusString) {
+ yield m("p", ctrl.statusString);
+ } else if (!ctrl.reserveCreationInfo) {
+ yield m("p", "Checking URL, please wait ...");
+ }
- if (ctrl.reserveCreationInfo) {
- let totalCost = Amounts.add(ctrl.reserveCreationInfo.overhead,
- ctrl.reserveCreationInfo.withdrawFee).amount;
- mx("p", `Withdraw cost: ${amountToPretty(totalCost)}`);
- if (ctrl.detailCollapsed()) {
- mx("button.linky", {
- onclick: () => {
- ctrl.detailCollapsed(false);
- }
- }, "show more details");
- } else {
- mx("button.linky", {
- onclick: () => {
- ctrl.detailCollapsed(true);
- }
- }, "hide details");
- mx("div", {}, renderReserveCreationDetails(ctrl.reserveCreationInfo))
+ if (ctrl.reserveCreationInfo) {
+ let totalCost = Amounts.add(ctrl.reserveCreationInfo.overhead,
+ ctrl.reserveCreationInfo.withdrawFee).amount;
+ yield m("p", `Withdraw cost: ${amountToPretty(totalCost)}`);
+ if (ctrl.detailCollapsed()) {
+ yield m("button.linky", {
+ onclick: () => {
+ ctrl.detailCollapsed(false);
+ }
+ }, "show more details");
+ } else {
+ yield m("button.linky", {
+ onclick: () => {
+ ctrl.detailCollapsed(true);
+ }
+ }, "hide details");
+ yield m("div", {}, renderReserveCreationDetails(ctrl.reserveCreationInfo))
+ }
}
}
-
- return m("div", controls);
+ return Array.from(f());
}
function renderReserveCreationDetails(rci: ReserveCreationInfo) {
let denoms = rci.selectedDenoms;
- let countByPub = {};
- let uniq = [];
+ let countByPub: {[s: string]: number} = {};
+ let uniq: Denomination[] = [];
denoms.forEach((x: Denomination) => {
let c = countByPub[x.denom_pub] || 0;
@@ -358,7 +347,7 @@ function renderReserveCreationDetails(rci: ReserveCreationInfo) {
function getSuggestedExchange(currency: string): Promise<string> {
// TODO: make this request go to the wallet backend
// Right now, this is a stub.
- const defaultExchange = {
+ const defaultExchange: {[s: string]: string} = {
"KUDOS": "https://exchange.demo.taler.net",
"PUDOS": "https://exchange.test.taler.net",
};
@@ -373,6 +362,7 @@ function getSuggestedExchange(currency: string): Promise<string> {
}
+
export function main() {
const url = URI(document.location.href);
const query: any = URI.parseQuery(url.query());
@@ -383,14 +373,14 @@ export function main() {
getSuggestedExchange(amount.currency)
.then((suggestedExchangeUrl) => {
- const controller = () => new Controller(suggestedExchangeUrl, amount, callback_url, wt_types);
- var ExchangeSelection = {controller, view};
- m.mount(document.getElementById("exchange-selection"), ExchangeSelection);
+ const controller = function () { return new Controller(suggestedExchangeUrl, amount, callback_url, wt_types); };
+ const ExchangeSelection = {controller, view};
+ m.mount(document.getElementById("exchange-selection")!, ExchangeSelection);
})
.catch((e) => {
// TODO: provide more context information, maybe factor it out into a
// TODO:generic error reporting function or component.
document.body.innerText = `Fatal error: "${e.message}".`;
- console.error(`got backend error "${e.message}"`);
+ console.error(`got error "${e.message}"`, e);
});
-}
+} \ No newline at end of file
diff --git a/pages/show-db.ts b/pages/show-db.ts
index 9a7b315cf..71e74388b 100644
--- a/pages/show-db.ts
+++ b/pages/show-db.ts
@@ -21,30 +21,37 @@
* @author Florian Dold
*/
-function replacer(match, pIndent, pKey, pVal, pEnd) {
+function replacer(match: string, pIndent: string, pKey: string, pVal: string,
+ pEnd: string) {
var key = '<span class=json-key>';
var val = '<span class=json-value>';
var str = '<span class=json-string>';
var r = pIndent || '';
- if (pKey)
- r = r + key + pKey.replace(/[": ]/g, '') + '</span>: ';
- if (pVal)
- r = r + (pVal[0] == '"' ? str : val) + pVal + '</span>';
+ if (pKey) {
+ r = r + key + pKey.replace(/[": ]/g, '') + '</span>: ';
+ }
+ if (pVal) {
+ r = r + (pVal[0] == '"' ? str : val) + pVal + '</span>';
+ }
return r + (pEnd || '');
}
-function prettyPrint(obj) {
+function prettyPrint(obj: any) {
var jsonLine = /^( *)("[\w]+": )?("[^"]*"|[\w.+-]*)?([,[{])?$/mg;
- return JSON.stringify(obj, null, 3)
- .replace(/&/g, '&amp;').replace(/\\"/g, '&quot;')
- .replace(/</g, '&lt;').replace(/>/g, '&gt;')
- .replace(jsonLine, replacer);
+ return JSON.stringify(obj, null as any, 3)
+ .replace(/&/g, '&amp;').replace(/\\"/g, '&quot;')
+ .replace(/</g, '&lt;').replace(/>/g, '&gt;')
+ .replace(jsonLine, replacer);
}
-document.addEventListener("DOMContentLoaded", (e) => {
- chrome.runtime.sendMessage({type:'dump-db'}, (resp) => {
- document.getElementById('dump').innerHTML = prettyPrint(resp);
+document.addEventListener("DOMContentLoaded", () => {
+ chrome.runtime.sendMessage({type: 'dump-db'}, (resp) => {
+ const el = document.getElementById('dump');
+ if (!el) {
+ throw Error();
+ }
+ el.innerHTML = prettyPrint(resp);
});
});
diff --git a/popup/popup.tsx b/popup/popup.tsx
index a818e9228..fa222125f 100644
--- a/popup/popup.tsx
+++ b/popup/popup.tsx
@@ -29,12 +29,15 @@
"use strict";
import {substituteFulfillmentUrl} from "../lib/wallet/helpers";
+import BrowserClickedEvent = chrome.browserAction.BrowserClickedEvent;
+import {Wallet} from "../lib/wallet/wallet";
+import {AmountJson} from "../lib/wallet/types";
declare var m: any;
declare var i18n: any;
-function onUpdateNotification(f) {
+function onUpdateNotification(f: () => void) {
let port = chrome.runtime.connect({name: "notifications"});
port.onMessage.addListener((msg, port) => {
f();
@@ -56,7 +59,7 @@ export function main() {
console.log("this is popup");
-function makeTab(target, name) {
+function makeTab(target: string, name: string) {
let cssClass = "";
if (target == m.route()) {
cssClass = "active";
@@ -79,8 +82,8 @@ namespace WalletNavBar {
}
-function openInExtension(element, isInitialized) {
- element.addEventListener("click", (e) => {
+function openInExtension(element: HTMLAnchorElement, isInitialized: boolean) {
+ element.addEventListener("click", (e: Event) => {
chrome.tabs.create({
"url": element.href
});
@@ -88,13 +91,15 @@ function openInExtension(element, isInitialized) {
});
}
+
+
namespace WalletBalance {
export function controller() {
return new Controller();
}
class Controller {
- myWallet;
+ myWallet: any;
gotError = false;
constructor() {
@@ -128,7 +133,7 @@ namespace WalletBalance {
if (!wallet) {
throw Error("Could not retrieve wallet");
}
- let listing = _.map(wallet, x => m("p", formatAmount(x)));
+ let listing = _.map(wallet, (x: any) => m("p", formatAmount(x)));
if (listing.length > 0) {
return listing;
}
@@ -141,13 +146,13 @@ namespace WalletBalance {
}
-function formatTimestamp(t) {
+function formatTimestamp(t: number) {
let x = new Date(t);
return x.toLocaleString();
}
-function formatAmount(amount) {
+function formatAmount(amount: AmountJson) {
let v = amount.value + amount.fraction / 1e6;
return `${v.toFixed(2)} ${amount.currency}`;
}
@@ -158,7 +163,7 @@ function abbrevKey(s: string) {
}
-function retryPayment(url, contractHash) {
+function retryPayment(url: string, contractHash: string) {
return function() {
chrome.tabs.create({
"url": substituteFulfillmentUrl(url,
@@ -168,7 +173,7 @@ function retryPayment(url, contractHash) {
}
-function formatHistoryItem(historyItem) {
+function formatHistoryItem(historyItem: any) {
const d = historyItem.detail;
const t = historyItem.timestamp;
console.log("hist item", historyItem);
@@ -210,7 +215,7 @@ namespace WalletHistory {
}
class Controller {
- myHistory;
+ myHistory: any;
gotError = false;
constructor() {
@@ -287,7 +292,7 @@ var WalletDebug = {
};
-function openExtensionPage(page) {
+function openExtensionPage(page: string) {
return function() {
chrome.tabs.create({
"url": chrome.extension.getURL(page)
@@ -296,7 +301,7 @@ function openExtensionPage(page) {
}
-function openTab(page) {
+function openTab(page: string) {
return function() {
chrome.tabs.create({
"url": page
diff --git a/test/tests/taler.ts b/test/tests/taler.ts
index 941e8284d..0ffb37329 100644
--- a/test/tests/taler.ts
+++ b/test/tests/taler.ts
@@ -1,9 +1,9 @@
import * as Emsc from '../../lib/wallet/emscriptif';
-declare var HttpMockLib;
+declare var HttpMockLib: any;
-export function declareTests(assert, context, it) {
+export function declareTests(assert: any, context: any, it: any) {
it("calls native emscripten code", function() {
let x = new Emsc.Amount({value: 42, fraction: 42, currency: "EUR"});
diff --git a/tsconfig.json b/tsconfig.json
index 0e6337d86..cbe7d039f 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,17 +1,20 @@
{
"compilerOptions": {
- "target": "es5",
+ "target": "es6",
"jsx": "react",
"experimentalDecorators": true,
"module": "system",
"sourceMap": true,
"noLib": true,
"noImplicitReturns": true,
- "noFallthroughCasesInSwitch": true
+ "noFallthroughCasesInSwitch": true,
+ "strictNullChecks": true,
+ "noImplicitAny": true
},
"files": [
"lib/i18n.ts",
"lib/refs.ts",
+ "lib/shopApi.ts",
"lib/wallet/checkable.ts",
"lib/wallet/cryptoApi.ts",
"lib/wallet/cryptoLib.ts",