diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index 1940231a6d1..30e2b7781f6 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -260,18 +260,9 @@ namespace ts { case SyntaxKind.ExportAssignment: return (node).isExportEquals ? "export=" : "default"; case SyntaxKind.BinaryExpression: - switch (getSpecialPropertyAssignmentKind(node as BinaryExpression)) { - case SpecialPropertyAssignmentKind.ModuleExports: - // module.exports = ... - return "export="; - case SpecialPropertyAssignmentKind.ExportsProperty: - case SpecialPropertyAssignmentKind.ThisProperty: - case SpecialPropertyAssignmentKind.Property: - // exports.x = ... or this.y = ... - return ((node as BinaryExpression).left as PropertyAccessExpression).name.text; - case SpecialPropertyAssignmentKind.PrototypeProperty: - // className.prototype.methodName = ... - return (((node as BinaryExpression).left as PropertyAccessExpression).expression as PropertyAccessExpression).name.text; + if (getSpecialPropertyAssignmentKind(node as BinaryExpression) === SpecialPropertyAssignmentKind.ModuleExports) { + // module.exports = ... + return "export="; } Debug.fail("Unknown binary declaration kind"); break; @@ -439,6 +430,7 @@ namespace ts { // during global merging in the checker. Why? The only case when ambient module is permitted inside another module is module augmentation // and this case is specially handled. Module augmentations should only be merged with original module definition // and should never be merged directly with other augmentation, and the latter case would be possible if automatic merge is allowed. + if (node.kind === SyntaxKind.JSDocTypedefTag) Debug.assert(isInJavaScriptFile(node)); // We shouldn't add symbols for JSDoc nodes if not in a JS file. const isJSDocTypedefInJSDocNamespace = node.kind === SyntaxKind.JSDocTypedefTag && (node as JSDocTypedefTag).name && (node as JSDocTypedefTag).name.kind === SyntaxKind.Identifier && @@ -603,9 +595,7 @@ namespace ts { // Binding of JsDocComment should be done before the current block scope container changes. // because the scope of JsDocComment should not be affected by whether the current node is a // container or not. - if (isInJavaScriptFile(node) && node.jsDoc) { - forEach(node.jsDoc, bind); - } + forEach(node.jsDoc, bind); if (checkUnreachable(node)) { bindEachChild(node); return; @@ -1913,9 +1903,7 @@ namespace ts { // Here the current node is "foo", which is a container, but the scope of "MyType" should // not be inside "foo". Therefore we always bind @typedef before bind the parent node, // and skip binding this tag later when binding all the other jsdoc tags. - if (isInJavaScriptFile(node)) { - bindJSDocTypedefTagIfAny(node); - } + bindJSDocTypedefTagIfAny(node); // First we bind declaration nodes to a symbol if possible. We'll both create a symbol // and then potentially add the symbol to an appropriate symbol table. Possible @@ -2003,7 +1991,7 @@ namespace ts { // for typedef type names with namespaces, bind the new jsdoc type symbol here // because it requires all containing namespaces to be in effect, namely the // current "blockScopeContainer" needs to be set to its immediate namespace parent. - if ((node).isInJSDocNamespace) { + if (isInJavaScriptFile(node) && (node).isInJSDocNamespace) { let parentNode = node.parent; while (parentNode && parentNode.kind !== SyntaxKind.JSDocTypedefTag) { parentNode = parentNode.parent; @@ -2073,10 +2061,7 @@ namespace ts { return bindVariableDeclarationOrBindingElement(node); case SyntaxKind.PropertyDeclaration: case SyntaxKind.PropertySignature: - case SyntaxKind.JSDocRecordMember: - return bindPropertyOrMethodOrAccessor(node, SymbolFlags.Property | ((node).questionToken ? SymbolFlags.Optional : SymbolFlags.None), SymbolFlags.PropertyExcludes); - case SyntaxKind.JSDocPropertyTag: - return bindJSDocProperty(node); + return bindPropertyWorker(node as PropertyDeclaration | PropertySignature); case SyntaxKind.PropertyAssignment: case SyntaxKind.ShorthandPropertyAssignment: return bindPropertyOrMethodOrAccessor(node, SymbolFlags.Property, SymbolFlags.PropertyExcludes); @@ -2121,13 +2106,10 @@ namespace ts { return bindPropertyOrMethodOrAccessor(node, SymbolFlags.SetAccessor, SymbolFlags.SetAccessorExcludes); case SyntaxKind.FunctionType: case SyntaxKind.ConstructorType: - case SyntaxKind.JSDocFunctionType: return bindFunctionOrConstructorType(node); case SyntaxKind.TypeLiteral: case SyntaxKind.MappedType: - case SyntaxKind.JSDocTypeLiteral: - case SyntaxKind.JSDocRecordType: - return bindAnonymousDeclaration(node, SymbolFlags.TypeLiteral, "__type"); + return bindAnonymousTypeWorker(node as TypeLiteralNode | MappedTypeNode); case SyntaxKind.ObjectLiteralExpression: return bindObjectLiteralExpression(node); case SyntaxKind.FunctionExpression: @@ -2148,11 +2130,6 @@ namespace ts { return bindClassLikeDeclaration(node); case SyntaxKind.InterfaceDeclaration: return bindBlockScopedDeclaration(node, SymbolFlags.Interface, SymbolFlags.InterfaceExcludes); - case SyntaxKind.JSDocTypedefTag: - if (!(node).fullName || (node).fullName.kind === SyntaxKind.Identifier) { - return bindBlockScopedDeclaration(node, SymbolFlags.TypeAlias, SymbolFlags.TypeAliasExcludes); - } - break; case SyntaxKind.TypeAliasDeclaration: return bindBlockScopedDeclaration(node, SymbolFlags.TypeAlias, SymbolFlags.TypeAliasExcludes); case SyntaxKind.EnumDeclaration: @@ -2190,9 +2167,41 @@ namespace ts { // falls through case SyntaxKind.ModuleBlock: return updateStrictModeStatementList((node).statements); + + default: + if (isInJavaScriptFile(node)) return bindJSDocWorker(node); } } + function bindJSDocWorker(node: Node) { + switch (node.kind) { + case SyntaxKind.JSDocRecordMember: + return bindPropertyWorker(node as JSDocRecordMember); + case SyntaxKind.JSDocPropertyTag: + return declareSymbolAndAddToSymbolTable(node as JSDocPropertyTag, SymbolFlags.Property, SymbolFlags.PropertyExcludes); + case SyntaxKind.JSDocFunctionType: + return bindFunctionOrConstructorType(node); + case SyntaxKind.JSDocTypeLiteral: + case SyntaxKind.JSDocRecordType: + return bindAnonymousTypeWorker(node as JSDocTypeLiteral | JSDocRecordType); + case SyntaxKind.JSDocTypedefTag: { + const { fullName } = node as JSDocTypedefTag; + if (!fullName || fullName.kind === SyntaxKind.Identifier) { + return bindBlockScopedDeclaration(node, SymbolFlags.TypeAlias, SymbolFlags.TypeAliasExcludes); + } + break; + } + } + } + + function bindPropertyWorker(node: PropertyDeclaration | PropertySignature) { + return bindPropertyOrMethodOrAccessor(node, SymbolFlags.Property | (node.questionToken ? SymbolFlags.Optional : SymbolFlags.None), SymbolFlags.PropertyExcludes); + } + + function bindAnonymousTypeWorker(node: TypeLiteralNode | MappedTypeNode | JSDocTypeLiteral | JSDocRecordType) { + return bindAnonymousDeclaration(node, SymbolFlags.TypeLiteral, "__type"); + } + function checkTypePredicate(node: TypePredicateNode) { const { parameterName, type } = node; if (parameterName && parameterName.kind === SyntaxKind.Identifier) { @@ -2558,10 +2567,8 @@ namespace ts { } function bindPropertyOrMethodOrAccessor(node: Declaration, symbolFlags: SymbolFlags, symbolExcludes: SymbolFlags) { - if (!file.isDeclarationFile && !isInAmbientContext(node)) { - if (isAsyncFunction(node)) { - emitFlags |= NodeFlags.HasAsyncFunctions; - } + if (!file.isDeclarationFile && !isInAmbientContext(node) && isAsyncFunction(node)) { + emitFlags |= NodeFlags.HasAsyncFunctions; } if (currentFlow && isObjectLiteralOrClassExpressionMethod(node)) { @@ -2573,10 +2580,6 @@ namespace ts { : declareSymbolAndAddToSymbolTable(node, symbolFlags, symbolExcludes); } - function bindJSDocProperty(node: JSDocPropertyTag) { - return declareSymbolAndAddToSymbolTable(node, SymbolFlags.Property, SymbolFlags.PropertyExcludes); - } - // reachability checks function shouldReportErrorOnModuleDeclaration(node: ModuleDeclaration): boolean { diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 70403146489..8551652c176 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -3161,7 +3161,7 @@ namespace ts { } function buildTypeDisplay(type: Type, writer: SymbolWriter, enclosingDeclaration?: Node, globalFlags?: TypeFormatFlags, symbolStack?: Symbol[]) { - const globalFlagsToPass = globalFlags & TypeFormatFlags.WriteOwnNameForAnyLike; + const globalFlagsToPass = globalFlags & (TypeFormatFlags.WriteOwnNameForAnyLike | TypeFormatFlags.WriteClassExpressionAsTypeLiteral); let inObjectTypeLiteral = false; return writeType(type, globalFlags); @@ -3278,6 +3278,11 @@ namespace ts { writeTypeList(type.typeArguments.slice(0, getTypeReferenceArity(type)), SyntaxKind.CommaToken); writePunctuation(writer, SyntaxKind.CloseBracketToken); } + else if (flags & TypeFormatFlags.WriteClassExpressionAsTypeLiteral && + type.symbol.valueDeclaration && + type.symbol.valueDeclaration.kind === SyntaxKind.ClassExpression) { + writeAnonymousType(getDeclaredTypeOfClassOrInterface(type.symbol), flags); + } else { // Write the type reference in the format f.g.C where A and B are type arguments // for outer type parameters, and f and g are the respective declaring containers of those @@ -3325,7 +3330,9 @@ namespace ts { const symbol = type.symbol; if (symbol) { // Always use 'typeof T' for type of class, enum, and module objects - if (symbol.flags & SymbolFlags.Class && !getBaseTypeVariableOfClass(symbol) || + if (symbol.flags & SymbolFlags.Class && + !getBaseTypeVariableOfClass(symbol) && + !(symbol.valueDeclaration.kind === SyntaxKind.ClassExpression && flags & TypeFormatFlags.WriteClassExpressionAsTypeLiteral) || symbol.flags & (SymbolFlags.Enum | SymbolFlags.ValueModule)) { writeTypeOfSymbol(type, flags); } @@ -3347,12 +3354,23 @@ namespace ts { else { // Since instantiations of the same anonymous type have the same symbol, tracking symbols instead // of types allows us to catch circular references to instantiations of the same anonymous type + // However, in case of class expressions, we want to write both the static side and the instance side. + // We skip adding the static side so that the instance side has a chance to be written + // before checking for circular references. if (!symbolStack) { symbolStack = []; } - symbolStack.push(symbol); - writeLiteralType(type, flags); - symbolStack.pop(); + const isConstructorObject = type.flags & TypeFlags.Object && + getObjectFlags(type) & ObjectFlags.Anonymous && + type.symbol && type.symbol.flags & SymbolFlags.Class; + if (isConstructorObject) { + writeLiteralType(type, flags); + } + else { + symbolStack.push(symbol); + writeLiteralType(type, flags); + symbolStack.pop(); + } } } else { @@ -3471,6 +3489,14 @@ namespace ts { buildIndexSignatureDisplay(resolved.stringIndexInfo, writer, IndexKind.String, enclosingDeclaration, globalFlags, symbolStack); buildIndexSignatureDisplay(resolved.numberIndexInfo, writer, IndexKind.Number, enclosingDeclaration, globalFlags, symbolStack); for (const p of resolved.properties) { + if (globalFlags & TypeFormatFlags.WriteClassExpressionAsTypeLiteral) { + if (p.flags & SymbolFlags.Prototype) { + continue; + } + if (getDeclarationModifierFlagsFromSymbol(p) & (ModifierFlags.Private | ModifierFlags.Protected)) { + writer.reportPrivateInBaseOfClassExpression(p.name); + } + } const t = getTypeOfSymbol(p); if (p.flags & (SymbolFlags.Function | SymbolFlags.Method) && !getPropertiesOfObjectType(t).length) { const signatures = getSignaturesOfType(t, SignatureKind.Call); @@ -3485,7 +3511,7 @@ namespace ts { writePropertyWithModifiers(p); writePunctuation(writer, SyntaxKind.ColonToken); writeSpace(writer); - writeType(t, TypeFormatFlags.None); + writeType(t, globalFlags & TypeFormatFlags.WriteClassExpressionAsTypeLiteral); writePunctuation(writer, SyntaxKind.SemicolonToken); writer.writeLine(); } @@ -22327,6 +22353,11 @@ namespace ts { } } + if (entityName.parent!.kind === SyntaxKind.JSDocParameterTag) { + const parameter = ts.getParameterFromJSDoc(entityName.parent as JSDocParameterTag); + return parameter && parameter.symbol; + } + if (isPartOfExpression(entityName)) { if (nodeIsMissing(entityName)) { // Missing entity name. diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 4cb55f0fe30..52a7b5f5a7a 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -1783,7 +1783,8 @@ namespace ts { return path.length > extension.length && endsWith(path, extension); } - export function fileExtensionIsAny(path: string, extensions: string[]): boolean { + /* @internal */ + export function fileExtensionIsOneOf(path: string, extensions: string[]): boolean { for (const extension of extensions) { if (fileExtensionIs(path, extension)) { return true; @@ -1983,7 +1984,7 @@ namespace ts { for (const current of files) { const name = combinePaths(path, current); const absoluteName = combinePaths(absolutePath, current); - if (extensions && !fileExtensionIsAny(name, extensions)) continue; + if (extensions && !fileExtensionIsOneOf(name, extensions)) continue; if (excludeRegex && excludeRegex.test(absoluteName)) continue; if (!includeFileRegexes) { results[0].push(name); diff --git a/src/compiler/declarationEmitter.ts b/src/compiler/declarationEmitter.ts index d68744e9735..987157843b6 100644 --- a/src/compiler/declarationEmitter.ts +++ b/src/compiler/declarationEmitter.ts @@ -190,7 +190,7 @@ namespace ts { const writer = createTextWriter(newLine); writer.trackSymbol = trackSymbol; writer.reportInaccessibleThisError = reportInaccessibleThisError; - writer.reportIllegalExtends = reportIllegalExtends; + writer.reportPrivateInBaseOfClassExpression = reportPrivateInBaseOfClassExpression; writer.writeKeyword = writer.write; writer.writeOperator = writer.write; writer.writePunctuation = writer.write; @@ -314,11 +314,11 @@ namespace ts { recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForSymbol(symbol, meaning)); } - function reportIllegalExtends() { + function reportPrivateInBaseOfClassExpression(propertyName: string) { if (errorNameNode) { reportedDeclarationError = true; - emitterDiagnostics.add(createDiagnosticForNode(errorNameNode, Diagnostics.extends_clause_of_exported_class_0_refers_to_a_type_whose_name_cannot_be_referenced, - declarationNameToString(errorNameNode))); + emitterDiagnostics.add( + createDiagnosticForNode(errorNameNode, Diagnostics.Property_0_of_exported_class_expression_may_not_be_private_or_protected, propertyName)); } } @@ -344,7 +344,9 @@ namespace ts { } else { errorNameNode = declaration.name; - const format = TypeFormatFlags.UseTypeOfFunction | TypeFormatFlags.UseTypeAliasValue | + const format = TypeFormatFlags.UseTypeOfFunction | + TypeFormatFlags.WriteClassExpressionAsTypeLiteral | + TypeFormatFlags.UseTypeAliasValue | (shouldUseResolverType ? TypeFormatFlags.AddUndefined : 0); resolver.writeTypeOfDeclaration(declaration, enclosingDeclaration, format, writer); errorNameNode = undefined; @@ -360,7 +362,11 @@ namespace ts { } else { errorNameNode = signature.name; - resolver.writeReturnTypeOfSignatureDeclaration(signature, enclosingDeclaration, TypeFormatFlags.UseTypeOfFunction | TypeFormatFlags.UseTypeAliasValue, writer); + resolver.writeReturnTypeOfSignatureDeclaration( + signature, + enclosingDeclaration, + TypeFormatFlags.UseTypeOfFunction | TypeFormatFlags.UseTypeAliasValue | TypeFormatFlags.WriteClassExpressionAsTypeLiteral, + writer); errorNameNode = undefined; } } @@ -621,7 +627,11 @@ namespace ts { write(tempVarName); write(": "); writer.getSymbolAccessibilityDiagnostic = () => diagnostic; - resolver.writeTypeOfExpression(expr, enclosingDeclaration, TypeFormatFlags.UseTypeOfFunction | TypeFormatFlags.UseTypeAliasValue, writer); + resolver.writeTypeOfExpression( + expr, + enclosingDeclaration, + TypeFormatFlags.UseTypeOfFunction | TypeFormatFlags.UseTypeAliasValue | TypeFormatFlags.WriteClassExpressionAsTypeLiteral, + writer); write(";"); writeLine(); return tempVarName; diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 873c09448fc..a7b6db70e5e 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -2456,9 +2456,9 @@ "category": "Error", "code": 4092 }, - "'extends' clause of exported class '{0}' refers to a type whose name cannot be referenced.": { + "Property '{0}' of exported class expression may not be private or protected.": { "category": "Error", - "code": 4093 + "code": 4094 }, "The current host does not support the '{0}' option.": { diff --git a/src/compiler/factory.ts b/src/compiler/factory.ts index 965cb5fdda5..2b41f13f8a4 100644 --- a/src/compiler/factory.ts +++ b/src/compiler/factory.ts @@ -1631,14 +1631,14 @@ namespace ts { : node; } - export function createImportClause(name: Identifier, namedBindings: NamedImportBindings): ImportClause { + export function createImportClause(name: Identifier | undefined, namedBindings: NamedImportBindings | undefined): ImportClause { const node = createSynthesizedNode(SyntaxKind.ImportClause); node.name = name; node.namedBindings = namedBindings; return node; } - export function updateImportClause(node: ImportClause, name: Identifier, namedBindings: NamedImportBindings) { + export function updateImportClause(node: ImportClause, name: Identifier | undefined, namedBindings: NamedImportBindings | undefined) { return node.name !== name || node.namedBindings !== namedBindings ? updateNode(createImportClause(name, namedBindings), node) diff --git a/src/compiler/moduleNameResolver.ts b/src/compiler/moduleNameResolver.ts index 12a42b6899c..e4edfe68dfa 100644 --- a/src/compiler/moduleNameResolver.ts +++ b/src/compiler/moduleNameResolver.ts @@ -971,10 +971,13 @@ namespace ts { } } + /** Double underscores are used in DefinitelyTyped to delimit scoped packages. */ + const mangledScopedPackageSeparator = "__"; + /** For a scoped package, we must look in `@types/foo__bar` instead of `@types/@foo/bar`. */ function mangleScopedPackage(moduleName: string, state: ModuleResolutionState): string { if (startsWith(moduleName, "@")) { - const replaceSlash = moduleName.replace(ts.directorySeparator, "__"); + const replaceSlash = moduleName.replace(ts.directorySeparator, mangledScopedPackageSeparator); if (replaceSlash !== moduleName) { const mangled = replaceSlash.slice(1); // Take off the "@" if (state.traceEnabled) { @@ -986,6 +989,17 @@ namespace ts { return moduleName; } + /* @internal */ + export function getPackageNameFromAtTypesDirectory(mangledName: string): string { + const withoutAtTypePrefix = removePrefix(mangledName, "@types/"); + if (withoutAtTypePrefix !== mangledName) { + return withoutAtTypePrefix.indexOf("__") !== -1 ? + "@" + withoutAtTypePrefix.replace(mangledScopedPackageSeparator, ts.directorySeparator) : + withoutAtTypePrefix; + } + return mangledName; + } + function tryFindNonRelativeModuleNameInCache(cache: PerModuleNameCache | undefined, moduleName: string, containingDirectory: string, traceEnabled: boolean, host: ModuleResolutionHost): SearchResult { const result = cache && cache.get(containingDirectory); if (result) { diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 2d9806bcbf4..36f08b0b184 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -50,7 +50,7 @@ namespace ts { // stored in properties. If a 'cbNodes' callback is specified, it is invoked for embedded arrays; otherwise, // embedded arrays are flattened and the 'cbNode' callback is invoked for each element. If a callback returns // a truthy value, iteration stops and that value is returned. Otherwise, undefined is returned. - export function forEachChild(node: Node, cbNode: (node: Node) => T, cbNodeArray?: (nodes: Node[]) => T): T | undefined { + export function forEachChild(node: Node, cbNode: (node: Node) => T | undefined, cbNodeArray?: (nodes: NodeArray) => T | undefined): T | undefined { if (!node) { return; } diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 4b95c957f74..98efa1f3e53 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2651,24 +2651,25 @@ namespace ts { // with import statements it previously saw (but chose not to emit). trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void; reportInaccessibleThisError(): void; - reportIllegalExtends(): void; + reportPrivateInBaseOfClassExpression(propertyName: string): void; } export const enum TypeFormatFlags { - None = 0x00000000, - WriteArrayAsGenericType = 0x00000001, // Write Array instead T[] - UseTypeOfFunction = 0x00000002, // Write typeof instead of function type literal - NoTruncation = 0x00000004, // Don't truncate typeToString result - WriteArrowStyleSignature = 0x00000008, // Write arrow style signature - WriteOwnNameForAnyLike = 0x00000010, // Write symbol's own name instead of 'any' for any like types (eg. unknown, __resolving__ etc) - WriteTypeArgumentsOfSignature = 0x00000020, // Write the type arguments instead of type parameters of the signature - InElementType = 0x00000040, // Writing an array or union element type - UseFullyQualifiedType = 0x00000080, // Write out the fully qualified type name (eg. Module.Type, instead of Type) - InFirstTypeArgument = 0x00000100, // Writing first type argument of the instantiated type - InTypeAlias = 0x00000200, // Writing type in type alias declaration - UseTypeAliasValue = 0x00000400, // Serialize the type instead of using type-alias. This is needed when we emit declaration file. - SuppressAnyReturnType = 0x00000800, // If the return type is any-like, don't offer a return type. - AddUndefined = 0x00001000, // Add undefined to types of initialized, non-optional parameters + None = 0, + WriteArrayAsGenericType = 1 << 0, // Write Array instead T[] + UseTypeOfFunction = 1 << 2, // Write typeof instead of function type literal + NoTruncation = 1 << 3, // Don't truncate typeToString result + WriteArrowStyleSignature = 1 << 4, // Write arrow style signature + WriteOwnNameForAnyLike = 1 << 5, // Write symbol's own name instead of 'any' for any like types (eg. unknown, __resolving__ etc) + WriteTypeArgumentsOfSignature = 1 << 6, // Write the type arguments instead of type parameters of the signature + InElementType = 1 << 7, // Writing an array or union element type + UseFullyQualifiedType = 1 << 8, // Write out the fully qualified type name (eg. Module.Type, instead of Type) + InFirstTypeArgument = 1 << 9, // Writing first type argument of the instantiated type + InTypeAlias = 1 << 10, // Writing type in type alias declaration + UseTypeAliasValue = 1 << 11, // Serialize the type instead of using type-alias. This is needed when we emit declaration file. + SuppressAnyReturnType = 1 << 12, // If the return type is any-like, don't offer a return type. + AddUndefined = 1 << 13, // Add undefined to types of initialized, non-optional parameters + WriteClassExpressionAsTypeLiteral = 1 << 14, // Write a type literal instead of (Anonymous class) } export const enum SymbolFormatFlags { diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 6f99a71ab31..a5750248707 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -68,7 +68,7 @@ namespace ts { clear: () => str = "", trackSymbol: noop, reportInaccessibleThisError: noop, - reportIllegalExtends: noop + reportPrivateInBaseOfClassExpression: noop, }; } @@ -1599,7 +1599,7 @@ namespace ts { // Pull parameter comments from declaring function as well if (node.kind === SyntaxKind.Parameter) { - cache = concatenate(cache, getJSDocParameterTags(node)); + cache = concatenate(cache, getJSDocParameterTags(node as ParameterDeclaration)); } if (isVariableLike(node) && node.initializer) { @@ -1610,11 +1610,8 @@ namespace ts { } } - export function getJSDocParameterTags(param: Node): JSDocParameterTag[] { - if (!isParameter(param)) { - return undefined; - } - const func = param.parent as FunctionLikeDeclaration; + export function getJSDocParameterTags(param: ParameterDeclaration): JSDocParameterTag[] { + const func = param.parent; const tags = getJSDocTags(func, SyntaxKind.JSDocParameterTag) as JSDocParameterTag[]; if (!param.name) { // this is an anonymous jsdoc param from a `function(type1, type2): type3` specification @@ -1635,10 +1632,22 @@ namespace ts { } } + /** Does the opposite of `getJSDocParameterTags`: given a JSDoc parameter, finds the parameter corresponding to it. */ + export function getParameterFromJSDoc(node: JSDocParameterTag): ParameterDeclaration | undefined { + const name = node.parameterName.text; + const grandParent = node.parent!.parent!; + Debug.assert(node.parent!.kind === SyntaxKind.JSDocComment); + if (!isFunctionLike(grandParent)) { + return undefined; + } + return find(grandParent.parameters, p => + p.name.kind === SyntaxKind.Identifier && p.name.text === name); + } + export function getJSDocType(node: Node): JSDocType { let tag: JSDocTypeTag | JSDocParameterTag = getFirstJSDocTag(node, SyntaxKind.JSDocTypeTag) as JSDocTypeTag; if (!tag && node.kind === SyntaxKind.Parameter) { - const paramTags = getJSDocParameterTags(node); + const paramTags = getJSDocParameterTags(node as ParameterDeclaration); if (paramTags) { tag = find(paramTags, tag => !!tag.typeExpression); } @@ -1776,36 +1785,6 @@ namespace ts { } } - export function getNameOfDeclaration(declaration: Declaration): DeclarationName { - if (!declaration) { - return undefined; - } - if (declaration.kind === SyntaxKind.BinaryExpression) { - const kind = getSpecialPropertyAssignmentKind(declaration as BinaryExpression); - const lhs = (declaration as BinaryExpression).left; - switch (kind) { - case SpecialPropertyAssignmentKind.None: - case SpecialPropertyAssignmentKind.ModuleExports: - return undefined; - case SpecialPropertyAssignmentKind.ExportsProperty: - if (lhs.kind === SyntaxKind.Identifier) { - return (lhs as PropertyAccessExpression).name; - } - else { - return ((lhs as PropertyAccessExpression).expression as PropertyAccessExpression).name; - } - case SpecialPropertyAssignmentKind.ThisProperty: - case SpecialPropertyAssignmentKind.Property: - return (lhs as PropertyAccessExpression).name; - case SpecialPropertyAssignmentKind.PrototypeProperty: - return ((lhs as PropertyAccessExpression).expression as PropertyAccessExpression).name; - } - } - else { - return (declaration as NamedDeclaration).name; - } - } - export function isLiteralComputedPropertyDeclarationName(node: Node) { return (node.kind === SyntaxKind.StringLiteral || node.kind === SyntaxKind.NumericLiteral) && node.parent.kind === SyntaxKind.ComputedPropertyName && @@ -4729,4 +4708,25 @@ namespace ts { export function unescapeIdentifier(identifier: string): string { return identifier.length >= 3 && identifier.charCodeAt(0) === CharacterCodes._ && identifier.charCodeAt(1) === CharacterCodes._ && identifier.charCodeAt(2) === CharacterCodes._ ? identifier.substr(1) : identifier; } + + export function getNameOfDeclaration(declaration: Declaration): DeclarationName | undefined { + if (!declaration) { + return undefined; + } + if (declaration.kind === SyntaxKind.BinaryExpression) { + const expr = declaration as BinaryExpression; + switch (getSpecialPropertyAssignmentKind(expr)) { + case SpecialPropertyAssignmentKind.ExportsProperty: + case SpecialPropertyAssignmentKind.ThisProperty: + case SpecialPropertyAssignmentKind.Property: + case SpecialPropertyAssignmentKind.PrototypeProperty: + return (expr.left as PropertyAccessExpression).name; + default: + return undefined; + } + } + else { + return (declaration as NamedDeclaration).name; + } + } } diff --git a/src/harness/fourslash.ts b/src/harness/fourslash.ts index 7e2387ed636..8f19b83c7ad 100644 --- a/src/harness/fourslash.ts +++ b/src/harness/fourslash.ts @@ -916,7 +916,7 @@ namespace FourSlash { } private getNode(): ts.Node { - return ts.getTouchingPropertyName(this.getSourceFile(), this.currentCaretPosition); + return ts.getTouchingPropertyName(this.getSourceFile(), this.currentCaretPosition, /*includeJsDocComment*/ false); } private goToAndGetNode(range: Range): ts.Node { @@ -994,12 +994,11 @@ namespace FourSlash { } public verifyReferenceGroups(startRanges: Range | Range[], parts: Array<{ definition: string, ranges: Range[] }>): void { - interface ReferenceJson { definition: string; ranges: ts.ReferenceEntry[]; } const fullExpected = ts.map(parts, ({ definition, ranges }) => ({ definition, ranges: ranges.map(rangeToReferenceEntry) })); for (const startRange of toArray(startRanges)) { this.goToRangeStart(startRange); - const fullActual = ts.map(this.findReferencesAtCaret(), ({ definition, references }) => ({ + const fullActual = ts.map(this.findReferencesAtCaret(), ({ definition, references }) => ({ definition: definition.displayParts.map(d => d.text).join(""), ranges: references })); @@ -1046,6 +1045,10 @@ namespace FourSlash { this.raiseError(`${msgPrefix}At ${path}: ${msg}`); }; + if ((actual === undefined) !== (expected === undefined)) { + fail(`Expected ${expected}, got ${actual}`); + } + for (const key in actual) if (ts.hasProperty(actual as any, key)) { const ak = actual[key], ek = expected[key]; if (typeof ak === "object" && typeof ek === "object") { diff --git a/src/harness/harness.ts b/src/harness/harness.ts index 00a04d609f8..49dbdbf2102 100644 --- a/src/harness/harness.ts +++ b/src/harness/harness.ts @@ -172,7 +172,7 @@ namespace Utils { assert.isFalse(child.pos < currentPos, "child.pos < currentPos"); currentPos = child.end; }, - (array: ts.NodeArray) => { + array => { assert.isFalse(array.pos < node.pos, "array.pos < node.pos"); assert.isFalse(array.end > node.end, "array.end > node.end"); assert.isFalse(array.pos < currentPos, "array.pos < currentPos"); @@ -383,7 +383,7 @@ namespace Utils { assertStructuralEquals(child1, child2); }, - (array1: ts.NodeArray) => { + array1 => { const childName = findChildName(node1, array1); const array2: ts.NodeArray = (node2)[childName]; diff --git a/src/lib/dom.generated.d.ts b/src/lib/dom.generated.d.ts index c43c59e3b12..3aa813c0a8a 100644 --- a/src/lib/dom.generated.d.ts +++ b/src/lib/dom.generated.d.ts @@ -1,14 +1,14 @@ ///////////////////////////// -/// IE DOM APIs +/// DOM APIs ///////////////////////////// interface Account { - rpDisplayName?: string; displayName?: string; id?: string; - name?: string; imageURL?: string; + name?: string; + rpDisplayName?: string; } interface Algorithm { @@ -21,32 +21,32 @@ interface AnimationEventInit extends EventInit { } interface AssertionOptions { - timeoutSeconds?: number; - rpId?: USVString; allowList?: ScopedCredentialDescriptor[]; extensions?: WebAuthnExtensions; + rpId?: USVString; + timeoutSeconds?: number; } interface CacheQueryOptions { - ignoreSearch?: boolean; - ignoreMethod?: boolean; - ignoreVary?: boolean; cacheName?: string; + ignoreMethod?: boolean; + ignoreSearch?: boolean; + ignoreVary?: boolean; } interface ClientData { challenge?: string; + extensions?: WebAuthnExtensions; + hashAlg?: string | Algorithm; origin?: string; rpId?: string; - hashAlg?: string | Algorithm; tokenBinding?: string; - extensions?: WebAuthnExtensions; } interface CloseEventInit extends EventInit { - wasClean?: boolean; code?: number; reason?: string; + wasClean?: boolean; } interface CompositionEventInit extends UIEventInit { @@ -86,13 +86,6 @@ interface CustomEventInit extends EventInit { detail?: any; } -interface DOMRectInit { - x?: any; - y?: any; - width?: any; - height?: any; -} - interface DeviceAccelerationDict { x?: number; y?: number; @@ -106,15 +99,15 @@ interface DeviceLightEventInit extends EventInit { interface DeviceMotionEventInit extends EventInit { acceleration?: DeviceAccelerationDict; accelerationIncludingGravity?: DeviceAccelerationDict; - rotationRate?: DeviceRotationRateDict; interval?: number; + rotationRate?: DeviceRotationRateDict; } interface DeviceOrientationEventInit extends EventInit { + absolute?: boolean; alpha?: number; beta?: number; gamma?: number; - absolute?: boolean; } interface DeviceRotationRateDict { @@ -123,17 +116,24 @@ interface DeviceRotationRateDict { gamma?: number; } +interface DOMRectInit { + height?: any; + width?: any; + x?: any; + y?: any; +} + interface DoubleRange { max?: number; min?: number; } interface ErrorEventInit extends EventInit { - message?: string; - filename?: string; - lineno?: number; colno?: number; error?: any; + filename?: string; + lineno?: number; + message?: string; } interface EventInit { @@ -143,9 +143,8 @@ interface EventInit { } interface EventModifierInit extends UIEventInit { - ctrlKey?: boolean; - shiftKey?: boolean; altKey?: boolean; + ctrlKey?: boolean; metaKey?: boolean; modifierAltGraph?: boolean; modifierCapsLock?: boolean; @@ -158,6 +157,7 @@ interface EventModifierInit extends UIEventInit { modifierSuper?: boolean; modifierSymbol?: boolean; modifierSymbolLock?: boolean; + shiftKey?: boolean; } interface ExceptionInformation { @@ -170,17 +170,17 @@ interface FocusEventInit extends UIEventInit { interface FocusNavigationEventInit extends EventInit { navigationReason?: string; + originHeight?: number; originLeft?: number; originTop?: number; originWidth?: number; - originHeight?: number; } interface FocusNavigationOrigin { + originHeight?: number; originLeft?: number; originTop?: number; originWidth?: number; - originHeight?: number; } interface GamepadEventInit extends EventInit { @@ -207,11 +207,11 @@ interface IDBObjectStoreParameters { } interface IntersectionObserverEntryInit { - time?: number; - rootBounds?: DOMRectInit; boundingClientRect?: DOMRectInit; intersectionRect?: DOMRectInit; + rootBounds?: DOMRectInit; target?: Element; + time?: number; } interface IntersectionObserverInit { @@ -236,39 +236,153 @@ interface LongRange { min?: number; } +interface MediaEncryptedEventInit extends EventInit { + initData?: ArrayBuffer; + initDataType?: string; +} + +interface MediaKeyMessageEventInit extends EventInit { + message?: ArrayBuffer; + messageType?: MediaKeyMessageType; +} + +interface MediaKeySystemConfiguration { + audioCapabilities?: MediaKeySystemMediaCapability[]; + distinctiveIdentifier?: MediaKeysRequirement; + initDataTypes?: string[]; + persistentState?: MediaKeysRequirement; + videoCapabilities?: MediaKeySystemMediaCapability[]; +} + +interface MediaKeySystemMediaCapability { + contentType?: string; + robustness?: string; +} + +interface MediaStreamConstraints { + audio?: boolean | MediaTrackConstraints; + video?: boolean | MediaTrackConstraints; +} + +interface MediaStreamErrorEventInit extends EventInit { + error?: MediaStreamError; +} + +interface MediaStreamEventInit extends EventInit { + stream?: MediaStream; +} + +interface MediaStreamTrackEventInit extends EventInit { + track?: MediaStreamTrack; +} + +interface MediaTrackCapabilities { + aspectRatio?: number | DoubleRange; + deviceId?: string; + echoCancellation?: boolean[]; + facingMode?: string; + frameRate?: number | DoubleRange; + groupId?: string; + height?: number | LongRange; + sampleRate?: number | LongRange; + sampleSize?: number | LongRange; + volume?: number | DoubleRange; + width?: number | LongRange; +} + +interface MediaTrackConstraints extends MediaTrackConstraintSet { + advanced?: MediaTrackConstraintSet[]; +} + +interface MediaTrackConstraintSet { + aspectRatio?: number | ConstrainDoubleRange; + deviceId?: string | string[] | ConstrainDOMStringParameters; + echoCancelation?: boolean | ConstrainBooleanParameters; + facingMode?: string | string[] | ConstrainDOMStringParameters; + frameRate?: number | ConstrainDoubleRange; + groupId?: string | string[] | ConstrainDOMStringParameters; + height?: number | ConstrainLongRange; + sampleRate?: number | ConstrainLongRange; + sampleSize?: number | ConstrainLongRange; + volume?: number | ConstrainDoubleRange; + width?: number | ConstrainLongRange; +} + +interface MediaTrackSettings { + aspectRatio?: number; + deviceId?: string; + echoCancellation?: boolean; + facingMode?: string; + frameRate?: number; + groupId?: string; + height?: number; + sampleRate?: number; + sampleSize?: number; + volume?: number; + width?: number; +} + +interface MediaTrackSupportedConstraints { + aspectRatio?: boolean; + deviceId?: boolean; + echoCancellation?: boolean; + facingMode?: boolean; + frameRate?: boolean; + groupId?: boolean; + height?: boolean; + sampleRate?: boolean; + sampleSize?: boolean; + volume?: boolean; + width?: boolean; +} + +interface MessageEventInit extends EventInit { + lastEventId?: string; + channel?: string; + data?: any; + origin?: string; + ports?: MessagePort[]; + source?: Window; +} + +interface MouseEventInit extends EventModifierInit { + button?: number; + buttons?: number; + clientX?: number; + clientY?: number; + relatedTarget?: EventTarget; + screenX?: number; + screenY?: number; +} + interface MSAccountInfo { + accountImageUri?: string; + accountName?: string; 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; + deviceGlitchesEventRatio?: number; + deviceHalfDuplexAECEventRatio?: number; deviceHowlingEventCount?: number; + deviceLowSNREventRatio?: number; + deviceLowSpeechLevelEventRatio?: number; + deviceMultipleEndpointsEventCount?: number; + deviceNearEndToEchoRatioEventRatio?: number; + deviceRenderMuteEventRatio?: number; + deviceRenderNotFunctioningEventRatio?: number; + deviceRenderZeroVolumeEventRatio?: number; + networkDelayEventRatio?: number; + networkSendQualityEventRatio?: number; } interface MSAudioRecvPayload extends MSPayloadBase { - samplingRate?: number; - signal?: MSAudioRecvSignal; - packetReorderRatio?: number; - packetReorderDepthAvg?: number; - packetReorderDepthMax?: number; burstLossLength1?: number; burstLossLength2?: number; burstLossLength3?: number; @@ -280,31 +394,36 @@ interface MSAudioRecvPayload extends MSPayloadBase { fecRecvDistance1?: number; fecRecvDistance2?: number; fecRecvDistance3?: number; + packetReorderDepthAvg?: number; + packetReorderDepthMax?: number; + packetReorderRatio?: number; + ratioCompressedSamplesAvg?: number; ratioConcealedSamplesAvg?: number; ratioStretchedSamplesAvg?: number; - ratioCompressedSamplesAvg?: number; + samplingRate?: number; + signal?: MSAudioRecvSignal; } interface MSAudioRecvSignal { initialSignalLevelRMS?: number; - recvSignalLevelCh1?: number; recvNoiseLevelCh1?: number; - renderSignalLevel?: number; - renderNoiseLevel?: number; + recvSignalLevelCh1?: number; renderLoopbackSignalLevel?: number; + renderNoiseLevel?: number; + renderSignalLevel?: number; } interface MSAudioSendPayload extends MSPayloadBase { - samplingRate?: number; - signal?: MSAudioSendSignal; audioFECUsed?: boolean; + samplingRate?: number; sendMutePercent?: number; + signal?: MSAudioSendSignal; } interface MSAudioSendSignal { noiseLevel?: number; - sendSignalLevelCh1?: number; sendNoiseLevelCh1?: number; + sendSignalLevelCh1?: number; } interface MSConnectivity { @@ -322,8 +441,8 @@ interface MSCredentialParameters { } interface MSCredentialSpec { - type?: MSCredentialType; id?: string; + type?: MSCredentialType; } interface MSDelay { @@ -333,12 +452,12 @@ interface MSDelay { interface MSDescription extends RTCStats { connectivity?: MSConnectivity; - transport?: RTCIceProtocol; - networkconnectivity?: MSNetworkConnectivityInfo; - localAddr?: MSIPAddressInfo; - remoteAddr?: MSIPAddressInfo; deviceDevName?: string; + localAddr?: MSIPAddressInfo; + networkconnectivity?: MSNetworkConnectivityInfo; reflexiveLocalIPAddr?: MSIPAddressInfo; + remoteAddr?: MSIPAddressInfo; + transport?: RTCIceProtocol; } interface MSFIDOCredentialParameters extends MSCredentialParameters { @@ -346,35 +465,35 @@ interface MSFIDOCredentialParameters extends MSCredentialParameters { authenticators?: AAGUID[]; } -interface MSIPAddressInfo { - ipAddr?: string; - port?: number; - manufacturerMacAddrMask?: string; -} - interface MSIceWarningFlags { - turnTcpTimedOut?: boolean; - turnUdpAllocateFailed?: boolean; - turnUdpSendFailed?: boolean; + allocationMessageIntegrityFailed?: boolean; + alternateServerReceived?: boolean; + connCheckMessageIntegrityFailed?: boolean; + connCheckOtherError?: boolean; + fipsAllocationFailure?: boolean; + multipleRelayServersAttempted?: boolean; + noRelayServersConfigured?: boolean; + portRangeExhausted?: boolean; + pseudoTLSFailure?: boolean; + tcpNatConnectivityFailed?: boolean; + tcpRelayConnectivityFailed?: boolean; + turnAuthUnknownUsernameError?: boolean; turnTcpAllocateFailed?: boolean; turnTcpSendFailed?: boolean; + turnTcpTimedOut?: boolean; + turnTurnTcpConnectivityFailed?: boolean; + turnUdpAllocateFailed?: boolean; + turnUdpSendFailed?: 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 MSIPAddressInfo { + ipAddr?: string; + manufacturerMacAddrMask?: string; + port?: number; } interface MSJitter { @@ -384,28 +503,28 @@ interface MSJitter { } interface MSLocalClientEventBase extends RTCStats { - networkReceiveQualityEventRatio?: number; networkBandwidthLowEventRatio?: number; + networkReceiveQualityEventRatio?: number; } interface MSNetwork extends RTCStats { - jitter?: MSJitter; delay?: MSDelay; + jitter?: MSJitter; packetLoss?: MSPacketLoss; utilization?: MSUtilization; } interface MSNetworkConnectivityInfo { - vpn?: boolean; linkspeed?: number; networkConnectionDetails?: string; + vpn?: boolean; } interface MSNetworkInterfaceType { interfaceTypeEthernet?: boolean; - interfaceTypeWireless?: boolean; interfaceTypePPP?: boolean; interfaceTypeTunnel?: boolean; + interfaceTypeWireless?: boolean; interfaceTypeWWAN?: boolean; } @@ -423,13 +542,13 @@ interface MSPayloadBase extends RTCStats { } interface MSPortRange { - min?: number; max?: number; + min?: number; } interface MSRelayAddress { - relayAddress?: string; port?: number; + relayAddress?: string; } interface MSSignatureParameters { @@ -437,241 +556,122 @@ interface MSSignatureParameters { } 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?: RTCIceProtocol; - localInterface?: MSNetworkInterfaceType; - localAddrType?: MSIceAddrType; - remoteAddrType?: MSIceAddrType; - iceRole?: RTCIceRole; - rtpRtcpMux?: boolean; allocationTimeInMs?: number; + baseAddress?: string; + baseInterface?: MSNetworkInterfaceType; + iceRole?: RTCIceRole; + iceWarningFlags?: MSIceWarningFlags; + interfaces?: MSNetworkInterfaceType; + localAddress?: string; + localAddrType?: MSIceAddrType; + localInterface?: MSNetworkInterfaceType; + localMR?: string; + localMRTCPPort?: number; + localSite?: string; msRtcEngineVersion?: string; + networkName?: string; + numConsentReqReceived?: number; + numConsentReqSent?: number; + numConsentRespReceived?: number; + numConsentRespSent?: number; + portRangeMax?: number; + portRangeMin?: number; + protocol?: RTCIceProtocol; + remoteAddress?: string; + remoteAddrType?: MSIceAddrType; + remoteMR?: string; + remoteMRTCPPort?: number; + remoteSite?: string; + rtpRtcpMux?: boolean; + stunVer?: number; } interface MSUtilization { - packets?: number; bandwidthEstimation?: number; - bandwidthEstimationMin?: number; - bandwidthEstimationMax?: number; - bandwidthEstimationStdDev?: number; bandwidthEstimationAvg?: number; + bandwidthEstimationMax?: number; + bandwidthEstimationMin?: number; + bandwidthEstimationStdDev?: number; + packets?: number; } interface MSVideoPayload extends MSPayloadBase { + durationSeconds?: number; resolution?: 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; + lowBitRateCallPercent?: number; + lowFrameRateCallPercent?: number; recvBitRateAverage?: number; + recvBitRateMaximum?: number; + recvCodecType?: string; + recvFpsHarmonicAverage?: number; + recvFrameRateAverage?: number; + recvNumResSwitches?: number; + recvReorderBufferMaxSuccessfullyOrderedExtent?: number; + recvReorderBufferMaxSuccessfullyOrderedLateTime?: number; + recvReorderBufferPacketsDroppedDueToBufferExhaustion?: number; + recvReorderBufferPacketsDroppedDueToTimeout?: number; + recvReorderBufferReorderedPackets?: number; + recvResolutionHeight?: number; + recvResolutionWidth?: 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; + videoFrameLossRate?: number; + videoPostFECPLR?: number; + videoResolutions?: MSVideoResolutionDistribution; } interface MSVideoResolutionDistribution { cifQuality?: number; - vgaQuality?: number; - h720Quality?: number; h1080Quality?: number; h1440Quality?: number; h2160Quality?: number; + h720Quality?: number; + vgaQuality?: number; } interface MSVideoSendPayload extends MSVideoPayload { - sendFrameRateAverage?: number; - sendBitRateMaximum?: number; sendBitRateAverage?: number; - sendVideoStreamsMax?: number; - sendResolutionWidth?: number; + sendBitRateMaximum?: number; + sendFrameRateAverage?: number; sendResolutionHeight?: number; -} - -interface MediaEncryptedEventInit extends EventInit { - initDataType?: string; - initData?: ArrayBuffer; -} - -interface MediaKeyMessageEventInit extends EventInit { - messageType?: MediaKeyMessageType; - message?: ArrayBuffer; -} - -interface MediaKeySystemConfiguration { - initDataTypes?: string[]; - audioCapabilities?: MediaKeySystemMediaCapability[]; - videoCapabilities?: MediaKeySystemMediaCapability[]; - distinctiveIdentifier?: MediaKeysRequirement; - persistentState?: MediaKeysRequirement; -} - -interface MediaKeySystemMediaCapability { - contentType?: string; - robustness?: string; -} - -interface MediaStreamConstraints { - video?: boolean | MediaTrackConstraints; - audio?: boolean | MediaTrackConstraints; -} - -interface MediaStreamErrorEventInit extends EventInit { - error?: MediaStreamError; -} - -interface MediaStreamEventInit extends EventInit { - stream?: MediaStream; -} - -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 MessageEventInit extends EventInit { - lastEventId?: string; - channel?: string; - data?: any; - origin?: string; - source?: Window; - ports?: MessagePort[]; -} - -interface MouseEventInit extends EventModifierInit { - screenX?: number; - screenY?: number; - clientX?: number; - clientY?: number; - button?: number; - buttons?: number; - relatedTarget?: EventTarget; + sendResolutionWidth?: number; + sendVideoStreamsMax?: number; } interface MsZoomToOptions { + animate?: string; contentX?: number; contentY?: number; + scaleFactor?: number; viewportX?: string; viewportY?: string; - scaleFactor?: number; - animate?: string; } interface MutationObserverInit { - childList?: boolean; + attributeFilter?: string[]; + attributeOldValue?: boolean; attributes?: boolean; characterData?: boolean; - subtree?: boolean; - attributeOldValue?: boolean; characterDataOldValue?: boolean; - attributeFilter?: string[]; + childList?: boolean; + subtree?: boolean; } interface NotificationOptions { - dir?: NotificationDirection; - lang?: string; body?: string; - tag?: string; + dir?: NotificationDirection; icon?: string; + lang?: string; + tag?: string; } interface ObjectURLOptions { @@ -680,39 +680,39 @@ interface ObjectURLOptions { interface PaymentCurrencyAmount { currency?: string; - value?: string; currencySystem?: string; + value?: string; } interface PaymentDetails { - total?: PaymentItem; displayItems?: PaymentItem[]; - shippingOptions?: PaymentShippingOption[]; - modifiers?: PaymentDetailsModifier[]; error?: string; + modifiers?: PaymentDetailsModifier[]; + shippingOptions?: PaymentShippingOption[]; + total?: PaymentItem; } interface PaymentDetailsModifier { - supportedMethods?: string[]; - total?: PaymentItem; additionalDisplayItems?: PaymentItem[]; data?: any; + supportedMethods?: string[]; + total?: PaymentItem; } interface PaymentItem { - label?: string; amount?: PaymentCurrencyAmount; + label?: string; pending?: boolean; } interface PaymentMethodData { - supportedMethods?: string[]; data?: any; + supportedMethods?: string[]; } interface PaymentOptions { - requestPayerName?: boolean; requestPayerEmail?: boolean; + requestPayerName?: boolean; requestPayerPhone?: boolean; requestShipping?: boolean; shippingType?: string; @@ -722,9 +722,9 @@ interface PaymentRequestUpdateEventInit extends EventInit { } interface PaymentShippingOption { + amount?: PaymentCurrencyAmount; id?: string; label?: string; - amount?: PaymentCurrencyAmount; selected?: boolean; } @@ -733,14 +733,14 @@ interface PeriodicWaveConstraints { } interface PointerEventInit extends MouseEventInit { - pointerId?: number; - width?: number; height?: number; + isPrimary?: boolean; + pointerId?: number; + pointerType?: string; pressure?: number; tiltX?: number; tiltY?: number; - pointerType?: string; - isPrimary?: boolean; + width?: number; } interface PopStateEventInit extends EventInit { @@ -749,8 +749,8 @@ interface PopStateEventInit extends EventInit { interface PositionOptions { enableHighAccuracy?: boolean; - timeout?: number; maximumAge?: number; + timeout?: number; } interface ProgressEventInit extends EventInit { @@ -760,38 +760,63 @@ interface ProgressEventInit extends EventInit { } interface PushSubscriptionOptionsInit { - userVisibleOnly?: boolean; applicationServerKey?: any; + userVisibleOnly?: boolean; +} + +interface RegistrationOptions { + scope?: string; +} + +interface RequestInit { + body?: any; + cache?: RequestCache; + credentials?: RequestCredentials; + headers?: any; + integrity?: string; + keepalive?: boolean; + method?: string; + mode?: RequestMode; + redirect?: RequestRedirect; + referrer?: string; + referrerPolicy?: ReferrerPolicy; + window?: any; +} + +interface ResponseInit { + headers?: any; + status?: number; + statusText?: string; } interface RTCConfiguration { + bundlePolicy?: RTCBundlePolicy; iceServers?: RTCIceServer[]; iceTransportPolicy?: RTCIceTransportPolicy; - bundlePolicy?: RTCBundlePolicy; peerIdentity?: string; } -interface RTCDTMFToneChangeEventInit extends EventInit { - tone?: string; -} - interface RTCDtlsFingerprint { algorithm?: string; value?: string; } interface RTCDtlsParameters { - role?: RTCDtlsRole; fingerprints?: RTCDtlsFingerprint[]; + role?: RTCDtlsRole; +} + +interface RTCDTMFToneChangeEventInit extends EventInit { + tone?: string; } interface RTCIceCandidateAttributes extends RTCStats { + addressSourceUrl?: string; + candidateType?: RTCStatsIceCandidateType; ipAddress?: string; portNumber?: number; - transport?: string; - candidateType?: RTCStatsIceCandidateType; priority?: number; - addressSourceUrl?: string; + transport?: string; } interface RTCIceCandidateComplete { @@ -799,15 +824,15 @@ interface RTCIceCandidateComplete { interface RTCIceCandidateDictionary { foundation?: string; - priority?: number; ip?: string; - protocol?: RTCIceProtocol; + msMTurnSessionId?: string; port?: number; - type?: RTCIceCandidateType; - tcpType?: RTCIceTcpCandidateType; + priority?: number; + protocol?: RTCIceProtocol; relatedAddress?: string; relatedPort?: number; - msMTurnSessionId?: string; + tcpType?: RTCIceTcpCandidateType; + type?: RTCIceCandidateType; } interface RTCIceCandidateInit { @@ -822,19 +847,19 @@ interface RTCIceCandidatePair { } interface RTCIceCandidatePairStats extends RTCStats { - transportId?: string; - localCandidateId?: string; - remoteCandidateId?: string; - state?: RTCStatsIceCandidatePairState; - priority?: number; - nominated?: boolean; - writable?: boolean; - readable?: boolean; - bytesSent?: number; - bytesReceived?: number; - roundTripTime?: number; - availableOutgoingBitrate?: number; availableIncomingBitrate?: number; + availableOutgoingBitrate?: number; + bytesReceived?: number; + bytesSent?: number; + localCandidateId?: string; + nominated?: boolean; + priority?: number; + readable?: boolean; + remoteCandidateId?: string; + roundTripTime?: number; + state?: RTCStatsIceCandidatePairState; + transportId?: string; + writable?: boolean; } interface RTCIceGatherOptions { @@ -844,285 +869,260 @@ interface RTCIceGatherOptions { } interface RTCIceParameters { - usernameFragment?: string; - password?: string; iceLite?: boolean; + password?: string; + usernameFragment?: string; } interface RTCIceServer { + credential?: string; urls?: any; username?: string; - credential?: string; } interface RTCInboundRTPStreamStats extends RTCRTPStreamStats { - packetsReceived?: number; bytesReceived?: number; - packetsLost?: number; - jitter?: number; fractionLost?: number; + jitter?: number; + packetsLost?: number; + packetsReceived?: 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; + frameHeight?: number; + framesCorrupted?: number; + framesDecoded?: number; + framesDropped?: number; + framesPerSecond?: number; + framesReceived?: number; + framesSent?: number; + frameWidth?: number; + remoteSource?: boolean; + ssrcIds?: string[]; + trackIdentifier?: string; } interface RTCOfferOptions { - offerToReceiveVideo?: number; - offerToReceiveAudio?: number; - voiceActivityDetection?: boolean; iceRestart?: boolean; + offerToReceiveAudio?: number; + offerToReceiveVideo?: number; + voiceActivityDetection?: boolean; } interface RTCOutboundRTPStreamStats extends RTCRTPStreamStats { - packetsSent?: number; bytesSent?: number; - targetBitrate?: number; + packetsSent?: number; roundTripTime?: number; + targetBitrate?: number; } interface RTCPeerConnectionIceEventInit extends EventInit { candidate?: RTCIceCandidate; } -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; + type?: string; } interface RTCRtcpParameters { - ssrc?: number; cname?: string; - reducedSize?: boolean; mux?: boolean; + reducedSize?: boolean; + ssrc?: number; } interface RTCRtpCapabilities { codecs?: RTCRtpCodecCapability[]; - headerExtensions?: RTCRtpHeaderExtension[]; fecMechanisms?: string[]; + headerExtensions?: RTCRtpHeaderExtension[]; } interface RTCRtpCodecCapability { - name?: string; - kind?: string; clockRate?: number; - preferredPayloadType?: number; + kind?: string; maxptime?: number; - ptime?: number; - numChannels?: number; - rtcpFeedback?: RTCRtcpFeedback[]; - parameters?: any; - options?: any; - maxTemporalLayers?: number; maxSpatialLayers?: number; + maxTemporalLayers?: number; + name?: string; + numChannels?: number; + options?: any; + parameters?: any; + preferredPayloadType?: number; + ptime?: number; + rtcpFeedback?: RTCRtcpFeedback[]; svcMultiStreamSupport?: boolean; } interface RTCRtpCodecParameters { - name?: string; - payloadType?: any; clockRate?: number; maxptime?: number; - ptime?: number; + name?: string; numChannels?: number; - rtcpFeedback?: RTCRtcpFeedback[]; parameters?: any; + payloadType?: any; + ptime?: number; + rtcpFeedback?: RTCRtcpFeedback[]; } interface RTCRtpContributingSource { - timestamp?: number; - csrc?: number; audioLevel?: number; + csrc?: number; + timestamp?: number; } interface RTCRtpEncodingParameters { - ssrc?: number; - codecPayloadType?: number; - fec?: RTCRtpFecParameters; - rtx?: RTCRtpRtxParameters; - priority?: number; - maxBitrate?: number; - minQuality?: number; - resolutionScale?: number; - framerateScale?: number; - maxFramerate?: number; active?: boolean; - encodingId?: string; + codecPayloadType?: number; dependencyEncodingIds?: string[]; + encodingId?: string; + fec?: RTCRtpFecParameters; + framerateScale?: number; + maxBitrate?: number; + maxFramerate?: number; + minQuality?: number; + priority?: number; + resolutionScale?: number; + rtx?: RTCRtpRtxParameters; + ssrc?: number; ssrcRange?: RTCSsrcRange; } interface RTCRtpFecParameters { - ssrc?: number; mechanism?: string; + ssrc?: number; } interface RTCRtpHeaderExtension { kind?: string; - uri?: string; - preferredId?: number; preferredEncrypt?: boolean; + preferredId?: number; + uri?: string; } interface RTCRtpHeaderExtensionParameters { - uri?: string; - id?: number; encrypt?: boolean; + id?: number; + uri?: string; } interface RTCRtpParameters { - muxId?: string; codecs?: RTCRtpCodecParameters[]; - headerExtensions?: RTCRtpHeaderExtensionParameters[]; - encodings?: RTCRtpEncodingParameters[]; - rtcp?: RTCRtcpParameters; degradationPreference?: RTCDegradationPreference; + encodings?: RTCRtpEncodingParameters[]; + headerExtensions?: RTCRtpHeaderExtensionParameters[]; + muxId?: string; + rtcp?: RTCRtcpParameters; } interface RTCRtpRtxParameters { ssrc?: number; } +interface RTCRTPStreamStats extends RTCStats { + associateStatsId?: string; + codecId?: string; + firCount?: number; + isRemote?: boolean; + mediaTrackId?: string; + nackCount?: number; + pliCount?: number; + sliCount?: number; + ssrc?: string; + transportId?: string; +} + interface RTCRtpUnhandled { - ssrc?: number; - payloadType?: number; muxId?: string; + payloadType?: number; + ssrc?: number; } interface RTCSessionDescriptionInit { - type?: RTCSdpType; sdp?: string; + type?: RTCSdpType; } interface RTCSrtpKeyParam { keyMethod?: string; keySalt?: string; lifetime?: string; - mkiValue?: number; mkiLength?: number; + mkiValue?: number; } interface RTCSrtpSdesParameters { - tag?: number; cryptoSuite?: string; keyParams?: RTCSrtpKeyParam[]; sessionParams?: string[]; + tag?: number; } interface RTCSsrcRange { - min?: number; max?: number; + min?: number; } interface RTCStats { - timestamp?: number; - type?: RTCStatsType; id?: string; msType?: MSStatsType; + timestamp?: number; + type?: RTCStatsType; } interface RTCStatsReport { } interface RTCTransportStats extends RTCStats { - bytesSent?: number; - bytesReceived?: number; - rtcpTransportStatsId?: string; activeConnection?: boolean; - selectedCandidatePairId?: string; + bytesReceived?: number; + bytesSent?: number; localCertificateId?: string; remoteCertificateId?: string; -} - -interface RegistrationOptions { - scope?: string; -} - -interface RequestInit { - method?: string; - headers?: any; - body?: any; - referrer?: string; - referrerPolicy?: ReferrerPolicy; - mode?: RequestMode; - credentials?: RequestCredentials; - cache?: RequestCache; - redirect?: RequestRedirect; - integrity?: string; - keepalive?: boolean; - window?: any; -} - -interface ResponseInit { - status?: number; - statusText?: string; - headers?: any; + rtcpTransportStatsId?: string; + selectedCandidatePairId?: string; } interface ScopedCredentialDescriptor { - type?: ScopedCredentialType; id?: any; transports?: Transport[]; + type?: ScopedCredentialType; } interface ScopedCredentialOptions { - timeoutSeconds?: number; - rpId?: USVString; excludeList?: ScopedCredentialDescriptor[]; extensions?: WebAuthnExtensions; + rpId?: USVString; + timeoutSeconds?: number; } interface ScopedCredentialParameters { - type?: ScopedCredentialType; algorithm?: string | Algorithm; + type?: ScopedCredentialType; } interface ServiceWorkerMessageEventInit extends EventInit { data?: any; - origin?: string; lastEventId?: string; - source?: ServiceWorker | MessagePort; + origin?: string; ports?: MessagePort[]; + source?: ServiceWorker | MessagePort; } interface SpeechSynthesisEventInit extends EventInit { - utterance?: SpeechSynthesisUtterance; charIndex?: number; elapsedTime?: number; name?: string; + utterance?: SpeechSynthesisUtterance; } interface StoreExceptionsInformation extends ExceptionInformation { - siteName?: string; - explanationString?: string; detailURI?: string; + explanationString?: string; + siteName?: string; } interface StoreSiteSpecificExceptionsInformation extends StoreExceptionsInformation { @@ -1134,13 +1134,13 @@ interface TrackEventInit extends EventInit { } interface TransitionEventInit extends EventInit { - propertyName?: string; elapsedTime?: number; + propertyName?: string; } interface UIEventInit extends EventInit { - view?: Window; detail?: number; + view?: Window; } interface WebAuthnExtensions { @@ -1149,11 +1149,11 @@ interface WebAuthnExtensions { interface WebGLContextAttributes { failIfMajorPerformanceCaveat?: boolean; alpha?: boolean; - depth?: boolean; - stencil?: boolean; antialias?: boolean; + depth?: boolean; premultipliedAlpha?: boolean; preserveDrawingBuffer?: boolean; + stencil?: boolean; } interface WebGLContextEventInit extends EventInit { @@ -1161,10 +1161,10 @@ interface WebGLContextEventInit extends EventInit { } interface WheelEventInit extends MouseEventInit { + deltaMode?: number; deltaX?: number; deltaY?: number; deltaZ?: number; - deltaMode?: number; } interface EventListener { @@ -1183,19 +1183,6 @@ interface WebKitFileCallback { (evt: Event): void; } -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; - readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number; -} - -declare var ANGLE_instanced_arrays: { - prototype: ANGLE_instanced_arrays; - new(): ANGLE_instanced_arrays; - readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number; -} - interface AnalyserNode extends AudioNode { fftSize: number; readonly frequencyBinCount: number; @@ -1211,8 +1198,21 @@ interface AnalyserNode extends AudioNode { declare var AnalyserNode: { prototype: AnalyserNode; new(): AnalyserNode; +}; + +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; + readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number; } +declare var ANGLE_instanced_arrays: { + prototype: ANGLE_instanced_arrays; + new(): ANGLE_instanced_arrays; + readonly VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: number; +}; + interface AnimationEvent extends Event { readonly animationName: string; readonly elapsedTime: number; @@ -1222,7 +1222,7 @@ interface AnimationEvent extends Event { declare var AnimationEvent: { prototype: AnimationEvent; new(typeArg: string, eventInitDict?: AnimationEventInit): AnimationEvent; -} +}; interface ApplicationCacheEventMap { "cached": Event; @@ -1267,7 +1267,7 @@ declare var ApplicationCache: { readonly OBSOLETE: number; readonly UNCACHED: number; readonly UPDATEREADY: number; -} +}; interface Attr extends Node { readonly name: string; @@ -1280,7 +1280,7 @@ interface Attr extends Node { declare var Attr: { prototype: Attr; new(): Attr; -} +}; interface AudioBuffer { readonly duration: number; @@ -1295,7 +1295,7 @@ interface AudioBuffer { declare var AudioBuffer: { prototype: AudioBuffer; new(): AudioBuffer; -} +}; interface AudioBufferSourceNodeEventMap { "ended": MediaStreamErrorEvent; @@ -1318,7 +1318,7 @@ interface AudioBufferSourceNode extends AudioNode { declare var AudioBufferSourceNode: { prototype: AudioBufferSourceNode; new(): AudioBufferSourceNode; -} +}; interface AudioContextEventMap { "statechange": Event; @@ -1364,7 +1364,7 @@ interface AudioContext extends AudioContextBase { declare var AudioContext: { prototype: AudioContext; new(): AudioContext; -} +}; interface AudioDestinationNode extends AudioNode { readonly maxChannelCount: number; @@ -1373,7 +1373,7 @@ interface AudioDestinationNode extends AudioNode { declare var AudioDestinationNode: { prototype: AudioDestinationNode; new(): AudioDestinationNode; -} +}; interface AudioListener { dopplerFactor: number; @@ -1386,7 +1386,7 @@ interface AudioListener { declare var AudioListener: { prototype: AudioListener; new(): AudioListener; -} +}; interface AudioNode extends EventTarget { channelCount: number; @@ -1405,7 +1405,7 @@ interface AudioNode extends EventTarget { declare var AudioNode: { prototype: AudioNode; new(): AudioNode; -} +}; interface AudioParam { readonly defaultValue: number; @@ -1421,7 +1421,7 @@ interface AudioParam { declare var AudioParam: { prototype: AudioParam; new(): AudioParam; -} +}; interface AudioProcessingEvent extends Event { readonly inputBuffer: AudioBuffer; @@ -1432,7 +1432,7 @@ interface AudioProcessingEvent extends Event { declare var AudioProcessingEvent: { prototype: AudioProcessingEvent; new(): AudioProcessingEvent; -} +}; interface AudioTrack { enabled: boolean; @@ -1446,7 +1446,7 @@ interface AudioTrack { declare var AudioTrack: { prototype: AudioTrack; new(): AudioTrack; -} +}; interface AudioTrackListEventMap { "addtrack": TrackEvent; @@ -1469,7 +1469,7 @@ interface AudioTrackList extends EventTarget { declare var AudioTrackList: { prototype: AudioTrackList; new(): AudioTrackList; -} +}; interface BarProp { readonly visible: boolean; @@ -1478,7 +1478,7 @@ interface BarProp { declare var BarProp: { prototype: BarProp; new(): BarProp; -} +}; interface BeforeUnloadEvent extends Event { returnValue: any; @@ -1487,13 +1487,13 @@ interface BeforeUnloadEvent extends Event { declare var BeforeUnloadEvent: { prototype: BeforeUnloadEvent; new(): BeforeUnloadEvent; -} +}; interface BiquadFilterNode extends AudioNode { - readonly Q: AudioParam; readonly detune: AudioParam; readonly frequency: AudioParam; readonly gain: AudioParam; + readonly Q: AudioParam; type: BiquadFilterType; getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void; } @@ -1501,7 +1501,7 @@ interface BiquadFilterNode extends AudioNode { declare var BiquadFilterNode: { prototype: BiquadFilterNode; new(): BiquadFilterNode; -} +}; interface Blob { readonly size: number; @@ -1514,16 +1514,305 @@ interface Blob { declare var Blob: { prototype: Blob; new (blobParts?: any[], options?: BlobPropertyBag): Blob; +}; + +interface Cache { + add(request: RequestInfo): Promise; + addAll(requests: RequestInfo[]): Promise; + delete(request: RequestInfo, options?: CacheQueryOptions): Promise; + keys(request?: RequestInfo, options?: CacheQueryOptions): any; + match(request: RequestInfo, options?: CacheQueryOptions): Promise; + matchAll(request?: RequestInfo, options?: CacheQueryOptions): any; + put(request: RequestInfo, response: Response): Promise; } +declare var Cache: { + prototype: Cache; + new(): Cache; +}; + +interface CacheStorage { + delete(cacheName: string): Promise; + has(cacheName: string): Promise; + keys(): any; + match(request: RequestInfo, options?: CacheQueryOptions): Promise; + open(cacheName: string): Promise; +} + +declare var CacheStorage: { + prototype: CacheStorage; + new(): CacheStorage; +}; + +interface CanvasGradient { + addColorStop(offset: number, color: string): void; +} + +declare var CanvasGradient: { + prototype: CanvasGradient; + new(): CanvasGradient; +}; + +interface CanvasPattern { + setTransform(matrix: SVGMatrix): void; +} + +declare var CanvasPattern: { + prototype: CanvasPattern; + new(): CanvasPattern; +}; + +interface CanvasRenderingContext2D extends Object, CanvasPathMethods { + readonly canvas: HTMLCanvasElement; + fillStyle: string | CanvasGradient | CanvasPattern; + font: string; + globalAlpha: number; + globalCompositeOperation: string; + imageSmoothingEnabled: boolean; + lineCap: string; + lineDashOffset: number; + lineJoin: string; + lineWidth: number; + miterLimit: number; + msFillRule: CanvasFillRule; + shadowBlur: number; + shadowColor: string; + shadowOffsetX: number; + shadowOffsetY: number; + strokeStyle: string | CanvasGradient | CanvasPattern; + textAlign: string; + textBaseline: string; + mozImageSmoothingEnabled: boolean; + webkitImageSmoothingEnabled: boolean; + oImageSmoothingEnabled: boolean; + beginPath(): void; + clearRect(x: number, y: number, w: number, h: number): void; + clip(fillRule?: CanvasFillRule): 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; + createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient; + drawFocusIfNeeded(element: Element): void; + drawImage(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap, dstX: number, dstY: number): void; + drawImage(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap, dstX: number, dstY: number, dstW: number, dstH: number): void; + drawImage(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap, srcX: number, srcY: number, srcW: number, srcH: number, dstX: number, dstY: number, dstW: number, dstH: number): void; + fill(fillRule?: CanvasFillRule): void; + fillRect(x: number, y: number, w: number, h: number): void; + fillText(text: string, x: number, y: number, maxWidth?: number): void; + getImageData(sx: number, sy: number, sw: number, sh: number): ImageData; + getLineDash(): number[]; + isPointInPath(x: number, y: number, fillRule?: CanvasFillRule): boolean; + measureText(text: string): TextMetrics; + putImageData(imagedata: ImageData, dx: number, dy: number, dirtyX?: number, dirtyY?: number, dirtyWidth?: number, dirtyHeight?: number): void; + restore(): void; + rotate(angle: number): void; + save(): void; + scale(x: number, y: number): void; + setLineDash(segments: number[]): void; + setTransform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void; + stroke(path?: Path2D): void; + strokeRect(x: number, y: number, w: number, h: number): void; + strokeText(text: string, x: number, y: number, maxWidth?: number): void; + transform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void; + translate(x: number, y: number): void; +} + +declare var CanvasRenderingContext2D: { + prototype: CanvasRenderingContext2D; + new(): CanvasRenderingContext2D; +}; + interface CDATASection extends Text { } declare var CDATASection: { prototype: CDATASection; new(): CDATASection; +}; + +interface ChannelMergerNode extends AudioNode { } +declare var ChannelMergerNode: { + prototype: ChannelMergerNode; + new(): ChannelMergerNode; +}; + +interface ChannelSplitterNode extends AudioNode { +} + +declare var ChannelSplitterNode: { + prototype: ChannelSplitterNode; + new(): ChannelSplitterNode; +}; + +interface CharacterData extends Node, ChildNode { + data: string; + readonly length: number; + appendData(arg: string): void; + deleteData(offset: number, count: number): void; + insertData(offset: number, arg: string): void; + replaceData(offset: number, count: number, arg: string): void; + substringData(offset: number, count: number): string; +} + +declare var CharacterData: { + prototype: CharacterData; + new(): CharacterData; +}; + +interface ClientRect { + bottom: number; + readonly height: number; + left: number; + right: number; + top: number; + readonly width: number; +} + +declare var ClientRect: { + prototype: ClientRect; + new(): ClientRect; +}; + +interface ClientRectList { + readonly length: number; + item(index: number): ClientRect; + [index: number]: ClientRect; +} + +declare var ClientRectList: { + prototype: ClientRectList; + new(): ClientRectList; +}; + +interface ClipboardEvent extends Event { + readonly clipboardData: DataTransfer; +} + +declare var ClipboardEvent: { + prototype: ClipboardEvent; + new(type: string, eventInitDict?: ClipboardEventInit): ClipboardEvent; +}; + +interface CloseEvent extends Event { + readonly code: number; + readonly reason: string; + readonly wasClean: boolean; + initCloseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, wasCleanArg: boolean, codeArg: number, reasonArg: string): void; +} + +declare var CloseEvent: { + prototype: CloseEvent; + new(typeArg: string, eventInitDict?: CloseEventInit): CloseEvent; +}; + +interface Comment extends CharacterData { + text: string; +} + +declare var Comment: { + prototype: Comment; + new(): Comment; +}; + +interface CompositionEvent extends UIEvent { + readonly data: string; + readonly locale: string; + initCompositionEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, dataArg: string, locale: string): void; +} + +declare var CompositionEvent: { + prototype: CompositionEvent; + new(typeArg: string, eventInitDict?: CompositionEventInit): CompositionEvent; +}; + +interface Console { + assert(test?: boolean, message?: string, ...optionalParams: any[]): void; + clear(): void; + count(countTitle?: string): void; + debug(message?: any, ...optionalParams: any[]): void; + 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, ...optionalParams: any[]): void; + groupCollapsed(groupTitle?: string, ...optionalParams: any[]): void; + groupEnd(): void; + info(message?: any, ...optionalParams: any[]): void; + log(message?: any, ...optionalParams: any[]): void; + msIsIndependentlyComposed(element: Element): boolean; + profile(reportName?: string): void; + profileEnd(): void; + select(element: Element): void; + table(...data: any[]): void; + time(timerName?: string): void; + timeEnd(timerName?: string): void; + trace(message?: any, ...optionalParams: any[]): void; + warn(message?: any, ...optionalParams: any[]): void; +} + +declare var Console: { + prototype: Console; + new(): Console; +}; + +interface ConvolverNode extends AudioNode { + buffer: AudioBuffer | null; + normalize: boolean; +} + +declare var ConvolverNode: { + prototype: ConvolverNode; + new(): ConvolverNode; +}; + +interface Coordinates { + 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: { + prototype: Coordinates; + new(): Coordinates; +}; + +interface Crypto extends Object, RandomSource { + readonly subtle: SubtleCrypto; +} + +declare var Crypto: { + prototype: Crypto; + new(): Crypto; +}; + +interface CryptoKey { + readonly algorithm: KeyAlgorithm; + readonly extractable: boolean; + readonly type: string; + readonly usages: string[]; +} + +declare var CryptoKey: { + prototype: CryptoKey; + new(): CryptoKey; +}; + +interface CryptoKeyPair { + privateKey: CryptoKey; + publicKey: CryptoKey; +} + +declare var CryptoKeyPair: { + prototype: CryptoKeyPair; + new(): CryptoKeyPair; +}; + interface CSS { supports(property: string, value?: string): boolean; } @@ -1536,7 +1825,7 @@ interface CSSConditionRule extends CSSGroupingRule { declare var CSSConditionRule: { prototype: CSSConditionRule; new(): CSSConditionRule; -} +}; interface CSSFontFaceRule extends CSSRule { readonly style: CSSStyleDeclaration; @@ -1545,7 +1834,7 @@ interface CSSFontFaceRule extends CSSRule { declare var CSSFontFaceRule: { prototype: CSSFontFaceRule; new(): CSSFontFaceRule; -} +}; interface CSSGroupingRule extends CSSRule { readonly cssRules: CSSRuleList; @@ -1556,7 +1845,7 @@ interface CSSGroupingRule extends CSSRule { declare var CSSGroupingRule: { prototype: CSSGroupingRule; new(): CSSGroupingRule; -} +}; interface CSSImportRule extends CSSRule { readonly href: string; @@ -1567,7 +1856,7 @@ interface CSSImportRule extends CSSRule { declare var CSSImportRule: { prototype: CSSImportRule; new(): CSSImportRule; -} +}; interface CSSKeyframeRule extends CSSRule { keyText: string; @@ -1577,7 +1866,7 @@ interface CSSKeyframeRule extends CSSRule { declare var CSSKeyframeRule: { prototype: CSSKeyframeRule; new(): CSSKeyframeRule; -} +}; interface CSSKeyframesRule extends CSSRule { readonly cssRules: CSSRuleList; @@ -1590,7 +1879,7 @@ interface CSSKeyframesRule extends CSSRule { declare var CSSKeyframesRule: { prototype: CSSKeyframesRule; new(): CSSKeyframesRule; -} +}; interface CSSMediaRule extends CSSConditionRule { readonly media: MediaList; @@ -1599,7 +1888,7 @@ interface CSSMediaRule extends CSSConditionRule { declare var CSSMediaRule: { prototype: CSSMediaRule; new(): CSSMediaRule; -} +}; interface CSSNamespaceRule extends CSSRule { readonly namespaceURI: string; @@ -1609,7 +1898,7 @@ interface CSSNamespaceRule extends CSSRule { declare var CSSNamespaceRule: { prototype: CSSNamespaceRule; new(): CSSNamespaceRule; -} +}; interface CSSPageRule extends CSSRule { readonly pseudoClass: string; @@ -1621,7 +1910,7 @@ interface CSSPageRule extends CSSRule { declare var CSSPageRule: { prototype: CSSPageRule; new(): CSSPageRule; -} +}; interface CSSRule { cssText: string; @@ -1631,8 +1920,8 @@ interface CSSRule { readonly CHARSET_RULE: number; readonly FONT_FACE_RULE: number; readonly IMPORT_RULE: number; - readonly KEYFRAMES_RULE: number; readonly KEYFRAME_RULE: number; + readonly KEYFRAMES_RULE: number; readonly MEDIA_RULE: number; readonly NAMESPACE_RULE: number; readonly PAGE_RULE: number; @@ -1648,8 +1937,8 @@ declare var CSSRule: { readonly CHARSET_RULE: number; readonly FONT_FACE_RULE: number; readonly IMPORT_RULE: number; - readonly KEYFRAMES_RULE: number; readonly KEYFRAME_RULE: number; + readonly KEYFRAMES_RULE: number; readonly MEDIA_RULE: number; readonly NAMESPACE_RULE: number; readonly PAGE_RULE: number; @@ -1657,7 +1946,7 @@ declare var CSSRule: { readonly SUPPORTS_RULE: number; readonly UNKNOWN_RULE: number; readonly VIEWPORT_RULE: number; -} +}; interface CSSRuleList { readonly length: number; @@ -1668,13 +1957,13 @@ interface CSSRuleList { declare var CSSRuleList: { prototype: CSSRuleList; new(): CSSRuleList; -} +}; interface CSSStyleDeclaration { alignContent: string | null; alignItems: string | null; - alignSelf: string | null; alignmentBaseline: string | null; + alignSelf: string | null; animation: string | null; animationDelay: string | null; animationDirection: string | null; @@ -1750,9 +2039,9 @@ interface CSSStyleDeclaration { columnRuleColor: any; columnRuleStyle: string | null; columnRuleWidth: any; + columns: string | null; columnSpan: string | null; columnWidth: any; - columns: string | null; content: string | null; counterIncrement: string | null; counterReset: string | null; @@ -1822,24 +2111,24 @@ interface CSSStyleDeclaration { minHeight: string | null; minWidth: string | null; msContentZoomChaining: string | null; + msContentZooming: string | null; msContentZoomLimit: string | null; msContentZoomLimitMax: any; msContentZoomLimitMin: any; 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 | null; - msGridColumnSpan: any; msGridColumns: string | null; + msGridColumnSpan: any; msGridRow: any; msGridRowAlign: string | null; - msGridRowSpan: any; msGridRows: string | null; + msGridRowSpan: any; msHighContrastAdjust: string | null; msHyphenateLimitChars: string | null; msHyphenateLimitLines: any; @@ -1975,9 +2264,9 @@ interface CSSStyleDeclaration { webkitColumnRuleColor: any; webkitColumnRuleStyle: string | null; webkitColumnRuleWidth: any; + webkitColumns: string | null; webkitColumnSpan: string | null; webkitColumnWidth: any; - webkitColumns: string | null; webkitFilter: string | null; webkitFlex: string | null; webkitFlexBasis: string | null; @@ -2029,7 +2318,7 @@ interface CSSStyleDeclaration { declare var CSSStyleDeclaration: { prototype: CSSStyleDeclaration; new(): CSSStyleDeclaration; -} +}; interface CSSStyleRule extends CSSRule { readonly readOnly: boolean; @@ -2040,7 +2329,7 @@ interface CSSStyleRule extends CSSRule { declare var CSSStyleRule: { prototype: CSSStyleRule; new(): CSSStyleRule; -} +}; interface CSSStyleSheet extends StyleSheet { readonly cssRules: CSSRuleList; @@ -2066,7 +2355,7 @@ interface CSSStyleSheet extends StyleSheet { declare var CSSStyleSheet: { prototype: CSSStyleSheet; new(): CSSStyleSheet; -} +}; interface CSSSupportsRule extends CSSConditionRule { } @@ -2074,296 +2363,7 @@ interface CSSSupportsRule extends CSSConditionRule { declare var CSSSupportsRule: { prototype: CSSSupportsRule; new(): CSSSupportsRule; -} - -interface Cache { - add(request: RequestInfo): Promise; - addAll(requests: RequestInfo[]): Promise; - delete(request: RequestInfo, options?: CacheQueryOptions): Promise; - keys(request?: RequestInfo, options?: CacheQueryOptions): any; - match(request: RequestInfo, options?: CacheQueryOptions): Promise; - matchAll(request?: RequestInfo, options?: CacheQueryOptions): any; - put(request: RequestInfo, response: Response): Promise; -} - -declare var Cache: { - prototype: Cache; - new(): Cache; -} - -interface CacheStorage { - delete(cacheName: string): Promise; - has(cacheName: string): Promise; - keys(): any; - match(request: RequestInfo, options?: CacheQueryOptions): Promise; - open(cacheName: string): Promise; -} - -declare var CacheStorage: { - prototype: CacheStorage; - new(): CacheStorage; -} - -interface CanvasGradient { - addColorStop(offset: number, color: string): void; -} - -declare var CanvasGradient: { - prototype: CanvasGradient; - new(): CanvasGradient; -} - -interface CanvasPattern { - setTransform(matrix: SVGMatrix): void; -} - -declare var CanvasPattern: { - prototype: CanvasPattern; - new(): CanvasPattern; -} - -interface CanvasRenderingContext2D extends Object, CanvasPathMethods { - readonly canvas: HTMLCanvasElement; - fillStyle: string | CanvasGradient | CanvasPattern; - font: string; - globalAlpha: number; - globalCompositeOperation: string; - imageSmoothingEnabled: boolean; - lineCap: string; - lineDashOffset: number; - lineJoin: string; - lineWidth: number; - miterLimit: number; - msFillRule: CanvasFillRule; - shadowBlur: number; - shadowColor: string; - shadowOffsetX: number; - shadowOffsetY: number; - strokeStyle: string | CanvasGradient | CanvasPattern; - textAlign: string; - textBaseline: string; - mozImageSmoothingEnabled: boolean; - webkitImageSmoothingEnabled: boolean; - oImageSmoothingEnabled: boolean; - beginPath(): void; - clearRect(x: number, y: number, w: number, h: number): void; - clip(fillRule?: CanvasFillRule): 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; - createRadialGradient(x0: number, y0: number, r0: number, x1: number, y1: number, r1: number): CanvasGradient; - drawFocusIfNeeded(element: Element): void; - drawImage(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap, dstX: number, dstY: number): void; - drawImage(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap, dstX: number, dstY: number, dstW: number, dstH: number): void; - drawImage(image: HTMLImageElement | HTMLCanvasElement | HTMLVideoElement | ImageBitmap, srcX: number, srcY: number, srcW: number, srcH: number, dstX: number, dstY: number, dstW: number, dstH: number): void; - fill(fillRule?: CanvasFillRule): void; - fillRect(x: number, y: number, w: number, h: number): void; - fillText(text: string, x: number, y: number, maxWidth?: number): void; - getImageData(sx: number, sy: number, sw: number, sh: number): ImageData; - getLineDash(): number[]; - isPointInPath(x: number, y: number, fillRule?: CanvasFillRule): boolean; - measureText(text: string): TextMetrics; - putImageData(imagedata: ImageData, dx: number, dy: number, dirtyX?: number, dirtyY?: number, dirtyWidth?: number, dirtyHeight?: number): void; - restore(): void; - rotate(angle: number): void; - save(): void; - scale(x: number, y: number): void; - setLineDash(segments: number[]): void; - setTransform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void; - stroke(path?: Path2D): void; - strokeRect(x: number, y: number, w: number, h: number): void; - strokeText(text: string, x: number, y: number, maxWidth?: number): void; - transform(m11: number, m12: number, m21: number, m22: number, dx: number, dy: number): void; - translate(x: number, y: number): void; -} - -declare var CanvasRenderingContext2D: { - prototype: CanvasRenderingContext2D; - new(): CanvasRenderingContext2D; -} - -interface ChannelMergerNode extends AudioNode { -} - -declare var ChannelMergerNode: { - prototype: ChannelMergerNode; - new(): ChannelMergerNode; -} - -interface ChannelSplitterNode extends AudioNode { -} - -declare var ChannelSplitterNode: { - prototype: ChannelSplitterNode; - new(): ChannelSplitterNode; -} - -interface CharacterData extends Node, ChildNode { - data: string; - readonly length: number; - appendData(arg: string): void; - deleteData(offset: number, count: number): void; - insertData(offset: number, arg: string): void; - replaceData(offset: number, count: number, arg: string): void; - substringData(offset: number, count: number): string; -} - -declare var CharacterData: { - prototype: CharacterData; - new(): CharacterData; -} - -interface ClientRect { - bottom: number; - readonly height: number; - left: number; - right: number; - top: number; - readonly width: number; -} - -declare var ClientRect: { - prototype: ClientRect; - new(): ClientRect; -} - -interface ClientRectList { - readonly length: number; - item(index: number): ClientRect; - [index: number]: ClientRect; -} - -declare var ClientRectList: { - prototype: ClientRectList; - new(): ClientRectList; -} - -interface ClipboardEvent extends Event { - readonly clipboardData: DataTransfer; -} - -declare var ClipboardEvent: { - prototype: ClipboardEvent; - new(type: string, eventInitDict?: ClipboardEventInit): ClipboardEvent; -} - -interface CloseEvent extends Event { - readonly code: number; - readonly reason: string; - readonly wasClean: boolean; - initCloseEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, wasCleanArg: boolean, codeArg: number, reasonArg: string): void; -} - -declare var CloseEvent: { - prototype: CloseEvent; - new(typeArg: string, eventInitDict?: CloseEventInit): CloseEvent; -} - -interface Comment extends CharacterData { - text: string; -} - -declare var Comment: { - prototype: Comment; - new(): Comment; -} - -interface CompositionEvent extends UIEvent { - readonly data: string; - readonly locale: string; - initCompositionEvent(typeArg: string, canBubbleArg: boolean, cancelableArg: boolean, viewArg: Window, dataArg: string, locale: string): void; -} - -declare var CompositionEvent: { - prototype: CompositionEvent; - new(typeArg: string, eventInitDict?: CompositionEventInit): CompositionEvent; -} - -interface Console { - assert(test?: boolean, message?: string, ...optionalParams: any[]): void; - clear(): void; - count(countTitle?: string): void; - debug(message?: any, ...optionalParams: any[]): void; - 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; - info(message?: any, ...optionalParams: any[]): void; - log(message?: any, ...optionalParams: any[]): void; - msIsIndependentlyComposed(element: Element): boolean; - profile(reportName?: string): void; - profileEnd(): void; - select(element: Element): void; - table(...data: any[]): void; - time(timerName?: string): void; - timeEnd(timerName?: string): void; - trace(message?: any, ...optionalParams: any[]): void; - warn(message?: any, ...optionalParams: any[]): void; -} - -declare var Console: { - prototype: Console; - new(): Console; -} - -interface ConvolverNode extends AudioNode { - buffer: AudioBuffer | null; - normalize: boolean; -} - -declare var ConvolverNode: { - prototype: ConvolverNode; - new(): ConvolverNode; -} - -interface Coordinates { - 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: { - prototype: Coordinates; - new(): Coordinates; -} - -interface Crypto extends Object, RandomSource { - readonly subtle: SubtleCrypto; -} - -declare var Crypto: { - prototype: Crypto; - new(): Crypto; -} - -interface CryptoKey { - readonly algorithm: KeyAlgorithm; - readonly extractable: boolean; - readonly type: string; - readonly usages: string[]; -} - -declare var CryptoKey: { - prototype: CryptoKey; - new(): CryptoKey; -} - -interface CryptoKeyPair { - privateKey: CryptoKey; - publicKey: CryptoKey; -} - -declare var CryptoKeyPair: { - prototype: CryptoKeyPair; - new(): CryptoKeyPair; -} +}; interface CustomEvent extends Event { readonly detail: any; @@ -2373,150 +2373,7 @@ interface CustomEvent extends Event { declare var CustomEvent: { prototype: CustomEvent; new(typeArg: string, eventInitDict?: CustomEventInit): CustomEvent; -} - -interface DOMError { - readonly name: string; - toString(): string; -} - -declare var DOMError: { - prototype: DOMError; - new(): DOMError; -} - -interface DOMException { - readonly code: number; - readonly message: string; - readonly name: string; - toString(): string; - 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; - 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 | null, qualifiedName: string | null, doctype: DocumentType | null): Document; - createDocumentType(qualifiedName: string, publicId: string, systemId: string): DocumentType; - createHTMLDocument(title: string): Document; - hasFeature(feature: string | null, version: string | null): boolean; -} - -declare var DOMImplementation: { - prototype: DOMImplementation; - new(): DOMImplementation; -} - -interface DOMParser { - parseFromString(source: string, mimeType: string): Document; -} - -declare var DOMParser: { - prototype: DOMParser; - new(): DOMParser; -} - -interface DOMSettableTokenList extends DOMTokenList { - value: string; -} - -declare var DOMSettableTokenList: { - prototype: DOMSettableTokenList; - new(): DOMSettableTokenList; -} - -interface DOMStringList { - readonly length: number; - contains(str: string): boolean; - item(index: number): string | null; - [index: number]: string; -} - -declare var DOMStringList: { - prototype: DOMStringList; - new(): DOMStringList; -} - -interface DOMStringMap { - [name: string]: string | undefined; -} - -declare var DOMStringMap: { - prototype: DOMStringMap; - new(): DOMStringMap; -} - -interface DOMTokenList { - readonly length: number; - add(...token: string[]): void; - contains(token: string): boolean; - item(index: number): string; - remove(...token: string[]): void; - toString(): string; - toggle(token: string, force?: boolean): boolean; - [index: number]: string; -} - -declare var DOMTokenList: { - prototype: DOMTokenList; - new(): DOMTokenList; -} +}; interface DataCue extends TextTrackCue { data: ArrayBuffer; @@ -2527,7 +2384,7 @@ interface DataCue extends TextTrackCue { declare var DataCue: { prototype: DataCue; new(): DataCue; -} +}; interface DataTransfer { dropEffect: string; @@ -2544,7 +2401,7 @@ interface DataTransfer { declare var DataTransfer: { prototype: DataTransfer; new(): DataTransfer; -} +}; interface DataTransferItem { readonly kind: string; @@ -2557,7 +2414,7 @@ interface DataTransferItem { declare var DataTransferItem: { prototype: DataTransferItem; new(): DataTransferItem; -} +}; interface DataTransferItemList { readonly length: number; @@ -2571,7 +2428,7 @@ interface DataTransferItemList { declare var DataTransferItemList: { prototype: DataTransferItemList; new(): DataTransferItemList; -} +}; interface DeferredPermissionRequest { readonly id: number; @@ -2584,7 +2441,7 @@ interface DeferredPermissionRequest { declare var DeferredPermissionRequest: { prototype: DeferredPermissionRequest; new(): DeferredPermissionRequest; -} +}; interface DelayNode extends AudioNode { readonly delayTime: AudioParam; @@ -2593,7 +2450,7 @@ interface DelayNode extends AudioNode { declare var DelayNode: { prototype: DelayNode; new(): DelayNode; -} +}; interface DeviceAcceleration { readonly x: number | null; @@ -2604,7 +2461,7 @@ interface DeviceAcceleration { declare var DeviceAcceleration: { prototype: DeviceAcceleration; new(): DeviceAcceleration; -} +}; interface DeviceLightEvent extends Event { readonly value: number; @@ -2613,7 +2470,7 @@ interface DeviceLightEvent extends Event { declare var DeviceLightEvent: { prototype: DeviceLightEvent; new(typeArg: string, eventInitDict?: DeviceLightEventInit): DeviceLightEvent; -} +}; interface DeviceMotionEvent extends Event { readonly acceleration: DeviceAcceleration | null; @@ -2626,7 +2483,7 @@ interface DeviceMotionEvent extends Event { declare var DeviceMotionEvent: { prototype: DeviceMotionEvent; new(typeArg: string, eventInitDict?: DeviceMotionEventInit): DeviceMotionEvent; -} +}; interface DeviceOrientationEvent extends Event { readonly absolute: boolean; @@ -2639,7 +2496,7 @@ interface DeviceOrientationEvent extends Event { declare var DeviceOrientationEvent: { prototype: DeviceOrientationEvent; new(typeArg: string, eventInitDict?: DeviceOrientationEventInit): DeviceOrientationEvent; -} +}; interface DeviceRotationRate { readonly alpha: number | null; @@ -2650,7 +2507,7 @@ interface DeviceRotationRate { declare var DeviceRotationRate: { prototype: DeviceRotationRate; new(): DeviceRotationRate; -} +}; interface DocumentEventMap extends GlobalEventHandlersEventMap { "abort": UIEvent; @@ -2745,299 +2602,291 @@ interface DocumentEventMap extends GlobalEventHandlersEventMap { interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEvent, ParentNode, DocumentOrShadowRoot { /** - * Sets or gets the URL for the current document. - */ - readonly URL: string; - /** - * Gets the URL for the document, stripped of any character encoding. - */ - readonly URLUnencoded: string; - /** - * Gets the object that has the focus when the parent document has focus. - */ + * Gets the object that has the focus when the parent document has focus. + */ readonly activeElement: Element; /** - * Sets or gets the color of all active links in the document. - */ + * Sets or gets the color of all active links in the document. + */ alinkColor: string; /** - * Returns a reference to the collection of elements contained by the object. - */ + * Returns a reference to the collection of elements contained by the object. + */ 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. - */ + * 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: HTMLCollectionOf; /** - * Retrieves a collection of all applet objects in the document. - */ + * Retrieves a collection of all applet objects in the document. + */ applets: HTMLCollectionOf; /** - * Deprecated. Sets or retrieves a value that indicates the background color behind the object. - */ + * Deprecated. Sets or retrieves a value that indicates the background color behind the object. + */ bgColor: string; /** - * Specifies the beginning and end of the document body. - */ + * Specifies the beginning and end of the document body. + */ body: HTMLElement; readonly characterSet: string; /** - * Gets or sets the character set used to encode the object. - */ + * Gets or sets the character set used to encode the object. + */ charset: string; /** - * Gets a value that indicates whether standards-compliant mode is switched on for the object. - */ + * Gets a value that indicates whether standards-compliant mode is switched on for the object. + */ readonly compatMode: string; cookie: string; readonly currentScript: HTMLScriptElement | SVGScriptElement; readonly defaultView: Window; /** - * Sets or gets a value that indicates whether the document can be edited. - */ + * Sets or gets a value that indicates whether the document can be edited. + */ designMode: string; /** - * Sets or retrieves a value that indicates the reading order of the object. - */ + * Sets or retrieves a value that indicates the reading order of the object. + */ dir: string; /** - * Gets an object representing the document type declaration associated with the current document. - */ + * Gets an object representing the document type declaration associated with the current document. + */ readonly doctype: DocumentType; /** - * Gets a reference to the root node of the document. - */ + * Gets a reference to the root node of the document. + */ documentElement: HTMLElement; /** - * Sets or gets the security domain of the document. - */ + * Sets or gets the security domain of the document. + */ domain: string; /** - * Retrieves a collection of all embed objects in the document. - */ + * Retrieves a collection of all embed objects in the document. + */ embeds: HTMLCollectionOf; /** - * Sets or gets the foreground (text) color of the document. - */ + * Sets or gets the foreground (text) color of the document. + */ fgColor: string; /** - * Retrieves a collection, in source order, of all form objects in the document. - */ + * Retrieves a collection, in source order, of all form objects in the document. + */ forms: HTMLCollectionOf; 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. - */ + * Retrieves a collection, in source order, of img objects in the document. + */ images: HTMLCollectionOf; /** - * Gets the implementation object of the current document. - */ + * Gets the implementation object of the current document. + */ readonly implementation: DOMImplementation; /** - * Returns the character encoding used to create the webpage that is loaded into the document object. - */ + * Returns the character encoding used to create the webpage that is loaded into the document object. + */ readonly inputEncoding: string | null; /** - * Gets the date that the page was last modified, if the page supplies one. - */ + * Gets the date that the page was last modified, if the page supplies one. + */ readonly lastModified: string; /** - * Sets or gets the color of the document links. - */ + * Sets or gets the color of the document links. + */ linkColor: string; /** - * Retrieves a collection of all a objects that specify the href property and all area objects in the document. - */ + * Retrieves a collection of all a objects that specify the href property and all area objects in the document. + */ links: HTMLCollectionOf; /** - * Contains information about the current URL. - */ + * Contains information about the current URL. + */ readonly location: Location; - msCSSOMElementFloatMetrics: boolean; msCapsLockWarningOff: boolean; + msCSSOMElementFloatMetrics: boolean; /** - * Fires when the user aborts the download. - * @param ev The event. - */ + * Fires when the user aborts the download. + * @param ev The event. + */ onabort: (this: Document, ev: UIEvent) => any; /** - * Fires when the object is set as the active element. - * @param ev The event. - */ + * Fires when the object is set as the active element. + * @param ev The event. + */ onactivate: (this: Document, ev: UIEvent) => any; /** - * Fires immediately before the object is set as the active element. - * @param ev The event. - */ + * Fires immediately before the object is set as the active element. + * @param ev The event. + */ onbeforeactivate: (this: Document, 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. - */ + * Fires immediately before the activeElement is changed from the current object to another object in the parent document. + * @param ev The event. + */ onbeforedeactivate: (this: Document, ev: UIEvent) => any; - /** - * Fires when the object loses the input focus. - * @param ev The focus event. - */ + /** + * Fires when the object loses the input focus. + * @param ev The focus event. + */ onblur: (this: Document, ev: FocusEvent) => any; /** - * Occurs when playback is possible, but would require further buffering. - * @param ev The event. - */ + * Occurs when playback is possible, but would require further buffering. + * @param ev The event. + */ oncanplay: (this: Document, ev: Event) => any; oncanplaythrough: (this: Document, ev: Event) => any; /** - * Fires when the contents of the object or selection have changed. - * @param ev The event. - */ + * Fires when the contents of the object or selection have changed. + * @param ev The event. + */ onchange: (this: Document, ev: Event) => any; /** - * Fires when the user clicks the left mouse button on the object - * @param ev The mouse event. - */ + * Fires when the user clicks the left mouse button on the object + * @param ev The mouse event. + */ onclick: (this: Document, 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. - */ + * Fires when the user clicks the right mouse button in the client area, opening the context menu. + * @param ev The mouse event. + */ oncontextmenu: (this: Document, ev: PointerEvent) => any; /** - * Fires when the user double-clicks the object. - * @param ev The mouse event. - */ + * Fires when the user double-clicks the object. + * @param ev The mouse event. + */ ondblclick: (this: Document, 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 - */ + * Fires when the activeElement is changed from the current object to another object in the parent document. + * @param ev The UI Event + */ ondeactivate: (this: Document, ev: UIEvent) => any; /** - * Fires on the source object continuously during a drag operation. - * @param ev The event. - */ + * Fires on the source object continuously during a drag operation. + * @param ev The event. + */ ondrag: (this: Document, 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. - */ + * Fires on the source object when the user releases the mouse at the close of a drag operation. + * @param ev The event. + */ ondragend: (this: Document, ev: DragEvent) => any; - /** - * Fires on the target element when the user drags the object to a valid drop target. - * @param ev The drag event. - */ + /** + * Fires on the target element when the user drags the object to a valid drop target. + * @param ev The drag event. + */ ondragenter: (this: Document, 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. - */ + /** + * 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: (this: Document, ev: DragEvent) => any; /** - * Fires on the target element continuously while the user drags the object over a valid drop target. - * @param ev The event. - */ + * Fires on the target element continuously while the user drags the object over a valid drop target. + * @param ev The event. + */ ondragover: (this: Document, ev: DragEvent) => any; /** - * Fires on the source object when the user starts to drag a text selection or selected object. - * @param ev The event. - */ + * Fires on the source object when the user starts to drag a text selection or selected object. + * @param ev The event. + */ ondragstart: (this: Document, ev: DragEvent) => any; ondrop: (this: Document, ev: DragEvent) => any; /** - * Occurs when the duration attribute is updated. - * @param ev The event. - */ + * Occurs when the duration attribute is updated. + * @param ev The event. + */ ondurationchange: (this: Document, ev: Event) => any; /** - * Occurs when the media element is reset to its initial state. - * @param ev The event. - */ + * Occurs when the media element is reset to its initial state. + * @param ev The event. + */ onemptied: (this: Document, ev: Event) => any; /** - * Occurs when the end of playback is reached. - * @param ev The event - */ + * Occurs when the end of playback is reached. + * @param ev The event + */ onended: (this: Document, ev: MediaStreamErrorEvent) => any; /** - * Fires when an error occurs during object loading. - * @param ev The event. - */ + * Fires when an error occurs during object loading. + * @param ev The event. + */ onerror: (this: Document, ev: ErrorEvent) => any; /** - * Fires when the object receives focus. - * @param ev The event. - */ + * Fires when the object receives focus. + * @param ev The event. + */ onfocus: (this: Document, ev: FocusEvent) => any; onfullscreenchange: (this: Document, ev: Event) => any; onfullscreenerror: (this: Document, ev: Event) => any; oninput: (this: Document, ev: Event) => any; oninvalid: (this: Document, ev: Event) => any; /** - * Fires when the user presses a key. - * @param ev The keyboard event - */ + * Fires when the user presses a key. + * @param ev The keyboard event + */ onkeydown: (this: Document, ev: KeyboardEvent) => any; /** - * Fires when the user presses an alphanumeric key. - * @param ev The event. - */ + * Fires when the user presses an alphanumeric key. + * @param ev The event. + */ onkeypress: (this: Document, ev: KeyboardEvent) => any; /** - * Fires when the user releases a key. - * @param ev The keyboard event - */ + * Fires when the user releases a key. + * @param ev The keyboard event + */ onkeyup: (this: Document, ev: KeyboardEvent) => any; /** - * Fires immediately after the browser loads the object. - * @param ev The event. - */ + * Fires immediately after the browser loads the object. + * @param ev The event. + */ onload: (this: Document, ev: Event) => any; /** - * Occurs when media data is loaded at the current playback position. - * @param ev The event. - */ + * Occurs when media data is loaded at the current playback position. + * @param ev The event. + */ onloadeddata: (this: Document, ev: Event) => any; /** - * Occurs when the duration and dimensions of the media have been determined. - * @param ev The event. - */ + * Occurs when the duration and dimensions of the media have been determined. + * @param ev The event. + */ onloadedmetadata: (this: Document, ev: Event) => any; /** - * Occurs when Internet Explorer begins looking for media data. - * @param ev The event. - */ + * Occurs when Internet Explorer begins looking for media data. + * @param ev The event. + */ onloadstart: (this: Document, ev: Event) => any; /** - * Fires when the user clicks the object with either mouse button. - * @param ev The mouse event. - */ + * Fires when the user clicks the object with either mouse button. + * @param ev The mouse event. + */ onmousedown: (this: Document, ev: MouseEvent) => any; /** - * Fires when the user moves the mouse over the object. - * @param ev The mouse event. - */ + * Fires when the user moves the mouse over the object. + * @param ev The mouse event. + */ onmousemove: (this: Document, ev: MouseEvent) => any; /** - * Fires when the user moves the mouse pointer outside the boundaries of the object. - * @param ev The mouse event. - */ + * Fires when the user moves the mouse pointer outside the boundaries of the object. + * @param ev The mouse event. + */ onmouseout: (this: Document, ev: MouseEvent) => any; /** - * Fires when the user moves the mouse pointer into the object. - * @param ev The mouse event. - */ + * Fires when the user moves the mouse pointer into the object. + * @param ev The mouse event. + */ onmouseover: (this: Document, ev: MouseEvent) => any; /** - * Fires when the user releases a mouse button while the mouse is over the object. - * @param ev The mouse event. - */ + * Fires when the user releases a mouse button while the mouse is over the object. + * @param ev The mouse event. + */ onmouseup: (this: Document, ev: MouseEvent) => any; /** - * Fires when the wheel button is rotated. - * @param ev The mouse event - */ + * Fires when the wheel button is rotated. + * @param ev The mouse event + */ onmousewheel: (this: Document, ev: WheelEvent) => any; onmscontentzoom: (this: Document, ev: UIEvent) => any; onmsgesturechange: (this: Document, ev: MSGestureEvent) => any; @@ -3057,146 +2906,154 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven onmspointerover: (this: Document, ev: MSPointerEvent) => any; onmspointerup: (this: Document, ev: MSPointerEvent) => any; /** - * Occurs when an item is removed from a Jump List of a webpage running in Site Mode. - * @param ev The event. - */ + * Occurs when an item is removed from a Jump List of a webpage running in Site Mode. + * @param ev The event. + */ onmssitemodejumplistitemremoved: (this: Document, 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. - */ + * Occurs when a user clicks a button in a Thumbnail Toolbar of a webpage running in Site Mode. + * @param ev The event. + */ onmsthumbnailclick: (this: Document, ev: MSSiteModeEvent) => any; /** - * Occurs when playback is paused. - * @param ev The event. - */ + * Occurs when playback is paused. + * @param ev The event. + */ onpause: (this: Document, ev: Event) => any; /** - * Occurs when the play method is requested. - * @param ev The event. - */ + * Occurs when the play method is requested. + * @param ev The event. + */ onplay: (this: Document, ev: Event) => any; /** - * Occurs when the audio or video has started playing. - * @param ev The event. - */ + * Occurs when the audio or video has started playing. + * @param ev The event. + */ onplaying: (this: Document, ev: Event) => any; onpointerlockchange: (this: Document, ev: Event) => any; onpointerlockerror: (this: Document, ev: Event) => any; /** - * Occurs to indicate progress while downloading media data. - * @param ev The event. - */ + * Occurs to indicate progress while downloading media data. + * @param ev The event. + */ onprogress: (this: Document, ev: ProgressEvent) => any; /** - * Occurs when the playback rate is increased or decreased. - * @param ev The event. - */ + * Occurs when the playback rate is increased or decreased. + * @param ev The event. + */ onratechange: (this: Document, ev: Event) => any; /** - * Fires when the state of the object has changed. - * @param ev The event - */ + * Fires when the state of the object has changed. + * @param ev The event + */ onreadystatechange: (this: Document, ev: Event) => any; /** - * Fires when the user resets a form. - * @param ev The event. - */ + * Fires when the user resets a form. + * @param ev The event. + */ onreset: (this: Document, ev: Event) => any; /** - * Fires when the user repositions the scroll box in the scroll bar on the object. - * @param ev The event. - */ + * Fires when the user repositions the scroll box in the scroll bar on the object. + * @param ev The event. + */ onscroll: (this: Document, ev: UIEvent) => any; /** - * Occurs when the seek operation ends. - * @param ev The event. - */ + * Occurs when the seek operation ends. + * @param ev The event. + */ onseeked: (this: Document, ev: Event) => any; /** - * Occurs when the current playback position is moved. - * @param ev The event. - */ + * Occurs when the current playback position is moved. + * @param ev The event. + */ onseeking: (this: Document, ev: Event) => any; /** - * Fires when the current selection changes. - * @param ev The event. - */ + * Fires when the current selection changes. + * @param ev The event. + */ onselect: (this: Document, ev: UIEvent) => any; /** - * Fires when the selection state of a document changes. - * @param ev The event. - */ + * Fires when the selection state of a document changes. + * @param ev The event. + */ onselectionchange: (this: Document, ev: Event) => any; onselectstart: (this: Document, ev: Event) => any; /** - * Occurs when the download has stopped. - * @param ev The event. - */ + * Occurs when the download has stopped. + * @param ev The event. + */ onstalled: (this: Document, ev: Event) => any; /** - * Fires when the user clicks the Stop button or leaves the Web page. - * @param ev The event. - */ + * Fires when the user clicks the Stop button or leaves the Web page. + * @param ev The event. + */ onstop: (this: Document, ev: Event) => any; onsubmit: (this: Document, ev: Event) => any; /** - * Occurs if the load operation has been intentionally halted. - * @param ev The event. - */ + * Occurs if the load operation has been intentionally halted. + * @param ev The event. + */ onsuspend: (this: Document, ev: Event) => any; /** - * Occurs to indicate the current playback position. - * @param ev The event. - */ + * Occurs to indicate the current playback position. + * @param ev The event. + */ ontimeupdate: (this: Document, ev: Event) => any; ontouchcancel: (ev: TouchEvent) => any; ontouchend: (ev: TouchEvent) => any; ontouchmove: (ev: TouchEvent) => any; ontouchstart: (ev: TouchEvent) => any; /** - * Occurs when the volume is changed, or playback is muted or unmuted. - * @param ev The event. - */ + * Occurs when the volume is changed, or playback is muted or unmuted. + * @param ev The event. + */ onvolumechange: (this: Document, ev: Event) => any; /** - * Occurs when playback stops because the next frame of a video resource is not available. - * @param ev The event. - */ + * Occurs when playback stops because the next frame of a video resource is not available. + * @param ev The event. + */ onwaiting: (this: Document, ev: Event) => any; onwebkitfullscreenchange: (this: Document, ev: Event) => any; onwebkitfullscreenerror: (this: Document, ev: Event) => any; plugins: HTMLCollectionOf; readonly pointerLockElement: Element; /** - * Retrieves a value that indicates the current state of the object. - */ + * Retrieves a value that indicates the current state of the object. + */ readonly readyState: string; /** - * Gets the URL of the location that referred the user to the current page. - */ + * Gets the URL of the location that referred the user to the current page. + */ readonly referrer: string; /** - * Gets the root svg element in the document hierarchy. - */ + * Gets the root svg element in the document hierarchy. + */ readonly rootElement: SVGSVGElement; /** - * Retrieves a collection of all script objects in the document. - */ + * Retrieves a collection of all script objects in the document. + */ scripts: HTMLCollectionOf; 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. - */ + * Retrieves a collection of styleSheet objects representing the style sheets that correspond to each instance of a link or style object in the document. + */ readonly styleSheets: StyleSheetList; /** - * Contains the title of the document. - */ + * Contains the title of the document. + */ title: string; + /** + * Sets or gets the URL for the current document. + */ + readonly URL: string; + /** + * Gets the URL for the document, stripped of any character encoding. + */ + readonly URLUnencoded: string; readonly visibilityState: VisibilityState; - /** - * Sets or gets the color of the links that the user has visited. - */ + /** + * Sets or gets the color of the links that the user has visited. + */ vlinkColor: string; readonly webkitCurrentFullScreenElement: Element | null; readonly webkitFullscreenElement: Element | null; @@ -3205,243 +3062,243 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven readonly xmlEncoding: string | null; xmlStandalone: boolean; /** - * Gets or sets the version attribute specified in the declaration of an XML document. - */ + * Gets or sets the version attribute specified in the declaration of an XML document. + */ xmlVersion: string | null; adoptNode(source: T): T; captureEvents(): void; caretRangeFromPoint(x: number, y: number): Range; clear(): void; /** - * Closes an output stream and forces the sent data to display. - */ + * Closes an output stream and forces the sent data to display. + */ close(): void; /** - * Creates an attribute object with a specified name. - * @param name String that sets the attribute object's name. - */ + * Creates an attribute object with a specified name. + * @param name String that sets the attribute object's name. + */ createAttribute(name: string): Attr; createAttributeNS(namespaceURI: string | null, qualifiedName: string): Attr; createCDATASection(data: string): CDATASection; /** - * Creates a comment object with the specified data. - * @param data Sets the comment object's data. - */ + * Creates a comment object with the specified data. + * @param data Sets the comment object's data. + */ createComment(data: string): Comment; /** - * Creates a new document. - */ + * Creates a new document. + */ createDocumentFragment(): DocumentFragment; /** - * Creates an instance of the element for the specified tag. - * @param tagName The name of an element. - */ + * Creates an instance of the element for the specified tag. + * @param tagName The name of an element. + */ createElement(tagName: K): HTMLElementTagNameMap[K]; 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 - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "componentTransferFunction"): SVGComponentTransferFunctionElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "defs"): SVGDefsElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "desc"): SVGDescElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "ellipse"): SVGEllipseElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feBlend"): SVGFEBlendElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feColorMatrix"): SVGFEColorMatrixElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feComponentTransfer"): SVGFEComponentTransferElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feComposite"): SVGFECompositeElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feConvolveMatrix"): SVGFEConvolveMatrixElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feDiffuseLighting"): SVGFEDiffuseLightingElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feDisplacementMap"): SVGFEDisplacementMapElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feDistantLight"): SVGFEDistantLightElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFlood"): SVGFEFloodElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncA"): SVGFEFuncAElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncB"): SVGFEFuncBElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncG"): SVGFEFuncGElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncR"): SVGFEFuncRElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feGaussianBlur"): SVGFEGaussianBlurElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feImage"): SVGFEImageElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feMerge"): SVGFEMergeElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feMergeNode"): SVGFEMergeNodeElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feMorphology"): SVGFEMorphologyElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feOffset"): SVGFEOffsetElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "fePointLight"): SVGFEPointLightElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feSpecularLighting"): SVGFESpecularLightingElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feSpotLight"): SVGFESpotLightElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feTile"): SVGFETileElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feTurbulence"): SVGFETurbulenceElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "filter"): SVGFilterElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "foreignObject"): SVGForeignObjectElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "g"): SVGGElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "image"): SVGImageElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "gradient"): SVGGradientElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "line"): SVGLineElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "linearGradient"): SVGLinearGradientElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "marker"): SVGMarkerElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "mask"): SVGMaskElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "path"): SVGPathElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "metadata"): SVGMetadataElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "pattern"): SVGPatternElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "polygon"): SVGPolygonElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "polyline"): SVGPolylineElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "radialGradient"): SVGRadialGradientElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "rect"): SVGRectElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "svg"): SVGSVGElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "script"): SVGScriptElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "stop"): SVGStopElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "style"): SVGStyleElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "switch"): SVGSwitchElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "symbol"): SVGSymbolElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "tspan"): SVGTSpanElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "textContent"): SVGTextContentElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "text"): SVGTextElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "textPath"): SVGTextPathElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "textPositioning"): SVGTextPositioningElement - createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "title"): SVGTitleElement - 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: "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; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "componentTransferFunction"): SVGComponentTransferFunctionElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "defs"): SVGDefsElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "desc"): SVGDescElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "ellipse"): SVGEllipseElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feBlend"): SVGFEBlendElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feColorMatrix"): SVGFEColorMatrixElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feComponentTransfer"): SVGFEComponentTransferElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feComposite"): SVGFECompositeElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feConvolveMatrix"): SVGFEConvolveMatrixElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feDiffuseLighting"): SVGFEDiffuseLightingElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feDisplacementMap"): SVGFEDisplacementMapElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feDistantLight"): SVGFEDistantLightElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFlood"): SVGFEFloodElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncA"): SVGFEFuncAElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncB"): SVGFEFuncBElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncG"): SVGFEFuncGElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feFuncR"): SVGFEFuncRElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feGaussianBlur"): SVGFEGaussianBlurElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feImage"): SVGFEImageElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feMerge"): SVGFEMergeElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feMergeNode"): SVGFEMergeNodeElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feMorphology"): SVGFEMorphologyElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feOffset"): SVGFEOffsetElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "fePointLight"): SVGFEPointLightElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feSpecularLighting"): SVGFESpecularLightingElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feSpotLight"): SVGFESpotLightElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feTile"): SVGFETileElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "feTurbulence"): SVGFETurbulenceElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "filter"): SVGFilterElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "foreignObject"): SVGForeignObjectElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "g"): SVGGElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "image"): SVGImageElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "gradient"): SVGGradientElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "line"): SVGLineElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "linearGradient"): SVGLinearGradientElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "marker"): SVGMarkerElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "mask"): SVGMaskElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "path"): SVGPathElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "metadata"): SVGMetadataElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "pattern"): SVGPatternElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "polygon"): SVGPolygonElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "polyline"): SVGPolylineElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "radialGradient"): SVGRadialGradientElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "rect"): SVGRectElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "svg"): SVGSVGElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "script"): SVGScriptElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "stop"): SVGStopElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "style"): SVGStyleElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "switch"): SVGSwitchElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "symbol"): SVGSymbolElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "tspan"): SVGTSpanElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "textContent"): SVGTextContentElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "text"): SVGTextElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "textPath"): SVGTextPathElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "textPositioning"): SVGTextPositioningElement; + createElementNS(namespaceURI: "http://www.w3.org/2000/svg", qualifiedName: "title"): SVGTitleElement; + 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 | null, qualifiedName: string): Element; createExpression(expression: string, resolver: XPathNSResolver): XPathExpression; - createNSResolver(nodeResolver: Node): XPathNSResolver; /** - * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document. - * @param root The root element or node to start traversing on. - * @param whatToShow The type of nodes or elements to appear in the node list - * @param filter A custom NodeFilter function to use. For more information, see filter. Use null for no filter. - * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded. - */ + * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document. + * @param root The root element or node to start traversing on. + * @param whatToShow The type of nodes or elements to appear in the node list + * @param filter A custom NodeFilter function to use. For more information, see filter. Use null for no filter. + * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded. + */ createNodeIterator(root: Node, whatToShow?: number, filter?: NodeFilter, entityReferenceExpansion?: boolean): NodeIterator; + createNSResolver(nodeResolver: Node): XPathNSResolver; createProcessingInstruction(target: string, data: string): ProcessingInstruction; /** - * Returns an empty range object that has both of its boundary points positioned at the beginning of the document. - */ + * Returns an empty range object that has both of its boundary points positioned at the beginning of the document. + */ createRange(): Range; /** - * Creates a text string from the specified value. - * @param data String that specifies the nodeValue property of the text node. - */ + * Creates a text string from the specified value. + * @param data String that specifies the nodeValue property of the text node. + */ createTextNode(data: string): Text; 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. - * @param root The root element or node to start traversing on. - * @param whatToShow The type of nodes or elements to appear in the node list. For more information, see whatToShow. - * @param filter A custom NodeFilter function to use. - * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded. - */ + * Creates a TreeWalker object that you can use to traverse filtered lists of nodes or elements in a document. + * @param root The root element or node to start traversing on. + * @param whatToShow The type of nodes or elements to appear in the node list. For more information, see whatToShow. + * @param filter A custom NodeFilter function to use. + * @param entityReferenceExpansion A flag that specifies whether entity reference nodes are expanded. + */ createTreeWalker(root: Node, whatToShow?: number, filter?: NodeFilter, entityReferenceExpansion?: boolean): TreeWalker; /** - * Returns the element for the specified x coordinate and the specified y coordinate. - * @param x The x-offset - * @param y The y-offset - */ + * Returns the element for the specified x coordinate and the specified y coordinate. + * @param x The x-offset + * @param y The y-offset + */ elementFromPoint(x: number, y: number): Element; evaluate(expression: string, contextNode: Node, resolver: XPathNSResolver | null, type: number, result: XPathResult | null): XPathResult; /** - * Executes a command on the current document, current selection, or the given range. - * @param commandId String that specifies the command to execute. This command can be any of the command identifiers that can be executed in script. - * @param showUI Display the user interface, defaults to false. - * @param value Value to assign. - */ + * Executes a command on the current document, current selection, or the given range. + * @param commandId String that specifies the command to execute. This command can be any of the command identifiers that can be executed in script. + * @param showUI Display the user interface, defaults to false. + * @param value Value to assign. + */ execCommand(commandId: string, showUI?: boolean, value?: any): boolean; /** - * Displays help information for the given command identifier. - * @param commandId Displays help information for the given command identifier. - */ + * Displays help information for the given command identifier. + * @param commandId Displays help information for the given command identifier. + */ execCommandShowHelp(commandId: string): boolean; exitFullscreen(): void; exitPointerLock(): void; /** - * Causes the element to receive the focus and executes the code specified by the onfocus event. - */ + * Causes the element to receive the focus and executes the code specified by the onfocus event. + */ focus(): void; /** - * 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. - */ + * 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 | null; getElementsByClassName(classNames: string): HTMLCollectionOf; /** - * 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. - */ + * 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; /** - * Retrieves a collection of objects based on the specified element name. - * @param name Specifies the name of an element. - */ + * Retrieves a collection of objects based on the specified element name. + * @param name Specifies the name of an element. + */ getElementsByTagName(tagname: K): ElementListTagNameMap[K]; getElementsByTagName(tagname: string): NodeListOf; getElementsByTagNameNS(namespaceURI: "http://www.w3.org/1999/xhtml", localName: string): HTMLCollectionOf; getElementsByTagNameNS(namespaceURI: "http://www.w3.org/2000/svg", localName: string): HTMLCollectionOf; getElementsByTagNameNS(namespaceURI: string, localName: string): HTMLCollectionOf; /** - * Returns an object representing the current selection of the document that is loaded into the object displaying a webpage. - */ + * Returns an object representing the current selection of the document that is loaded into the object displaying a webpage. + */ getSelection(): Selection; /** - * Gets a value indicating whether the object currently has focus. - */ + * Gets a value indicating whether the object currently has focus. + */ hasFocus(): boolean; importNode(importedNode: T, deep: boolean): T; msElementsFromPoint(x: number, y: number): NodeListOf; msElementsFromRect(left: number, top: number, width: number, height: number): NodeListOf; /** - * 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. - * @param name Specifies the name of the window. This name is used as the value for the TARGET attribute on a form or an anchor element. - * @param features Contains a list of items separated by commas. Each item consists of an option and a value, separated by an equals sign (for example, "fullscreen=yes, toolbar=yes"). The following values are supported. - * @param replace Specifies whether the existing entry for the document is replaced in the history list. - */ + * 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. + * @param name Specifies the name of the window. This name is used as the value for the TARGET attribute on a form or an anchor element. + * @param features Contains a list of items separated by commas. Each item consists of an option and a value, separated by an equals sign (for example, "fullscreen=yes, toolbar=yes"). The following values are supported. + * @param replace Specifies whether the existing entry for the document is replaced in the history list. + */ open(url?: string, name?: string, features?: string, replace?: boolean): Document; - /** - * Returns a Boolean value that indicates whether a specified command can be successfully executed using execCommand, given the current state of the document. - * @param commandId Specifies a command identifier. - */ + /** + * Returns a Boolean value that indicates whether a specified command can be successfully executed using execCommand, given the current state of the document. + * @param commandId Specifies a command identifier. + */ queryCommandEnabled(commandId: string): boolean; /** - * Returns a Boolean value that indicates whether the specified command is in the indeterminate state. - * @param commandId String that specifies a command identifier. - */ + * Returns a Boolean value that indicates whether the specified command is in the indeterminate state. + * @param commandId String that specifies a command identifier. + */ queryCommandIndeterm(commandId: string): boolean; /** - * Returns a Boolean value that indicates the current state of the command. - * @param commandId String that specifies a command identifier. - */ + * Returns a Boolean value that indicates the current state of the command. + * @param commandId String that specifies a command identifier. + */ queryCommandState(commandId: string): boolean; /** - * Returns a Boolean value that indicates whether the current command is supported on the current range. - * @param commandId Specifies a command identifier. - */ + * Returns a Boolean value that indicates whether the current command is supported on the current range. + * @param commandId Specifies a command identifier. + */ queryCommandSupported(commandId: string): boolean; /** - * Retrieves the string associated with a command. - * @param commandId String that contains the identifier of a command. This can be any command identifier given in the list of Command Identifiers. - */ + * Retrieves the string associated with a command. + * @param commandId String that contains the identifier of a command. This can be any command identifier given in the list of Command Identifiers. + */ queryCommandText(commandId: string): string; /** - * Returns the current value of the document, range, or current selection for the given command. - * @param commandId String that specifies a command identifier. - */ + * Returns the current value of the document, range, or current selection for the given command. + * @param commandId String that specifies a command identifier. + */ queryCommandValue(commandId: string): string; releaseEvents(): void; /** - * Allows updating the print settings for the page. - */ + * Allows updating the print settings for the page. + */ updateSettings(): void; webkitCancelFullScreen(): void; webkitExitFullscreen(): void; /** - * Writes one or more HTML expressions to a document in the specified window. - * @param content Specifies the text and HTML tags to write. - */ + * Writes one or more HTML expressions to a document in the specified window. + * @param content Specifies the text and HTML tags to write. + */ write(...content: string[]): void; /** - * Writes one or more HTML expressions, followed by a carriage return, to a document in the specified window. - * @param content The text and HTML tags to write. - */ + * Writes one or more HTML expressions, followed by a carriage return, to a document in the specified window. + * @param content The text and HTML tags to write. + */ writeln(...content: string[]): void; addEventListener(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -3450,7 +3307,7 @@ interface Document extends Node, GlobalEventHandlers, NodeSelector, DocumentEven declare var Document: { prototype: Document; new(): Document; -} +}; interface DocumentFragment extends Node, NodeSelector, ParentNode { getElementById(elementId: string): HTMLElement | null; @@ -3459,7 +3316,7 @@ interface DocumentFragment extends Node, NodeSelector, ParentNode { declare var DocumentFragment: { prototype: DocumentFragment; new(): DocumentFragment; -} +}; interface DocumentType extends Node, ChildNode { readonly entities: NamedNodeMap; @@ -3473,8 +3330,151 @@ interface DocumentType extends Node, ChildNode { declare var DocumentType: { prototype: DocumentType; new(): DocumentType; +}; + +interface DOMError { + readonly name: string; + toString(): string; } +declare var DOMError: { + prototype: DOMError; + new(): DOMError; +}; + +interface DOMException { + readonly code: number; + readonly message: string; + readonly name: string; + toString(): string; + 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 NO_DATA_ALLOWED_ERR: number; + readonly NO_MODIFICATION_ALLOWED_ERR: number; + readonly NOT_FOUND_ERR: number; + readonly NOT_SUPPORTED_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; + 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 NO_DATA_ALLOWED_ERR: number; + readonly NO_MODIFICATION_ALLOWED_ERR: number; + readonly NOT_FOUND_ERR: number; + readonly NOT_SUPPORTED_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 | null, qualifiedName: string | null, doctype: DocumentType | null): Document; + createDocumentType(qualifiedName: string, publicId: string, systemId: string): DocumentType; + createHTMLDocument(title: string): Document; + hasFeature(feature: string | null, version: string | null): boolean; +} + +declare var DOMImplementation: { + prototype: DOMImplementation; + new(): DOMImplementation; +}; + +interface DOMParser { + parseFromString(source: string, mimeType: string): Document; +} + +declare var DOMParser: { + prototype: DOMParser; + new(): DOMParser; +}; + +interface DOMSettableTokenList extends DOMTokenList { + value: string; +} + +declare var DOMSettableTokenList: { + prototype: DOMSettableTokenList; + new(): DOMSettableTokenList; +}; + +interface DOMStringList { + readonly length: number; + contains(str: string): boolean; + item(index: number): string | null; + [index: number]: string; +} + +declare var DOMStringList: { + prototype: DOMStringList; + new(): DOMStringList; +}; + +interface DOMStringMap { + [name: string]: string | undefined; +} + +declare var DOMStringMap: { + prototype: DOMStringMap; + new(): DOMStringMap; +}; + +interface DOMTokenList { + readonly length: number; + add(...token: string[]): void; + contains(token: string): boolean; + item(index: number): string; + remove(...token: string[]): void; + toggle(token: string, force?: boolean): boolean; + toString(): string; + [index: number]: string; +} + +declare var DOMTokenList: { + prototype: DOMTokenList; + new(): DOMTokenList; +}; + interface DragEvent extends MouseEvent { 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; @@ -3484,7 +3484,7 @@ interface DragEvent extends MouseEvent { declare var DragEvent: { prototype: DragEvent; new(): DragEvent; -} +}; interface DynamicsCompressorNode extends AudioNode { readonly attack: AudioParam; @@ -3498,27 +3498,7 @@ interface DynamicsCompressorNode extends AudioNode { declare var DynamicsCompressorNode: { prototype: 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 { - 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; - readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: number; - readonly TEXTURE_MAX_ANISOTROPY_EXT: number; -} +}; interface ElementEventMap extends GlobalEventHandlersEventMap { "ariarequest": Event; @@ -3599,9 +3579,9 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec slot: string; readonly shadowRoot: ShadowRoot | null; getAttribute(name: string): string | null; - getAttributeNS(namespaceURI: string, localName: string): string; getAttributeNode(name: string): Attr; getAttributeNodeNS(namespaceURI: string, localName: string): Attr; + getAttributeNS(namespaceURI: string, localName: string): string; getBoundingClientRect(): ClientRect; getClientRects(): ClientRectList; getElementsByTagName(name: K): ElementListTagNameMap[K]; @@ -3619,18 +3599,18 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec msZoomTo(args: MsZoomToOptions): void; releasePointerCapture(pointerId: number): void; removeAttribute(qualifiedName: string): void; - removeAttributeNS(namespaceURI: string, localName: string): void; removeAttributeNode(oldAttr: Attr): Attr; + removeAttributeNS(namespaceURI: string, localName: string): void; requestFullscreen(): void; requestPointerLock(): void; setAttribute(name: string, value: string): void; - setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void; setAttributeNode(newAttr: Attr): Attr; setAttributeNodeNS(newAttr: Attr): Attr; + setAttributeNS(namespaceURI: string, qualifiedName: string, value: string): void; setPointerCapture(pointerId: number): void; webkitMatchesSelector(selectors: string): boolean; - webkitRequestFullScreen(): void; webkitRequestFullscreen(): void; + webkitRequestFullScreen(): void; getElementsByClassName(classNames: string): NodeListOf; matches(selector: string): boolean; closest(selector: string): Element | null; @@ -3641,9 +3621,9 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec 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; + insertAdjacentElement(position: InsertPosition, insertedElement: Element): Element | null; + insertAdjacentHTML(where: InsertPosition, html: string): void; + insertAdjacentText(where: InsertPosition, text: string): void; attachShadow(shadowRootInitDict: ShadowRootInit): ShadowRoot; addEventListener(type: K, listener: (this: Element, ev: ElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -3652,7 +3632,7 @@ interface Element extends Node, GlobalEventHandlers, ElementTraversal, NodeSelec declare var Element: { prototype: Element; new(): Element; -} +}; interface ErrorEvent extends Event { readonly colno: number; @@ -3666,12 +3646,12 @@ interface ErrorEvent extends Event { declare var ErrorEvent: { prototype: ErrorEvent; new(type: string, errorEventInitDict?: ErrorEventInit): ErrorEvent; -} +}; interface Event { readonly bubbles: boolean; - cancelBubble: boolean; readonly cancelable: boolean; + cancelBubble: boolean; readonly currentTarget: EventTarget; readonly defaultPrevented: boolean; readonly eventPhase: number; @@ -3698,7 +3678,7 @@ declare var Event: { readonly AT_TARGET: number; readonly BUBBLING_PHASE: number; readonly CAPTURING_PHASE: number; -} +}; interface EventTarget { addEventListener(type: string, listener?: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -3709,8 +3689,28 @@ interface EventTarget { declare var EventTarget: { prototype: EventTarget; new(): EventTarget; +}; + +interface EXT_frag_depth { } +declare var EXT_frag_depth: { + prototype: EXT_frag_depth; + new(): EXT_frag_depth; +}; + +interface EXT_texture_filter_anisotropic { + 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; + readonly MAX_TEXTURE_MAX_ANISOTROPY_EXT: number; + readonly TEXTURE_MAX_ANISOTROPY_EXT: number; +}; + interface ExtensionScriptApis { extensionIdToShortId(extensionId: string): number; fireExtensionApiTelemetry(functionName: string, isSucceeded: boolean, isSupported: boolean): void; @@ -3724,7 +3724,7 @@ interface ExtensionScriptApis { declare var ExtensionScriptApis: { prototype: ExtensionScriptApis; new(): ExtensionScriptApis; -} +}; interface External { } @@ -3732,7 +3732,7 @@ interface External { declare var External: { prototype: External; new(): External; -} +}; interface File extends Blob { readonly lastModifiedDate: any; @@ -3743,7 +3743,7 @@ interface File extends Blob { declare var File: { prototype: File; new (parts: (ArrayBuffer | ArrayBufferView | Blob | string)[], filename: string, properties?: FilePropertyBag): File; -} +}; interface FileList { readonly length: number; @@ -3754,7 +3754,7 @@ interface FileList { declare var FileList: { prototype: FileList; new(): FileList; -} +}; interface FileReader extends EventTarget, MSBaseReader { readonly error: DOMError; @@ -3769,7 +3769,7 @@ interface FileReader extends EventTarget, MSBaseReader { declare var FileReader: { prototype: FileReader; new(): FileReader; -} +}; interface FocusEvent extends UIEvent { readonly relatedTarget: EventTarget; @@ -3779,7 +3779,7 @@ interface FocusEvent extends UIEvent { declare var FocusEvent: { prototype: FocusEvent; new(typeArg: string, eventInitDict?: FocusEventInit): FocusEvent; -} +}; interface FocusNavigationEvent extends Event { readonly navigationReason: NavigationReason; @@ -3793,7 +3793,7 @@ interface FocusNavigationEvent extends Event { declare var FocusNavigationEvent: { prototype: FocusNavigationEvent; new(type: string, eventInitDict?: FocusNavigationEventInit): FocusNavigationEvent; -} +}; interface FormData { append(name: string, value: string | Blob, fileName?: string): void; @@ -3807,7 +3807,7 @@ interface FormData { declare var FormData: { prototype: FormData; new (form?: HTMLFormElement): FormData; -} +}; interface GainNode extends AudioNode { readonly gain: AudioParam; @@ -3816,7 +3816,7 @@ interface GainNode extends AudioNode { declare var GainNode: { prototype: GainNode; new(): GainNode; -} +}; interface Gamepad { readonly axes: number[]; @@ -3831,7 +3831,7 @@ interface Gamepad { declare var Gamepad: { prototype: Gamepad; new(): Gamepad; -} +}; interface GamepadButton { readonly pressed: boolean; @@ -3841,7 +3841,7 @@ interface GamepadButton { declare var GamepadButton: { prototype: GamepadButton; new(): GamepadButton; -} +}; interface GamepadEvent extends Event { readonly gamepad: Gamepad; @@ -3850,7 +3850,7 @@ interface GamepadEvent extends Event { declare var GamepadEvent: { prototype: GamepadEvent; new(typeArg: string, eventInitDict?: GamepadEventInit): GamepadEvent; -} +}; interface Geolocation { clearWatch(watchId: number): void; @@ -3861,8 +3861,48 @@ interface Geolocation { declare var Geolocation: { prototype: Geolocation; new(): Geolocation; +}; + +interface HashChangeEvent extends Event { + readonly newURL: string | null; + readonly oldURL: string | null; } +declare var HashChangeEvent: { + prototype: HashChangeEvent; + new(typeArg: string, eventInitDict?: HashChangeEventInit): HashChangeEvent; +}; + +interface Headers { + append(name: string, value: string): void; + delete(name: string): void; + forEach(callback: ForEachCallback): void; + get(name: string): string | null; + has(name: string): boolean; + set(name: string, value: string): void; +} + +declare var Headers: { + prototype: Headers; + new(init?: any): Headers; +}; + +interface History { + readonly length: number; + readonly state: any; + scrollRestoration: ScrollRestoration; + back(): void; + forward(): void; + go(delta?: number): void; + pushState(data: any, title: string, url?: string | null): void; + replaceState(data: any, title: string, url?: string | null): void; +} + +declare var History: { + prototype: History; + new(): History; +}; + interface HTMLAllCollection { readonly length: number; item(nameOrIndex?: string): HTMLCollection | Element | null; @@ -3873,87 +3913,87 @@ interface HTMLAllCollection { declare var HTMLAllCollection: { prototype: HTMLAllCollection; new(): HTMLAllCollection; -} +}; interface HTMLAnchorElement extends HTMLElement { - Methods: string; /** - * Sets or retrieves the character set used to encode the object. - */ + * Sets or retrieves the character set used to encode the object. + */ charset: string; /** - * Sets or retrieves the coordinates of the object. - */ + * Sets or retrieves the coordinates of the object. + */ coords: string; download: string; /** - * Contains the anchor portion of the URL including the hash sign (#). - */ + * Contains the anchor portion of the URL including the hash sign (#). + */ hash: string; /** - * Contains the hostname and port values of the URL. - */ + * Contains the hostname and port values of the URL. + */ host: string; /** - * Contains the hostname of a URL. - */ + * Contains the hostname of a URL. + */ hostname: string; /** - * Sets or retrieves a destination URL or an anchor point. - */ + * Sets or retrieves a destination URL or an anchor point. + */ href: string; /** - * Sets or retrieves the language code of the object. - */ + * Sets or retrieves the language code of the object. + */ hreflang: string; + Methods: string; readonly mimeType: string; /** - * Sets or retrieves the shape of the object. - */ + * Sets or retrieves the shape of the object. + */ name: string; readonly nameProp: string; /** - * Contains the pathname of the URL. - */ + * Contains the pathname of the URL. + */ pathname: string; /** - * Sets or retrieves the port number associated with a URL. - */ + * Sets or retrieves the port number associated with a URL. + */ port: string; /** - * Contains the protocol of the URL. - */ + * Contains the protocol of the URL. + */ protocol: string; readonly protocolLong: string; /** - * Sets or retrieves the relationship between the object and the destination of the link. - */ + * Sets or retrieves the relationship between the object and the destination of the link. + */ rel: string; /** - * Sets or retrieves the relationship between the object and the destination of the link. - */ + * Sets or retrieves the relationship between the object and the destination of the link. + */ rev: string; /** - * Sets or retrieves the substring of the href property that follows the question mark. - */ + * Sets or retrieves the substring of the href property that follows the question mark. + */ search: string; /** - * Sets or retrieves the shape of the object. - */ + * Sets or retrieves the shape of the object. + */ shape: string; /** - * Sets or retrieves the window or frame at which to target content. - */ + * Sets or retrieves the window or frame at which to target content. + */ target: string; /** - * Retrieves or sets the text of the object as a string. - */ + * Retrieves or sets the text of the object as a string. + */ text: string; type: string; urn: string; - /** - * Returns a string representation of an object. - */ + /** + * Returns a string representation of an object. + */ toString(): string; addEventListener(type: K, listener: (this: HTMLAnchorElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -3962,70 +4002,70 @@ interface HTMLAnchorElement extends HTMLElement { declare var HTMLAnchorElement: { prototype: HTMLAnchorElement; new(): HTMLAnchorElement; -} +}; 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. - */ - readonly BaseHref: string; align: string; /** - * Sets or retrieves a text alternative to the graphic. - */ + * Sets or retrieves a text alternative to the graphic. + */ alt: string; /** - * Gets or sets the optional alternative HTML script to execute if the object fails to load. - */ + * Gets or sets the optional alternative HTML script to execute if the object fails to load. + */ altHtml: string; /** - * Sets or retrieves a character string that can be used to implement your own archive functionality for the object. - */ + * Sets or retrieves a character string that can be used to implement your own archive functionality for the object. + */ archive: string; + /** + * 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. + */ + readonly BaseHref: string; border: string; code: string; /** - * Sets or retrieves the URL of the component. - */ + * Sets or retrieves the URL of the component. + */ codeBase: string; /** - * Sets or retrieves the Internet media type for the code associated with the object. - */ + * Sets or retrieves the Internet media type for the code associated with the object. + */ codeType: string; /** - * Address of a pointer to the document this page or frame contains. If there is no document, then null will be returned. - */ + * Address of a pointer to the document this page or frame contains. If there is no document, then null will be returned. + */ readonly contentDocument: Document; /** - * Sets or retrieves the URL that references the data of the object. - */ + * Sets or retrieves the URL that references the data of the object. + */ data: string; /** - * Sets or retrieves a character string that can be used to implement your own declare functionality for the object. - */ + * Sets or retrieves a character string that can be used to implement your own declare functionality for the object. + */ declare: boolean; readonly form: HTMLFormElement; /** - * Sets or retrieves the height of the object. - */ + * Sets or retrieves the height of the object. + */ height: string; hspace: number; /** - * Sets or retrieves the shape of the object. - */ + * Sets or retrieves the shape of the object. + */ name: string; object: string | null; /** - * Sets or retrieves a message to be displayed while an object is loading. - */ + * Sets or retrieves a message to be displayed while an object is loading. + */ standby: string; /** - * Returns the content type of the object. - */ + * Returns the content type of the object. + */ type: string; /** - * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map. - */ + * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map. + */ useMap: string; vspace: number; width: number; @@ -4036,66 +4076,66 @@ interface HTMLAppletElement extends HTMLElement { declare var HTMLAppletElement: { prototype: HTMLAppletElement; new(): HTMLAppletElement; -} +}; interface HTMLAreaElement extends HTMLElement { /** - * Sets or retrieves a text alternative to the graphic. - */ + * Sets or retrieves a text alternative to the graphic. + */ alt: string; /** - * Sets or retrieves the coordinates of the object. - */ + * 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 (#). - */ + * Sets or retrieves the subsection of the href property that follows the number sign (#). + */ hash: string; /** - * Sets or retrieves the hostname and port number of the location or URL. - */ + * Sets or retrieves the hostname and port number of the location or URL. + */ host: string; /** - * Sets or retrieves the host name part of the location or URL. - */ + * Sets or retrieves the host name part of the location or URL. + */ hostname: string; /** - * Sets or retrieves a destination URL or an anchor point. - */ + * Sets or retrieves a destination URL or an anchor point. + */ href: string; /** - * Sets or gets whether clicks in this region cause action. - */ + * Sets or gets whether clicks in this region cause action. + */ noHref: boolean; /** - * Sets or retrieves the file name or path specified by the object. - */ + * Sets or retrieves the file name or path specified by the object. + */ pathname: string; /** - * Sets or retrieves the port number associated with a URL. - */ + * Sets or retrieves the port number associated with a URL. + */ port: string; /** - * Sets or retrieves the protocol portion of a URL. - */ + * Sets or retrieves the protocol portion of a URL. + */ protocol: string; rel: string; /** - * Sets or retrieves the substring of the href property that follows the question mark. - */ + * Sets or retrieves the substring of the href property that follows the question mark. + */ search: string; /** - * Sets or retrieves the shape of the object. - */ + * Sets or retrieves the shape of the object. + */ shape: string; /** - * Sets or retrieves the window or frame at which to target content. - */ + * Sets or retrieves the window or frame at which to target content. + */ target: string; - /** - * Returns a string representation of an object. - */ + /** + * Returns a string representation of an object. + */ toString(): string; addEventListener(type: K, listener: (this: HTMLAreaElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -4104,7 +4144,7 @@ interface HTMLAreaElement extends HTMLElement { declare var HTMLAreaElement: { prototype: HTMLAreaElement; new(): HTMLAreaElement; -} +}; interface HTMLAreasCollection extends HTMLCollectionBase { } @@ -4112,7 +4152,7 @@ interface HTMLAreasCollection extends HTMLCollectionBase { declare var HTMLAreasCollection: { prototype: HTMLAreasCollection; new(): HTMLAreasCollection; -} +}; interface HTMLAudioElement extends HTMLMediaElement { addEventListener(type: K, listener: (this: HTMLAudioElement, ev: HTMLMediaElementEventMap[K]) => any, useCapture?: boolean): void; @@ -4122,30 +4162,16 @@ interface HTMLAudioElement extends HTMLMediaElement { declare var HTMLAudioElement: { prototype: HTMLAudioElement; new(): HTMLAudioElement; -} - -interface HTMLBRElement extends HTMLElement { - /** - * Sets or retrieves the side on which floating objects are not to be positioned when any IHTMLBlockElement is inserted into the document. - */ - clear: string; - addEventListener(type: K, listener: (this: HTMLBRElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var HTMLBRElement: { - prototype: HTMLBRElement; - new(): HTMLBRElement; -} +}; interface HTMLBaseElement extends HTMLElement { /** - * Gets or sets the baseline URL on which relative links are based. - */ + * Gets or sets the baseline URL on which relative links are based. + */ href: string; /** - * Sets or retrieves the window or frame at which to target content. - */ + * Sets or retrieves the window or frame at which to target content. + */ target: string; addEventListener(type: K, listener: (this: HTMLBaseElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -4154,16 +4180,16 @@ interface HTMLBaseElement extends HTMLElement { declare var HTMLBaseElement: { prototype: HTMLBaseElement; new(): HTMLBaseElement; -} +}; interface HTMLBaseFontElement extends HTMLElement, DOML2DeprecatedColorProperty { /** - * Sets or retrieves the current typeface family. - */ + * Sets or retrieves the current typeface family. + */ face: string; /** - * Sets or retrieves the font size of the object. - */ + * Sets or retrieves the font size of the object. + */ size: number; addEventListener(type: K, listener: (this: HTMLBaseFontElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -4172,7 +4198,7 @@ interface HTMLBaseFontElement extends HTMLElement, DOML2DeprecatedColorProperty declare var HTMLBaseFontElement: { prototype: HTMLBaseFontElement; new(): HTMLBaseFontElement; -} +}; interface HTMLBodyElementEventMap extends HTMLElementEventMap { "afterprint": Event; @@ -4231,71 +4257,85 @@ interface HTMLBodyElement extends HTMLElement { declare var HTMLBodyElement: { prototype: HTMLBodyElement; new(): HTMLBodyElement; +}; + +interface HTMLBRElement extends HTMLElement { + /** + * Sets or retrieves the side on which floating objects are not to be positioned when any IHTMLBlockElement is inserted into the document. + */ + clear: string; + addEventListener(type: K, listener: (this: HTMLBRElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; } +declare var HTMLBRElement: { + prototype: HTMLBRElement; + new(): HTMLBRElement; +}; + interface HTMLButtonElement 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. - */ + * 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. + */ autofocus: boolean; disabled: boolean; /** - * Retrieves a reference to the form that the object is embedded in. - */ + * Retrieves a reference to the form that the object is embedded in. + */ readonly form: HTMLFormElement; /** - * Overrides the action attribute (where the data on a form is sent) on the parent form element. - */ + * Overrides the action attribute (where the data on a form is sent) on the parent form element. + */ formAction: string; /** - * Used to override the encoding (formEnctype attribute) specified on the form element. - */ + * Used to override the encoding (formEnctype attribute) specified on the form element. + */ formEnctype: string; /** - * Overrides the submit method attribute previously specified on a form element. - */ + * Overrides the submit method attribute previously specified on a form element. + */ formMethod: string; /** - * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option. - */ + * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option. + */ formNoValidate: string; /** - * Overrides the target attribute on a form element. - */ + * Overrides the target attribute on a form element. + */ formTarget: string; - /** - * Sets or retrieves the name of the object. - */ + /** + * Sets or retrieves the name of the object. + */ name: string; status: any; /** - * Gets the classification and default behavior of the button. - */ + * Gets the classification and default behavior of the button. + */ 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. - */ + * 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. + */ readonly validationMessage: string; /** - * Returns a ValidityState object that represents the validity states of an element. - */ + * Returns a ValidityState object that represents the validity states of an element. + */ readonly validity: ValidityState; - /** - * Sets or retrieves the default or selected value of the control. - */ + /** + * Sets or retrieves the default or selected value of the control. + */ value: string; /** - * Returns whether an element will successfully validate based on forms validation rules and constraints. - */ + * Returns whether an element will successfully validate based on forms validation rules and constraints. + */ readonly willValidate: boolean; /** - * Returns whether a form will validate when it is submitted, without having to submit it. - */ + * Returns whether a form will validate when it is submitted, without having to submit it. + */ checkValidity(): boolean; /** - * 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. - */ + * 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. + */ setCustomValidity(error: string): void; addEventListener(type: K, listener: (this: HTMLButtonElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -4304,32 +4344,32 @@ interface HTMLButtonElement extends HTMLElement { declare var HTMLButtonElement: { prototype: HTMLButtonElement; new(): HTMLButtonElement; -} +}; interface HTMLCanvasElement extends HTMLElement { /** - * Gets or sets the height of a canvas element on a document. - */ + * Gets or sets the height of a canvas element on a document. + */ height: number; /** - * Gets or sets the width of a canvas element on a document. - */ + * Gets or sets the width of a canvas element on a document. + */ width: number; /** - * 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"); - */ + * 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", 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. - */ + * Returns a blob object encoded as a Portable Network Graphics (PNG) format from a canvas image or drawing. + */ msToBlob(): Blob; /** - * Returns the content of the current canvas as an image that you can use as a source for another canvas or an HTML element. - * @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. - */ + * Returns the content of the current canvas as an image that you can use as a source for another canvas or an HTML element. + * @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; addEventListener(type: K, listener: (this: HTMLCanvasElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; @@ -4339,42 +4379,31 @@ interface HTMLCanvasElement extends HTMLElement { declare var HTMLCanvasElement: { prototype: HTMLCanvasElement; new(): HTMLCanvasElement; -} +}; interface HTMLCollectionBase { /** - * Sets or retrieves the number of objects in a collection. - */ + * Sets or retrieves the number of objects in a collection. + */ readonly length: number; /** - * Retrieves an object from various collections. - */ + * Retrieves an object from various collections. + */ item(index: number): Element; [index: number]: Element; } interface HTMLCollection extends HTMLCollectionBase { /** - * Retrieves a select object or an object from an options collection. - */ + * Retrieves a select object or an object from an options collection. + */ namedItem(name: string): Element | null; } declare var HTMLCollection: { prototype: HTMLCollection; new(): HTMLCollection; -} - -interface HTMLDListElement extends HTMLElement { - compact: boolean; - addEventListener(type: K, listener: (this: HTMLDListElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var HTMLDListElement: { - prototype: HTMLDListElement; - new(): HTMLDListElement; -} +}; interface HTMLDataElement extends HTMLElement { value: string; @@ -4385,7 +4414,7 @@ interface HTMLDataElement extends HTMLElement { declare var HTMLDataElement: { prototype: HTMLDataElement; new(): HTMLDataElement; -} +}; interface HTMLDataListElement extends HTMLElement { options: HTMLCollectionOf; @@ -4396,7 +4425,7 @@ interface HTMLDataListElement extends HTMLElement { declare var HTMLDataListElement: { prototype: HTMLDataListElement; new(): HTMLDataListElement; -} +}; interface HTMLDirectoryElement extends HTMLElement { compact: boolean; @@ -4407,16 +4436,16 @@ interface HTMLDirectoryElement extends HTMLElement { declare var HTMLDirectoryElement: { prototype: HTMLDirectoryElement; new(): HTMLDirectoryElement; -} +}; interface HTMLDivElement extends HTMLElement { /** - * Sets or retrieves how the object is aligned with adjacent text. - */ + * Sets or retrieves how the object is aligned with adjacent text. + */ align: string; /** - * Sets or retrieves whether the browser automatically performs wordwrap. - */ + * Sets or retrieves whether the browser automatically performs wordwrap. + */ noWrap: boolean; addEventListener(type: K, listener: (this: HTMLDivElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -4425,8 +4454,19 @@ interface HTMLDivElement extends HTMLElement { declare var HTMLDivElement: { prototype: HTMLDivElement; new(): HTMLDivElement; +}; + +interface HTMLDListElement extends HTMLElement { + compact: boolean; + addEventListener(type: K, listener: (this: HTMLDListElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; } +declare var HTMLDListElement: { + prototype: HTMLDListElement; + new(): HTMLDListElement; +}; + interface HTMLDocument extends Document { addEventListener(type: K, listener: (this: HTMLDocument, ev: DocumentEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -4435,7 +4475,7 @@ interface HTMLDocument extends Document { declare var HTMLDocument: { prototype: HTMLDocument; new(): HTMLDocument; -} +}; interface HTMLElementEventMap extends ElementEventMap { "abort": UIEvent; @@ -4608,54 +4648,54 @@ interface HTMLElement extends Element { declare var HTMLElement: { prototype: HTMLElement; new(): HTMLElement; -} +}; interface HTMLEmbedElement extends HTMLElement, GetSVGDocument { /** - * Sets or retrieves the height of the object. - */ + * Sets or retrieves the height of the object. + */ height: string; hidden: any; /** - * Gets or sets whether the DLNA PlayTo device is available. - */ + * Gets or sets whether the DLNA PlayTo device is available. + */ msPlayToDisabled: boolean; /** - * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server. - */ + * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server. + */ msPlayToPreferredSourceUri: string; /** - * Gets or sets the primary DLNA PlayTo device. - */ + * Gets or sets the primary DLNA PlayTo device. + */ msPlayToPrimary: boolean; /** - * Gets the source associated with the media element for use by the PlayToManager. - */ + * Gets the source associated with the media element for use by the PlayToManager. + */ readonly msPlayToSource: any; /** - * Sets or retrieves the name of the object. - */ + * Sets or retrieves the name of the object. + */ name: string; /** - * Retrieves the palette used for the embedded document. - */ + * Retrieves the palette used for the embedded document. + */ readonly palette: string; /** - * Retrieves the URL of the plug-in used to view an embedded document. - */ + * Retrieves the URL of the plug-in used to view an embedded document. + */ readonly pluginspage: string; readonly readyState: string; /** - * Sets or retrieves a URL to be loaded by the object. - */ + * Sets or retrieves a URL to be loaded by the object. + */ src: string; /** - * Sets or retrieves the height and width units of the embed object. - */ + * Sets or retrieves the height and width units of the embed object. + */ units: string; /** - * Sets or retrieves the width of the object. - */ + * Sets or retrieves the width of the object. + */ width: string; addEventListener(type: K, listener: (this: HTMLEmbedElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -4664,39 +4704,39 @@ interface HTMLEmbedElement extends HTMLElement, GetSVGDocument { declare var HTMLEmbedElement: { prototype: HTMLEmbedElement; new(): HTMLEmbedElement; -} +}; interface HTMLFieldSetElement extends HTMLElement { /** - * Sets or retrieves how the object is aligned with adjacent text. - */ + * Sets or retrieves how the object is aligned with adjacent text. + */ align: string; disabled: boolean; /** - * Retrieves a reference to the form that the object is embedded in. - */ + * Retrieves a reference to the form that the object is embedded in. + */ readonly form: HTMLFormElement; name: 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. - */ + * 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. + */ readonly validationMessage: string; /** - * Returns a ValidityState object that represents the validity states of an element. - */ + * Returns a ValidityState object that represents the validity states of an element. + */ readonly validity: ValidityState; /** - * Returns whether an element will successfully validate based on forms validation rules and constraints. - */ + * Returns whether an element will successfully validate based on forms validation rules and constraints. + */ readonly willValidate: boolean; /** - * Returns whether a form will validate when it is submitted, without having to submit it. - */ + * Returns whether a form will validate when it is submitted, without having to submit it. + */ checkValidity(): boolean; /** - * 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. - */ + * 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. + */ setCustomValidity(error: string): void; addEventListener(type: K, listener: (this: HTMLFieldSetElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -4705,12 +4745,12 @@ interface HTMLFieldSetElement extends HTMLElement { declare var HTMLFieldSetElement: { prototype: HTMLFieldSetElement; new(): HTMLFieldSetElement; -} +}; interface HTMLFontElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty { /** - * Sets or retrieves the current typeface family. - */ + * Sets or retrieves the current typeface family. + */ face: string; addEventListener(type: K, listener: (this: HTMLFontElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -4719,7 +4759,7 @@ interface HTMLFontElement extends HTMLElement, DOML2DeprecatedColorProperty, DOM declare var HTMLFontElement: { prototype: HTMLFontElement; new(): HTMLFontElement; -} +}; interface HTMLFormControlsCollection extends HTMLCollectionBase { namedItem(name: string): HTMLCollection | Element | null; @@ -4728,74 +4768,74 @@ interface HTMLFormControlsCollection extends HTMLCollectionBase { declare var HTMLFormControlsCollection: { prototype: HTMLFormControlsCollection; new(): HTMLFormControlsCollection; -} +}; interface HTMLFormElement extends HTMLElement { /** - * Sets or retrieves a list of character encodings for input data that must be accepted by the server processing the form. - */ + * Sets or retrieves a list of character encodings for input data that must be accepted by the server processing the form. + */ acceptCharset: string; /** - * Sets or retrieves the URL to which the form content is sent for processing. - */ + * Sets or retrieves the URL to which the form content is sent for processing. + */ action: string; /** - * Specifies whether autocomplete is applied to an editable text field. - */ + * Specifies whether autocomplete is applied to an editable text field. + */ autocomplete: string; /** - * Retrieves a collection, in source order, of all controls in a given form. - */ + * Retrieves a collection, in source order, of all controls in a given form. + */ readonly elements: HTMLFormControlsCollection; /** - * Sets or retrieves the MIME encoding for the form. - */ + * Sets or retrieves the MIME encoding for the form. + */ encoding: string; /** - * Sets or retrieves the encoding type for the form. - */ + * Sets or retrieves the encoding type for the form. + */ enctype: string; /** - * Sets or retrieves the number of objects in a collection. - */ + * Sets or retrieves the number of objects in a collection. + */ readonly length: number; /** - * Sets or retrieves how to send the form data to the server. - */ + * Sets or retrieves how to send the form data to the server. + */ method: string; /** - * Sets or retrieves the name of the object. - */ + * Sets or retrieves the name of the object. + */ name: string; /** - * Designates a form that is not validated when submitted. - */ + * Designates a form that is not validated when submitted. + */ noValidate: boolean; /** - * Sets or retrieves the window or frame at which to target content. - */ + * Sets or retrieves the window or frame at which to target content. + */ target: string; /** - * Returns whether a form will validate when it is submitted, without having to submit it. - */ + * Returns whether a form will validate when it is submitted, without having to submit it. + */ checkValidity(): boolean; /** - * Retrieves a form object or an object from an elements collection. - * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is a Number, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made. - * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned. - */ + * Retrieves a form object or an object from an elements collection. + * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is a Number, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made. + * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned. + */ item(name?: any, index?: any): any; /** - * Retrieves a form object or an object from an elements collection. - */ + * Retrieves a form object or an object from an elements collection. + */ namedItem(name: string): any; /** - * Fires when the user resets a form. - */ + * Fires when the user resets a form. + */ reset(): void; /** - * Fires when a FORM is about to be submitted. - */ + * Fires when a FORM is about to be submitted. + */ submit(): void; addEventListener(type: K, listener: (this: HTMLFormElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -4805,7 +4845,7 @@ interface HTMLFormElement extends HTMLElement { declare var HTMLFormElement: { prototype: HTMLFormElement; new(): HTMLFormElement; -} +}; interface HTMLFrameElementEventMap extends HTMLElementEventMap { "load": Event; @@ -4813,68 +4853,68 @@ interface HTMLFrameElementEventMap extends HTMLElementEventMap { interface HTMLFrameElement extends HTMLElement, GetSVGDocument { /** - * Specifies the properties of a border drawn around an object. - */ + * Specifies the properties of a border drawn around an object. + */ border: string; /** - * Sets or retrieves the border color of the object. - */ + * Sets or retrieves the border color of the object. + */ borderColor: any; /** - * Retrieves the document object of the page or frame. - */ + * Retrieves the document object of the page or frame. + */ readonly contentDocument: Document; /** - * Retrieves the object of the specified. - */ + * Retrieves the object of the specified. + */ readonly contentWindow: Window; /** - * Sets or retrieves whether to display a border for the frame. - */ + * Sets or retrieves whether to display a border for the frame. + */ frameBorder: string; /** - * Sets or retrieves the amount of additional space between the frames. - */ + * Sets or retrieves the amount of additional space between the frames. + */ frameSpacing: any; /** - * Sets or retrieves the height of the object. - */ + * Sets or retrieves the height of the object. + */ height: string | number; /** - * Sets or retrieves a URI to a long description of the object. - */ + * Sets or retrieves a URI to a long description of the object. + */ longDesc: string; /** - * Sets or retrieves the top and bottom margin heights before displaying the text in a frame. - */ + * Sets or retrieves the top and bottom margin heights before displaying the text in a frame. + */ marginHeight: string; /** - * Sets or retrieves the left and right margin widths before displaying the text in a frame. - */ + * Sets or retrieves the left and right margin widths before displaying the text in a frame. + */ marginWidth: string; /** - * Sets or retrieves the frame name. - */ + * Sets or retrieves the frame name. + */ name: string; /** - * Sets or retrieves whether the user can resize the frame. - */ + * Sets or retrieves whether the user can resize the frame. + */ noResize: boolean; /** - * Raised when the object has been completely received from the server. - */ + * Raised when the object has been completely received from the server. + */ onload: (this: HTMLFrameElement, ev: Event) => any; /** - * Sets or retrieves whether the frame can be scrolled. - */ + * Sets or retrieves whether the frame can be scrolled. + */ scrolling: string; /** - * Sets or retrieves a URL to be loaded by the object. - */ + * Sets or retrieves a URL to be loaded by the object. + */ src: string; /** - * Sets or retrieves the width of the object. - */ + * Sets or retrieves the width of the object. + */ width: string | number; addEventListener(type: K, listener: (this: HTMLFrameElement, ev: HTMLFrameElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -4883,7 +4923,7 @@ interface HTMLFrameElement extends HTMLElement, GetSVGDocument { declare var HTMLFrameElement: { prototype: HTMLFrameElement; new(): HTMLFrameElement; -} +}; interface HTMLFrameSetElementEventMap extends HTMLElementEventMap { "afterprint": Event; @@ -4910,33 +4950,33 @@ interface HTMLFrameSetElementEventMap extends HTMLElementEventMap { interface HTMLFrameSetElement extends HTMLElement { border: string; /** - * Sets or retrieves the border color of the object. - */ + * Sets or retrieves the border color of the object. + */ borderColor: any; /** - * Sets or retrieves the frame widths of the object. - */ + * Sets or retrieves the frame widths of the object. + */ cols: string; /** - * Sets or retrieves whether to display a border for the frame. - */ + * Sets or retrieves whether to display a border for the frame. + */ frameBorder: string; /** - * Sets or retrieves the amount of additional space between the frames. - */ + * Sets or retrieves the amount of additional space between the frames. + */ frameSpacing: any; name: string; onafterprint: (this: HTMLFrameSetElement, ev: Event) => any; onbeforeprint: (this: HTMLFrameSetElement, ev: Event) => any; onbeforeunload: (this: HTMLFrameSetElement, ev: BeforeUnloadEvent) => any; /** - * Fires when the object loses the input focus. - */ + * Fires when the object loses the input focus. + */ onblur: (this: HTMLFrameSetElement, ev: FocusEvent) => any; onerror: (this: HTMLFrameSetElement, ev: ErrorEvent) => any; /** - * Fires when the object receives focus. - */ + * Fires when the object receives focus. + */ onfocus: (this: HTMLFrameSetElement, ev: FocusEvent) => any; onhashchange: (this: HTMLFrameSetElement, ev: HashChangeEvent) => any; onload: (this: HTMLFrameSetElement, ev: Event) => any; @@ -4952,8 +4992,8 @@ interface HTMLFrameSetElement extends HTMLElement { onstorage: (this: HTMLFrameSetElement, ev: StorageEvent) => any; onunload: (this: HTMLFrameSetElement, ev: Event) => any; /** - * Sets or retrieves the frame heights of the object. - */ + * Sets or retrieves the frame heights of the object. + */ rows: string; addEventListener(type: K, listener: (this: HTMLFrameSetElement, ev: HTMLFrameSetElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -4962,29 +5002,7 @@ interface HTMLFrameSetElement extends HTMLElement { declare var HTMLFrameSetElement: { prototype: HTMLFrameSetElement; new(): HTMLFrameSetElement; -} - -interface HTMLHRElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty { - /** - * Sets or retrieves how the object is aligned with adjacent text. - */ - align: string; - /** - * Sets or retrieves whether the horizontal rule is drawn with 3-D shading. - */ - noShade: boolean; - /** - * Sets or retrieves the width of the object. - */ - width: number; - addEventListener(type: K, listener: (this: HTMLHRElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var HTMLHRElement: { - prototype: HTMLHRElement; - new(): HTMLHRElement; -} +}; interface HTMLHeadElement extends HTMLElement { profile: string; @@ -4995,12 +5013,12 @@ interface HTMLHeadElement extends HTMLElement { declare var HTMLHeadElement: { prototype: HTMLHeadElement; new(): HTMLHeadElement; -} +}; interface HTMLHeadingElement extends HTMLElement { /** - * Sets or retrieves a value that indicates the table alignment. - */ + * Sets or retrieves a value that indicates the table alignment. + */ align: string; addEventListener(type: K, listener: (this: HTMLHeadingElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -5009,12 +5027,34 @@ interface HTMLHeadingElement extends HTMLElement { declare var HTMLHeadingElement: { prototype: HTMLHeadingElement; new(): HTMLHeadingElement; +}; + +interface HTMLHRElement extends HTMLElement, DOML2DeprecatedColorProperty, DOML2DeprecatedSizeProperty { + /** + * Sets or retrieves how the object is aligned with adjacent text. + */ + align: string; + /** + * Sets or retrieves whether the horizontal rule is drawn with 3-D shading. + */ + noShade: boolean; + /** + * Sets or retrieves the width of the object. + */ + width: number; + addEventListener(type: K, listener: (this: HTMLHRElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; } +declare var HTMLHRElement: { + prototype: HTMLHRElement; + new(): HTMLHRElement; +}; + interface HTMLHtmlElement extends HTMLElement { /** - * Sets or retrieves the DTD version that governs the current document. - */ + * Sets or retrieves the DTD version that governs the current document. + */ version: string; addEventListener(type: K, listener: (this: HTMLHtmlElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -5023,7 +5063,7 @@ interface HTMLHtmlElement extends HTMLElement { declare var HTMLHtmlElement: { prototype: HTMLHtmlElement; new(): HTMLHtmlElement; -} +}; interface HTMLIFrameElementEventMap extends HTMLElementEventMap { "load": Event; @@ -5031,79 +5071,79 @@ interface HTMLIFrameElementEventMap extends HTMLElementEventMap { interface HTMLIFrameElement extends HTMLElement, GetSVGDocument { /** - * Sets or retrieves how the object is aligned with adjacent text. - */ + * Sets or retrieves how the object is aligned with adjacent text. + */ align: string; allowFullscreen: boolean; allowPaymentRequest: boolean; /** - * Specifies the properties of a border drawn around an object. - */ + * Specifies the properties of a border drawn around an object. + */ border: string; /** - * Retrieves the document object of the page or frame. - */ + * Retrieves the document object of the page or frame. + */ readonly contentDocument: Document; /** - * Retrieves the object of the specified. - */ + * Retrieves the object of the specified. + */ readonly contentWindow: Window; /** - * Sets or retrieves whether to display a border for the frame. - */ + * Sets or retrieves whether to display a border for the frame. + */ frameBorder: string; /** - * Sets or retrieves the amount of additional space between the frames. - */ + * Sets or retrieves the amount of additional space between the frames. + */ frameSpacing: any; /** - * Sets or retrieves the height of the object. - */ + * Sets or retrieves the height of the object. + */ height: string; /** - * Sets or retrieves the horizontal margin for the object. - */ + * Sets or retrieves the horizontal margin for the object. + */ hspace: number; /** - * Sets or retrieves a URI to a long description of the object. - */ + * Sets or retrieves a URI to a long description of the object. + */ longDesc: string; /** - * Sets or retrieves the top and bottom margin heights before displaying the text in a frame. - */ + * Sets or retrieves the top and bottom margin heights before displaying the text in a frame. + */ marginHeight: string; /** - * Sets or retrieves the left and right margin widths before displaying the text in a frame. - */ + * Sets or retrieves the left and right margin widths before displaying the text in a frame. + */ marginWidth: string; /** - * Sets or retrieves the frame name. - */ + * Sets or retrieves the frame name. + */ name: string; /** - * Sets or retrieves whether the user can resize the frame. - */ + * Sets or retrieves whether the user can resize the frame. + */ noResize: boolean; /** - * Raised when the object has been completely received from the server. - */ + * Raised when the object has been completely received from the server. + */ onload: (this: HTMLIFrameElement, ev: Event) => any; readonly sandbox: DOMSettableTokenList; /** - * Sets or retrieves whether the frame can be scrolled. - */ + * Sets or retrieves whether the frame can be scrolled. + */ scrolling: string; /** - * Sets or retrieves a URL to be loaded by the object. - */ + * Sets or retrieves a URL to be loaded by the object. + */ src: string; /** - * Sets or retrieves the vertical margin for the object. - */ + * Sets or retrieves the vertical margin for the object. + */ vspace: number; /** - * Sets or retrieves the width of the object. - */ + * Sets or retrieves the width of the object. + */ width: string; addEventListener(type: K, listener: (this: HTMLIFrameElement, ev: HTMLIFrameElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -5112,86 +5152,86 @@ interface HTMLIFrameElement extends HTMLElement, GetSVGDocument { declare var HTMLIFrameElement: { prototype: HTMLIFrameElement; new(): HTMLIFrameElement; -} +}; interface HTMLImageElement extends HTMLElement { /** - * Sets or retrieves how the object is aligned with adjacent text. - */ + * Sets or retrieves how the object is aligned with adjacent text. + */ align: string; /** - * Sets or retrieves a text alternative to the graphic. - */ + * Sets or retrieves a text alternative to the graphic. + */ alt: string; /** - * Specifies the properties of a border drawn around an object. - */ + * Specifies the properties of a border drawn around an object. + */ border: string; /** - * Retrieves whether the object is fully loaded. - */ + * Retrieves whether the object is fully loaded. + */ readonly complete: boolean; crossOrigin: string | null; readonly currentSrc: string; /** - * Sets or retrieves the height of the object. - */ + * Sets or retrieves the height of the object. + */ height: number; /** - * Sets or retrieves the width of the border to draw around the object. - */ + * Sets or retrieves the width of the border to draw around the object. + */ hspace: number; /** - * Sets or retrieves whether the image is a server-side image map. - */ + * Sets or retrieves whether the image is a server-side image map. + */ isMap: boolean; /** - * Sets or retrieves a Uniform Resource Identifier (URI) to a long description of the object. - */ + * 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. - */ + * Gets or sets whether the DLNA PlayTo device is available. + */ msPlayToDisabled: boolean; msPlayToPreferredSourceUri: string; /** - * Gets or sets the primary DLNA PlayTo device. - */ + * Gets or sets the primary DLNA PlayTo device. + */ msPlayToPrimary: boolean; /** - * Gets the source associated with the media element for use by the PlayToManager. - */ + * Gets the source associated with the media element for use by the PlayToManager. + */ readonly msPlayToSource: any; /** - * Sets or retrieves the name of the object. - */ + * Sets or retrieves the name of the object. + */ name: string; /** - * The original height of the image resource before sizing. - */ + * The original height of the image resource before sizing. + */ readonly naturalHeight: number; /** - * The original width of the image resource before sizing. - */ + * The original width of the image resource before sizing. + */ readonly naturalWidth: number; sizes: string; /** - * The address or URL of the a media resource that is to be considered. - */ + * The address or URL of the a media resource that is to be considered. + */ src: string; srcset: string; /** - * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map. - */ + * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map. + */ useMap: string; /** - * Sets or retrieves the vertical margin for the object. - */ + * Sets or retrieves the vertical margin for the object. + */ vspace: number; /** - * Sets or retrieves the width of the object. - */ + * Sets or retrieves the width of the object. + */ width: number; readonly x: number; readonly y: number; @@ -5203,210 +5243,210 @@ interface HTMLImageElement extends HTMLElement { declare var HTMLImageElement: { prototype: HTMLImageElement; new(): HTMLImageElement; -} +}; interface HTMLInputElement extends HTMLElement { /** - * Sets or retrieves a comma-separated list of content types. - */ + * Sets or retrieves a comma-separated list of content types. + */ accept: string; /** - * Sets or retrieves how the object is aligned with adjacent text. - */ + * Sets or retrieves how the object is aligned with adjacent text. + */ align: string; /** - * Sets or retrieves a text alternative to the graphic. - */ + * Sets or retrieves a text alternative to the graphic. + */ alt: string; /** - * Specifies whether autocomplete is applied to an editable text field. - */ + * Specifies whether autocomplete is applied to an editable text field. + */ autocomplete: string; /** - * 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. - */ + * 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. + */ autofocus: boolean; /** - * Sets or retrieves the width of the border to draw around the object. - */ + * Sets or retrieves the width of the border to draw around the object. + */ border: string; /** - * Sets or retrieves the state of the check box or radio button. - */ + * Sets or retrieves the state of the check box or radio button. + */ checked: boolean; /** - * Retrieves whether the object is fully loaded. - */ + * Retrieves whether the object is fully loaded. + */ readonly complete: boolean; /** - * Sets or retrieves the state of the check box or radio button. - */ + * Sets or retrieves the state of the check box or radio button. + */ defaultChecked: boolean; /** - * Sets or retrieves the initial contents of the object. - */ + * Sets or retrieves the initial contents of the object. + */ defaultValue: string; disabled: boolean; /** - * Returns a FileList object on a file type input object. - */ + * Returns a FileList object on a file type input object. + */ readonly files: FileList | null; /** - * Retrieves a reference to the form that the object is embedded in. - */ + * Retrieves a reference to the form that the object is embedded in. + */ readonly form: HTMLFormElement; /** - * Overrides the action attribute (where the data on a form is sent) on the parent form element. - */ + * Overrides the action attribute (where the data on a form is sent) on the parent form element. + */ formAction: string; /** - * Used to override the encoding (formEnctype attribute) specified on the form element. - */ + * Used to override the encoding (formEnctype attribute) specified on the form element. + */ formEnctype: string; /** - * Overrides the submit method attribute previously specified on a form element. - */ + * Overrides the submit method attribute previously specified on a form element. + */ formMethod: string; /** - * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option. - */ + * Overrides any validation or required attributes on a form or form elements to allow it to be submitted without validation. This can be used to create a "save draft"-type submit option. + */ formNoValidate: string; /** - * Overrides the target attribute on a form element. - */ + * Overrides the target attribute on a form element. + */ formTarget: string; /** - * Sets or retrieves the height of the object. - */ + * Sets or retrieves the height of the object. + */ height: string; /** - * Sets or retrieves the width of the border to draw around the object. - */ + * Sets or retrieves the width of the border to draw around the object. + */ hspace: number; indeterminate: boolean; /** - * Specifies the ID of a pre-defined datalist of options for an input element. - */ + * Specifies the ID of a pre-defined datalist of options for an input element. + */ 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. - */ + * 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. + */ max: string; /** - * Sets or retrieves the maximum number of characters that the user can enter in a text control. - */ + * Sets or retrieves the maximum number of characters that the user can enter in a text control. + */ maxLength: number; /** - * Defines the minimum acceptable value for an input element with type="number". When used with the max and step attributes, lets you control the range and increment (such as even numbers only) that the user can enter into an input field. - */ + * Defines the minimum acceptable value for an input element with type="number". When used with the max and step attributes, lets you control the range and increment (such as even numbers only) that the user can enter into an input field. + */ min: string; /** - * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list. - */ + * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list. + */ multiple: boolean; /** - * Sets or retrieves the name of the object. - */ + * Sets or retrieves the name of the object. + */ name: string; /** - * Gets or sets a string containing a regular expression that the user's input must match. - */ + * Gets or sets a string containing a regular expression that the user's input must match. + */ pattern: string; /** - * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field. - */ + * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field. + */ placeholder: string; readOnly: boolean; /** - * When present, marks an element that can't be submitted without a value. - */ + * 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. - */ + * Gets or sets the end position or offset of a text selection. + */ selectionEnd: number; /** - * Gets or sets the starting position or offset of a text selection. - */ + * Gets or sets the starting position or offset of a text selection. + */ selectionStart: number; size: number; /** - * The address or URL of the a media resource that is to be considered. - */ + * The address or URL of the a media resource that is to be considered. + */ src: string; status: boolean; /** - * Defines an increment or jump between values that you want to allow the user to enter. When used with the max and min attributes, lets you control the range and increment (for example, allow only even numbers) that the user can enter into an input field. - */ + * Defines an increment or jump between values that you want to allow the user to enter. When used with the max and min attributes, lets you control the range and increment (for example, allow only even numbers) that the user can enter into an input field. + */ step: string; /** - * Returns the content type of the object. - */ + * Returns the content type of the object. + */ type: string; /** - * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map. - */ + * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map. + */ useMap: 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. - */ + * 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. + */ readonly validationMessage: string; /** - * Returns a ValidityState object that represents the validity states of an element. - */ + * Returns a ValidityState object that represents the validity states of an element. + */ readonly validity: ValidityState; /** - * Returns the value of the data at the cursor's current position. - */ + * Returns the value of the data at the cursor's current position. + */ value: string; valueAsDate: Date; /** - * Returns the input field value as a number. - */ + * Returns the input field value as a number. + */ valueAsNumber: number; /** - * Sets or retrieves the vertical margin for the object. - */ + * Sets or retrieves the vertical margin for the object. + */ vspace: number; webkitdirectory: boolean; /** - * Sets or retrieves the width of the object. - */ + * Sets or retrieves the width of the object. + */ width: string; /** - * Returns whether an element will successfully validate based on forms validation rules and constraints. - */ + * Returns whether an element will successfully validate based on forms validation rules and constraints. + */ readonly willValidate: boolean; minLength: number; /** - * Returns whether a form will validate when it is submitted, without having to submit it. - */ + * Returns whether a form will validate when it is submitted, without having to submit it. + */ checkValidity(): boolean; /** - * Makes the selection equal to the current object. - */ + * Makes the selection equal to the current object. + */ select(): void; /** - * 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. - */ + * 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. + */ setCustomValidity(error: string): void; /** - * Sets the start and end positions of a selection in a text field. - * @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. - */ + * Sets the start and end positions of a selection in a text field. + * @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, 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. - */ + * 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. + */ stepDown(n?: number): void; /** - * Increments a range input control's value by the value given by the Step attribute. If the optional parameter is used, will increment the input control's value by that value. - * @param n Value to increment the value by. - */ + * Increments a range input control's value by the value given by the Step attribute. If the optional parameter is used, will increment the input control's value by that value. + * @param n Value to increment the value by. + */ stepUp(n?: number): void; addEventListener(type: K, listener: (this: HTMLInputElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -5415,31 +5455,16 @@ interface HTMLInputElement extends HTMLElement { declare var HTMLInputElement: { prototype: HTMLInputElement; new(): HTMLInputElement; -} - -interface HTMLLIElement extends HTMLElement { - type: string; - /** - * Sets or retrieves the value of a list item. - */ - value: number; - addEventListener(type: K, listener: (this: HTMLLIElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var HTMLLIElement: { - prototype: HTMLLIElement; - new(): HTMLLIElement; -} +}; interface HTMLLabelElement extends HTMLElement { /** - * Retrieves a reference to the form that the object is embedded in. - */ + * Retrieves a reference to the form that the object is embedded in. + */ readonly form: HTMLFormElement; /** - * Sets or retrieves the object to which the given label object is assigned. - */ + * Sets or retrieves the object to which the given label object is assigned. + */ htmlFor: string; addEventListener(type: K, listener: (this: HTMLLabelElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -5448,16 +5473,16 @@ interface HTMLLabelElement extends HTMLElement { declare var HTMLLabelElement: { prototype: HTMLLabelElement; new(): HTMLLabelElement; -} +}; interface HTMLLegendElement extends HTMLElement { /** - * Retrieves a reference to the form that the object is embedded in. - */ + * Retrieves a reference to the form that the object is embedded in. + */ align: string; /** - * Retrieves a reference to the form that the object is embedded in. - */ + * Retrieves a reference to the form that the object is embedded in. + */ readonly form: HTMLFormElement; addEventListener(type: K, listener: (this: HTMLLegendElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -5466,41 +5491,56 @@ interface HTMLLegendElement extends HTMLElement { declare var HTMLLegendElement: { prototype: HTMLLegendElement; new(): HTMLLegendElement; +}; + +interface HTMLLIElement extends HTMLElement { + type: string; + /** + * Sets or retrieves the value of a list item. + */ + value: number; + addEventListener(type: K, listener: (this: HTMLLIElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; } +declare var HTMLLIElement: { + prototype: HTMLLIElement; + new(): HTMLLIElement; +}; + interface HTMLLinkElement extends HTMLElement, LinkStyle { /** - * Sets or retrieves the character set used to encode the object. - */ + * Sets or retrieves the character set used to encode the object. + */ charset: string; disabled: boolean; /** - * Sets or retrieves a destination URL or an anchor point. - */ + * Sets or retrieves a destination URL or an anchor point. + */ href: string; /** - * Sets or retrieves the language code of the object. - */ + * Sets or retrieves the language code of the object. + */ hreflang: string; /** - * Sets or retrieves the media type. - */ + * Sets or retrieves the media type. + */ media: string; /** - * Sets or retrieves the relationship between the object and the destination of the link. - */ + * Sets or retrieves the relationship between the object and the destination of the link. + */ rel: string; /** - * Sets or retrieves the relationship between the object and the destination of the link. - */ + * Sets or retrieves the relationship between the object and the destination of the link. + */ rev: string; /** - * Sets or retrieves the window or frame at which to target content. - */ + * Sets or retrieves the window or frame at which to target content. + */ target: string; /** - * Sets or retrieves the MIME type of the object. - */ + * Sets or retrieves the MIME type of the object. + */ type: string; import?: Document; integrity: string; @@ -5511,16 +5551,16 @@ interface HTMLLinkElement extends HTMLElement, LinkStyle { declare var HTMLLinkElement: { prototype: HTMLLinkElement; new(): HTMLLinkElement; -} +}; interface HTMLMapElement extends HTMLElement { /** - * Retrieves a collection of the area objects defined for the given map object. - */ + * Retrieves a collection of the area objects defined for the given map object. + */ readonly areas: HTMLAreasCollection; /** - * Sets or retrieves the name of the object. - */ + * Sets or retrieves the name of the object. + */ name: string; addEventListener(type: K, listener: (this: HTMLMapElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -5529,7 +5569,7 @@ interface HTMLMapElement extends HTMLElement { declare var HTMLMapElement: { prototype: HTMLMapElement; new(): HTMLMapElement; -} +}; interface HTMLMarqueeElementEventMap extends HTMLElementEventMap { "bounce": Event; @@ -5561,7 +5601,7 @@ interface HTMLMarqueeElement extends HTMLElement { declare var HTMLMarqueeElement: { prototype: HTMLMarqueeElement; new(): HTMLMarqueeElement; -} +}; interface HTMLMediaElementEventMap extends HTMLElementEventMap { "encrypted": MediaEncryptedEvent; @@ -5570,162 +5610,162 @@ interface HTMLMediaElementEventMap extends HTMLElementEventMap { interface HTMLMediaElement extends HTMLElement { /** - * Returns an AudioTrackList object with the audio tracks for a given video element. - */ + * Returns an AudioTrackList object with the audio tracks for a given video element. + */ readonly audioTracks: AudioTrackList; /** - * Gets or sets a value that indicates whether to start playing the media automatically. - */ + * Gets or sets a value that indicates whether to start playing the media automatically. + */ autoplay: boolean; /** - * Gets a collection of buffered time ranges. - */ + * Gets a collection of buffered time ranges. + */ 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). - */ + * 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 | null; /** - * Gets the address or URL of the current media resource that is selected by IHTMLMediaElement. - */ + * Gets the address or URL of the current media resource that is selected by IHTMLMediaElement. + */ readonly currentSrc: string; /** - * Gets or sets the current playback position, in seconds. - */ + * Gets or sets the current playback position, in seconds. + */ currentTime: number; defaultMuted: boolean; /** - * Gets or sets the default playback rate when the user is not using fast forward or reverse for a video or audio resource. - */ + * Gets or sets the default playback rate when the user is not using fast forward or reverse for a video or audio resource. + */ defaultPlaybackRate: number; /** - * 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. - */ + * 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. + */ readonly duration: number; /** - * Gets information about whether the playback has ended or not. - */ + * Gets information about whether the playback has ended or not. + */ readonly ended: boolean; /** - * Returns an object representing the current error state of the audio or video element. - */ + * Returns an object representing the current error state of the audio or video element. + */ readonly error: MediaError; /** - * Gets or sets a flag to specify whether playback should restart after it completes. - */ + * 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. - */ + * Specifies the purpose of the audio or video media, such as background audio or alerts. + */ msAudioCategory: string; /** - * Specifies the output device id that the audio will be sent to. - */ + * Specifies the output device id that the audio will be sent to. + */ msAudioDeviceType: string; readonly msGraphicsTrustStatus: MSGraphicsTrust; /** - * Gets the MSMediaKeys object, which is used for decrypting media data, that is associated with this media element. - */ + * Gets the MSMediaKeys object, which is used for decrypting media data, that is associated with this media element. + */ readonly msKeys: MSMediaKeys; /** - * Gets or sets whether the DLNA PlayTo device is available. - */ + * Gets or sets whether the DLNA PlayTo device is available. + */ msPlayToDisabled: boolean; /** - * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server. - */ + * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server. + */ msPlayToPreferredSourceUri: string; /** - * Gets or sets the primary DLNA PlayTo device. - */ + * Gets or sets the primary DLNA PlayTo device. + */ msPlayToPrimary: boolean; /** - * Gets the source associated with the media element for use by the PlayToManager. - */ + * Gets the source associated with the media element for use by the PlayToManager. + */ readonly msPlayToSource: any; /** - * Specifies whether or not to enable low-latency playback on the media element. - */ + * Specifies whether or not to enable low-latency playback on the media element. + */ msRealTime: boolean; /** - * Gets or sets a flag that indicates whether the audio (either audio or the audio track on video media) is muted. - */ + * Gets or sets a flag that indicates whether the audio (either audio or the audio track on video media) is muted. + */ muted: boolean; /** - * Gets the current network activity for the element. - */ + * Gets the current network activity for the element. + */ readonly networkState: number; onencrypted: (this: HTMLMediaElement, ev: MediaEncryptedEvent) => any; onmsneedkey: (this: HTMLMediaElement, ev: MSMediaKeyNeededEvent) => any; /** - * Gets a flag that specifies whether playback is paused. - */ + * Gets a flag that specifies whether playback is paused. + */ 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. - */ + * 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. + */ playbackRate: number; /** - * Gets TimeRanges for the current media resource that has been played. - */ + * Gets TimeRanges for the current media resource that has been played. + */ readonly played: TimeRanges; /** - * Gets or sets the current playback position, in seconds. - */ + * Gets or sets the current playback position, in seconds. + */ preload: string; readyState: number; /** - * Returns a TimeRanges object that represents the ranges of the current media resource that can be seeked. - */ + * Returns a TimeRanges object that represents the ranges of the current media resource that can be seeked. + */ readonly seekable: TimeRanges; /** - * Gets a flag that indicates whether the the client is currently moving to a new playback position in the media resource. - */ + * Gets a flag that indicates whether the the client is currently moving to a new playback position in the media resource. + */ readonly seeking: boolean; /** - * The address or URL of the a media resource that is to be considered. - */ + * The address or URL of the a media resource that is to be considered. + */ src: string; srcObject: MediaStream | null; readonly textTracks: TextTrackList; readonly videoTracks: VideoTrackList; /** - * Gets or sets the volume level for audio portions of the media element. - */ + * Gets or sets the volume level for audio portions of the media element. + */ volume: number; addTextTrack(kind: string, label?: string, language?: string): TextTrack; /** - * Returns a string that specifies whether the client can play a given media resource type. - */ + * Returns a string that specifies whether the client can play a given media resource type. + */ canPlayType(type: string): string; /** - * Resets the audio or video object and loads a new media resource. - */ + * Resets the audio or video object and loads a new media resource. + */ load(): void; /** - * Clears all effects from the media pipeline. - */ + * Clears all effects from the media pipeline. + */ msClearEffects(): void; msGetAsCastingSource(): any; /** - * Inserts the specified audio effect into media pipeline. - */ + * Inserts the specified audio effect into media pipeline. + */ msInsertAudioEffect(activatableClassId: string, effectRequired: boolean, config?: any): void; msSetMediaKeys(mediaKeys: MSMediaKeys): void; /** - * Specifies the media protection manager for a given media pipeline. - */ + * Specifies the media protection manager for a given media pipeline. + */ msSetMediaProtectionManager(mediaProtectionManager?: any): void; /** - * Pauses the current playback and sets paused to TRUE. This can be used to test whether the media is playing or paused. You can also use the pause or play events to tell whether the media is playing or not. - */ + * Pauses the current playback and sets paused to TRUE. This can be used to test whether the media is playing or paused. You can also use the pause or play events to tell whether the media is playing or not. + */ pause(): void; /** - * Loads and starts playback of a media resource. - */ - play(): void; + * Loads and starts playback of a media resource. + */ + play(): Promise; setMediaKeys(mediaKeys: MediaKeys | null): Promise; readonly HAVE_CURRENT_DATA: number; readonly HAVE_ENOUGH_DATA: number; @@ -5752,7 +5792,7 @@ declare var HTMLMediaElement: { readonly NETWORK_IDLE: number; readonly NETWORK_LOADING: number; readonly NETWORK_NO_SOURCE: number; -} +}; interface HTMLMenuElement extends HTMLElement { compact: boolean; @@ -5764,32 +5804,32 @@ interface HTMLMenuElement extends HTMLElement { declare var HTMLMenuElement: { prototype: HTMLMenuElement; new(): HTMLMenuElement; -} +}; interface HTMLMetaElement extends HTMLElement { /** - * Sets or retrieves the character set used to encode the object. - */ + * Sets or retrieves the character set used to encode the object. + */ charset: string; /** - * Gets or sets meta-information to associate with httpEquiv or name. - */ + * Gets or sets meta-information to associate with httpEquiv or name. + */ content: string; /** - * Gets or sets information used to bind the value of a content attribute of a meta element to an HTTP response header. - */ + * Gets or sets information used to bind the value of a content attribute of a meta element to an HTTP response header. + */ httpEquiv: string; /** - * Sets or retrieves the value specified in the content attribute of the meta object. - */ + * Sets or retrieves the value specified in the content attribute of the meta object. + */ name: string; /** - * Sets or retrieves a scheme to be used in interpreting the value of a property specified for the object. - */ + * Sets or retrieves a scheme to be used in interpreting the value of a property specified for the object. + */ scheme: string; /** - * Sets or retrieves the URL property that will be loaded after the specified time has elapsed. - */ + * Sets or retrieves the URL property that will be loaded after the specified time has elapsed. + */ url: string; addEventListener(type: K, listener: (this: HTMLMetaElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -5798,7 +5838,7 @@ interface HTMLMetaElement extends HTMLElement { declare var HTMLMetaElement: { prototype: HTMLMetaElement; new(): HTMLMetaElement; -} +}; interface HTMLMeterElement extends HTMLElement { high: number; @@ -5814,16 +5854,16 @@ interface HTMLMeterElement extends HTMLElement { declare var HTMLMeterElement: { prototype: HTMLMeterElement; new(): HTMLMeterElement; -} +}; interface HTMLModElement extends HTMLElement { /** - * Sets or retrieves reference information about the object. - */ + * Sets or retrieves reference information about the object. + */ cite: string; /** - * Sets or retrieves the date and time of a modification to the object. - */ + * Sets or retrieves the date and time of a modification to the object. + */ dateTime: string; addEventListener(type: K, listener: (this: HTMLModElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -5832,13 +5872,130 @@ interface HTMLModElement extends HTMLElement { declare var HTMLModElement: { prototype: HTMLModElement; new(): HTMLModElement; +}; + +interface HTMLObjectElement extends HTMLElement, GetSVGDocument { + align: string; + /** + * Sets or retrieves a text alternative to the graphic. + */ + alt: string; + /** + * Gets or sets the optional alternative HTML script to execute if the object fails to load. + */ + altHtml: string; + /** + * Sets or retrieves a character string that can be used to implement your own archive functionality for the object. + */ + archive: string; + /** + * 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. + */ + readonly BaseHref: string; + border: string; + /** + * Sets or retrieves the URL of the file containing the compiled Java class. + */ + code: string; + /** + * Sets or retrieves the URL of the component. + */ + codeBase: string; + /** + * Sets or retrieves the Internet media type for the code associated with the object. + */ + codeType: string; + /** + * Retrieves the document object of the page or frame. + */ + readonly contentDocument: Document; + /** + * Sets or retrieves the URL that references the data of the object. + */ + data: string; + declare: boolean; + /** + * Retrieves a reference to the form that the object is embedded in. + */ + readonly form: HTMLFormElement; + /** + * Sets or retrieves the height of the object. + */ + height: string; + hspace: number; + /** + * Gets or sets whether the DLNA PlayTo device is available. + */ + msPlayToDisabled: boolean; + /** + * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server. + */ + msPlayToPreferredSourceUri: string; + /** + * Gets or sets the primary DLNA PlayTo device. + */ + msPlayToPrimary: boolean; + /** + * Gets the source associated with the media element for use by the PlayToManager. + */ + readonly msPlayToSource: any; + /** + * Sets or retrieves the name of the object. + */ + name: string; + readonly readyState: number; + /** + * Sets or retrieves a message to be displayed while an object is loading. + */ + standby: string; + /** + * Sets or retrieves the MIME type of the object. + */ + type: string; + /** + * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map. + */ + useMap: 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. + */ + readonly validationMessage: string; + /** + * Returns a ValidityState object that represents the validity states of an element. + */ + readonly validity: ValidityState; + vspace: number; + /** + * Sets or retrieves the width of the object. + */ + width: string; + /** + * Returns whether an element will successfully validate based on forms validation rules and constraints. + */ + readonly willValidate: boolean; + /** + * Returns whether a form will validate when it is submitted, without having to submit it. + */ + checkValidity(): boolean; + /** + * 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. + */ + setCustomValidity(error: string): void; + addEventListener(type: K, listener: (this: HTMLObjectElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; } +declare var HTMLObjectElement: { + prototype: HTMLObjectElement; + new(): HTMLObjectElement; +}; + interface HTMLOListElement extends HTMLElement { compact: boolean; /** - * The starting number. - */ + * The starting number. + */ start: number; type: string; addEventListener(type: K, listener: (this: HTMLOListElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; @@ -5848,154 +6005,37 @@ interface HTMLOListElement extends HTMLElement { declare var HTMLOListElement: { prototype: HTMLOListElement; new(): HTMLOListElement; -} - -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. - */ - readonly BaseHref: string; - align: string; - /** - * Sets or retrieves a text alternative to the graphic. - */ - alt: string; - /** - * Gets or sets the optional alternative HTML script to execute if the object fails to load. - */ - altHtml: string; - /** - * Sets or retrieves a character string that can be used to implement your own archive functionality for the object. - */ - archive: string; - border: string; - /** - * Sets or retrieves the URL of the file containing the compiled Java class. - */ - code: string; - /** - * Sets or retrieves the URL of the component. - */ - codeBase: string; - /** - * Sets or retrieves the Internet media type for the code associated with the object. - */ - codeType: string; - /** - * Retrieves the document object of the page or frame. - */ - readonly contentDocument: Document; - /** - * Sets or retrieves the URL that references the data of the object. - */ - data: string; - declare: boolean; - /** - * Retrieves a reference to the form that the object is embedded in. - */ - readonly form: HTMLFormElement; - /** - * Sets or retrieves the height of the object. - */ - height: string; - hspace: number; - /** - * Gets or sets whether the DLNA PlayTo device is available. - */ - msPlayToDisabled: boolean; - /** - * Gets or sets the path to the preferred media source. This enables the Play To target device to stream the media content, which can be DRM protected, from a different location, such as a cloud media server. - */ - msPlayToPreferredSourceUri: string; - /** - * Gets or sets the primary DLNA PlayTo device. - */ - msPlayToPrimary: boolean; - /** - * Gets the source associated with the media element for use by the PlayToManager. - */ - readonly msPlayToSource: any; - /** - * Sets or retrieves the name of the object. - */ - name: string; - readonly readyState: number; - /** - * Sets or retrieves a message to be displayed while an object is loading. - */ - standby: string; - /** - * Sets or retrieves the MIME type of the object. - */ - type: string; - /** - * Sets or retrieves the URL, often with a bookmark extension (#name), to use as a client-side image map. - */ - useMap: 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. - */ - readonly validationMessage: string; - /** - * Returns a ValidityState object that represents the validity states of an element. - */ - readonly validity: ValidityState; - vspace: number; - /** - * Sets or retrieves the width of the object. - */ - width: string; - /** - * Returns whether an element will successfully validate based on forms validation rules and constraints. - */ - readonly willValidate: boolean; - /** - * Returns whether a form will validate when it is submitted, without having to submit it. - */ - checkValidity(): boolean; - /** - * 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. - */ - setCustomValidity(error: string): void; - addEventListener(type: K, listener: (this: HTMLObjectElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var HTMLObjectElement: { - prototype: HTMLObjectElement; - new(): HTMLObjectElement; -} +}; interface HTMLOptGroupElement extends HTMLElement { /** - * Sets or retrieves the status of an option. - */ + * Sets or retrieves the status of an option. + */ defaultSelected: boolean; disabled: boolean; /** - * Retrieves a reference to the form that the object is embedded in. - */ + * Retrieves a reference to the form that the object is embedded in. + */ readonly form: HTMLFormElement; /** - * Sets or retrieves the ordinal position of an option in a list box. - */ + * Sets or retrieves the ordinal position of an option in a list box. + */ readonly index: number; /** - * Sets or retrieves a value that you can use to implement your own label functionality for the object. - */ + * Sets or retrieves a value that you can use to implement your own label functionality for the object. + */ label: string; /** - * Sets or retrieves whether the option in the list box is the default item. - */ + * Sets or retrieves whether the option in the list box is the default item. + */ selected: boolean; /** - * Sets or retrieves the text string specified by the option tag. - */ + * Sets or retrieves the text string specified by the option tag. + */ readonly text: string; /** - * Sets or retrieves the value which is returned to the server when the form control is submitted. - */ + * Sets or retrieves the value which is returned to the server when the form control is submitted. + */ value: string; addEventListener(type: K, listener: (this: HTMLOptGroupElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -6004,37 +6044,37 @@ interface HTMLOptGroupElement extends HTMLElement { declare var HTMLOptGroupElement: { prototype: HTMLOptGroupElement; new(): HTMLOptGroupElement; -} +}; interface HTMLOptionElement extends HTMLElement { /** - * Sets or retrieves the status of an option. - */ + * Sets or retrieves the status of an option. + */ defaultSelected: boolean; disabled: boolean; /** - * Retrieves a reference to the form that the object is embedded in. - */ + * Retrieves a reference to the form that the object is embedded in. + */ readonly form: HTMLFormElement; /** - * Sets or retrieves the ordinal position of an option in a list box. - */ + * Sets or retrieves the ordinal position of an option in a list box. + */ readonly index: number; /** - * Sets or retrieves a value that you can use to implement your own label functionality for the object. - */ + * Sets or retrieves a value that you can use to implement your own label functionality for the object. + */ label: string; /** - * Sets or retrieves whether the option in the list box is the default item. - */ + * Sets or retrieves whether the option in the list box is the default item. + */ selected: boolean; /** - * Sets or retrieves the text string specified by the option tag. - */ + * Sets or retrieves the text string specified by the option tag. + */ text: string; /** - * Sets or retrieves the value which is returned to the server when the form control is submitted. - */ + * Sets or retrieves the value which is returned to the server when the form control is submitted. + */ value: string; addEventListener(type: K, listener: (this: HTMLOptionElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -6043,7 +6083,7 @@ interface HTMLOptionElement extends HTMLElement { declare var HTMLOptionElement: { prototype: HTMLOptionElement; new(): HTMLOptionElement; -} +}; interface HTMLOptionsCollection extends HTMLCollectionOf { length: number; @@ -6055,7 +6095,7 @@ interface HTMLOptionsCollection extends HTMLCollectionOf { declare var HTMLOptionsCollection: { prototype: HTMLOptionsCollection; new(): HTMLOptionsCollection; -} +}; interface HTMLOutputElement extends HTMLElement { defaultValue: string; @@ -6077,12 +6117,12 @@ interface HTMLOutputElement extends HTMLElement { declare var HTMLOutputElement: { prototype: HTMLOutputElement; new(): HTMLOutputElement; -} +}; interface HTMLParagraphElement extends HTMLElement { /** - * Sets or retrieves how the object is aligned with adjacent text. - */ + * Sets or retrieves how the object is aligned with adjacent text. + */ align: string; clear: string; addEventListener(type: K, listener: (this: HTMLParagraphElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; @@ -6092,24 +6132,24 @@ interface HTMLParagraphElement extends HTMLElement { declare var HTMLParagraphElement: { prototype: HTMLParagraphElement; new(): HTMLParagraphElement; -} +}; interface HTMLParamElement extends HTMLElement { /** - * Sets or retrieves the name of an input parameter for an element. - */ + * Sets or retrieves the name of an input parameter for an element. + */ name: string; /** - * Sets or retrieves the content type of the resource designated by the value attribute. - */ + * Sets or retrieves the content type of the resource designated by the value attribute. + */ type: string; /** - * Sets or retrieves the value of an input parameter for an element. - */ + * Sets or retrieves the value of an input parameter for an element. + */ value: string; /** - * Sets or retrieves the data type of the value attribute. - */ + * Sets or retrieves the data type of the value attribute. + */ valueType: string; addEventListener(type: K, listener: (this: HTMLParamElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -6118,7 +6158,7 @@ interface HTMLParamElement extends HTMLElement { declare var HTMLParamElement: { prototype: HTMLParamElement; new(): HTMLParamElement; -} +}; interface HTMLPictureElement extends HTMLElement { addEventListener(type: K, listener: (this: HTMLPictureElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; @@ -6128,12 +6168,12 @@ interface HTMLPictureElement extends HTMLElement { declare var HTMLPictureElement: { prototype: HTMLPictureElement; new(): HTMLPictureElement; -} +}; interface HTMLPreElement extends HTMLElement { /** - * Sets or gets a value that you can use to implement your own width functionality for the object. - */ + * Sets or gets a value that you can use to implement your own width functionality for the object. + */ width: number; addEventListener(type: K, listener: (this: HTMLPreElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -6142,24 +6182,24 @@ interface HTMLPreElement extends HTMLElement { declare var HTMLPreElement: { prototype: HTMLPreElement; new(): HTMLPreElement; -} +}; interface HTMLProgressElement extends HTMLElement { /** - * Retrieves a reference to the form that the object is embedded in. - */ + * Retrieves a reference to the form that the object is embedded in. + */ readonly form: HTMLFormElement; /** - * Defines the maximum, or "done" value for a progress element. - */ + * Defines the maximum, or "done" value for a progress element. + */ max: number; /** - * 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). - */ + * 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). + */ 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. - */ + * Sets or gets the current value of a progress element. The value must be a non-negative number between 0 and the max value. + */ value: number; addEventListener(type: K, listener: (this: HTMLProgressElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -6168,12 +6208,12 @@ interface HTMLProgressElement extends HTMLElement { declare var HTMLProgressElement: { prototype: HTMLProgressElement; new(): HTMLProgressElement; -} +}; interface HTMLQuoteElement extends HTMLElement { /** - * Sets or retrieves reference information about the object. - */ + * Sets or retrieves reference information about the object. + */ cite: string; addEventListener(type: K, listener: (this: HTMLQuoteElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -6182,38 +6222,38 @@ interface HTMLQuoteElement extends HTMLElement { declare var HTMLQuoteElement: { prototype: HTMLQuoteElement; new(): HTMLQuoteElement; -} +}; interface HTMLScriptElement extends HTMLElement { async: boolean; /** - * Sets or retrieves the character set used to encode the object. - */ + * Sets or retrieves the character set used to encode the object. + */ charset: string; crossOrigin: string | null; /** - * Sets or retrieves the status of the script. - */ + * Sets or retrieves the status of the script. + */ defer: boolean; /** - * Sets or retrieves the event for which the script is written. - */ + * Sets or retrieves the event for which the script is written. + */ event: string; - /** - * Sets or retrieves the object that is bound to the event script. - */ + /** + * Sets or retrieves the object that is bound to the event script. + */ htmlFor: string; /** - * Retrieves the URL to an external file that contains the source code or data. - */ + * Retrieves the URL to an external file that contains the source code or data. + */ src: string; /** - * Retrieves or sets the text of the object as a string. - */ + * Retrieves or sets the text of the object as a string. + */ text: string; /** - * Sets or retrieves the MIME type for the associated scripting engine. - */ + * Sets or retrieves the MIME type for the associated scripting engine. + */ type: string; integrity: string; addEventListener(type: K, listener: (this: HTMLScriptElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; @@ -6223,94 +6263,94 @@ interface HTMLScriptElement extends HTMLElement { declare var HTMLScriptElement: { prototype: HTMLScriptElement; new(): HTMLScriptElement; -} +}; interface HTMLSelectElement 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. - */ + * 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. + */ autofocus: boolean; disabled: boolean; /** - * Retrieves a reference to the form that the object is embedded in. - */ + * Retrieves a reference to the form that the object is embedded in. + */ readonly form: HTMLFormElement; /** - * Sets or retrieves the number of objects in a collection. - */ + * Sets or retrieves the number of objects in a collection. + */ length: number; /** - * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list. - */ + * Sets or retrieves the Boolean value indicating whether multiple items can be selected from a list. + */ multiple: boolean; /** - * Sets or retrieves the name of the object. - */ + * Sets or retrieves the name of the object. + */ name: string; readonly options: HTMLOptionsCollection; /** - * When present, marks an element that can't be submitted without a value. - */ + * When present, marks an element that can't be submitted without a value. + */ required: boolean; /** - * Sets or retrieves the index of the selected option in a select object. - */ + * Sets or retrieves the index of the selected option in a select object. + */ selectedIndex: number; selectedOptions: HTMLCollectionOf; /** - * Sets or retrieves the number of rows in the list box. - */ + * Sets or retrieves the number of rows in the list box. + */ size: number; /** - * Retrieves the type of select control based on the value of the MULTIPLE attribute. - */ + * Retrieves the type of select control based on the value of the MULTIPLE attribute. + */ 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. - */ + * 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. + */ readonly validationMessage: string; /** - * Returns a ValidityState object that represents the validity states of an element. - */ + * Returns a ValidityState object that represents the validity states of an element. + */ readonly validity: ValidityState; /** - * Sets or retrieves the value which is returned to the server when the form control is submitted. - */ + * Sets or retrieves the value which is returned to the server when the form control is submitted. + */ value: string; /** - * Returns whether an element will successfully validate based on forms validation rules and constraints. - */ + * Returns whether an element will successfully validate based on forms validation rules and constraints. + */ 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. - * @param before Variant of type Object that specifies an element to insert before, or null to append the object to the collection. - */ + * 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. + * @param before Variant of type Object that specifies an element to insert before, or null to append the object to the collection. + */ add(element: HTMLElement, before?: HTMLElement | number): void; /** - * Returns whether a form will validate when it is submitted, without having to submit it. - */ + * Returns whether a form will validate when it is submitted, without having to submit it. + */ checkValidity(): boolean; /** - * Retrieves a select object or an object from an options collection. - * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is an integer, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made. - * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned. - */ + * Retrieves a select object or an object from an options collection. + * @param name Variant of type Number or String that specifies the object or collection to retrieve. If this parameter is an integer, it is the zero-based index of the object. If this parameter is a string, all objects with matching name or id properties are retrieved, and a collection is returned if more than one match is made. + * @param index Variant of type Number that specifies the zero-based index of the object to retrieve when a collection is returned. + */ item(name?: any, index?: any): any; /** - * Retrieves a select object or an object from an options collection. - * @param namedItem A String that specifies the name or id property of the object to retrieve. A collection is returned if more than one match is made. - */ + * Retrieves a select object or an object from an options collection. + * @param namedItem A String that specifies the name or id property of the object to retrieve. A collection is returned if more than one match is made. + */ namedItem(name: string): any; /** - * Removes an element from the collection. - * @param index Number that specifies the zero-based index of the element to remove from the collection. - */ + * Removes an element from the collection. + * @param index Number that specifies the zero-based index of the element to remove from the collection. + */ remove(index?: number): void; /** - * 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. - */ + * 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. + */ setCustomValidity(error: string): void; addEventListener(type: K, listener: (this: HTMLSelectElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -6320,18 +6360,18 @@ interface HTMLSelectElement extends HTMLElement { declare var HTMLSelectElement: { prototype: HTMLSelectElement; new(): HTMLSelectElement; -} +}; interface HTMLSourceElement extends HTMLElement { /** - * Gets or sets the intended media type of the media source. + * Gets or sets the intended media type of the media source. */ media: string; msKeySystem: string; sizes: string; /** - * The address or URL of the a media resource that is to be considered. - */ + * The address or URL of the a media resource that is to be considered. + */ src: string; srcset: string; /** @@ -6345,7 +6385,7 @@ interface HTMLSourceElement extends HTMLElement { declare var HTMLSourceElement: { prototype: HTMLSourceElement; new(): HTMLSourceElement; -} +}; interface HTMLSpanElement extends HTMLElement { addEventListener(type: K, listener: (this: HTMLSpanElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; @@ -6355,17 +6395,17 @@ interface HTMLSpanElement extends HTMLElement { declare var HTMLSpanElement: { prototype: HTMLSpanElement; new(): HTMLSpanElement; -} +}; interface HTMLStyleElement extends HTMLElement, LinkStyle { disabled: boolean; /** - * Sets or retrieves the media type. - */ + * Sets or retrieves the media type. + */ media: string; /** - * Retrieves the CSS language in which the style sheet is written. - */ + * Retrieves the CSS language in which the style sheet is written. + */ type: string; addEventListener(type: K, listener: (this: HTMLStyleElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -6374,16 +6414,16 @@ interface HTMLStyleElement extends HTMLElement, LinkStyle { declare var HTMLStyleElement: { prototype: HTMLStyleElement; new(): HTMLStyleElement; -} +}; interface HTMLTableCaptionElement extends HTMLElement { /** - * Sets or retrieves the alignment of the caption or legend. - */ + * Sets or retrieves the alignment of the caption or legend. + */ align: string; /** - * Sets or retrieves whether the caption appears at the top or bottom of the table. - */ + * Sets or retrieves whether the caption appears at the top or bottom of the table. + */ vAlign: string; addEventListener(type: K, listener: (this: HTMLTableCaptionElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -6392,53 +6432,53 @@ interface HTMLTableCaptionElement extends HTMLElement { declare var HTMLTableCaptionElement: { prototype: HTMLTableCaptionElement; new(): HTMLTableCaptionElement; -} +}; interface HTMLTableCellElement extends HTMLElement, HTMLTableAlignment { /** - * Sets or retrieves abbreviated text for the object. - */ + * Sets or retrieves abbreviated text for the object. + */ abbr: string; /** - * Sets or retrieves how the object is aligned with adjacent text. - */ + * Sets or retrieves how the object is aligned with adjacent text. + */ align: string; /** - * Sets or retrieves a comma-delimited list of conceptual categories associated with the object. - */ + * Sets or retrieves a comma-delimited list of conceptual categories associated with the object. + */ axis: string; bgColor: any; /** - * Retrieves the position of the object in the cells collection of a row. - */ + * Retrieves the position of the object in the cells collection of a row. + */ readonly cellIndex: number; /** - * Sets or retrieves the number columns in the table that the object should span. - */ + * Sets or retrieves the number columns in the table that the object should span. + */ colSpan: number; /** - * Sets or retrieves a list of header cells that provide information for the object. - */ + * Sets or retrieves a list of header cells that provide information for the object. + */ headers: string; /** - * Sets or retrieves the height of the object. - */ + * Sets or retrieves the height of the object. + */ height: any; /** - * Sets or retrieves whether the browser automatically performs wordwrap. - */ + * Sets or retrieves whether the browser automatically performs wordwrap. + */ noWrap: boolean; /** - * Sets or retrieves how many rows in a table the cell should span. - */ + * Sets or retrieves how many rows in a table the cell should span. + */ rowSpan: number; /** - * Sets or retrieves the group of cells in a table to which the object's information applies. - */ + * Sets or retrieves the group of cells in a table to which the object's information applies. + */ scope: string; /** - * Sets or retrieves the width of the object. - */ + * Sets or retrieves the width of the object. + */ width: string; addEventListener(type: K, listener: (this: HTMLTableCellElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -6447,20 +6487,20 @@ interface HTMLTableCellElement extends HTMLElement, HTMLTableAlignment { declare var HTMLTableCellElement: { prototype: HTMLTableCellElement; new(): HTMLTableCellElement; -} +}; interface HTMLTableColElement extends HTMLElement, HTMLTableAlignment { /** - * Sets or retrieves the alignment of the object relative to the display or table. - */ + * Sets or retrieves the alignment of the object relative to the display or table. + */ align: string; /** - * Sets or retrieves the number of columns in the group. - */ + * Sets or retrieves the number of columns in the group. + */ span: number; /** - * Sets or retrieves the width of the object. - */ + * Sets or retrieves the width of the object. + */ width: any; addEventListener(type: K, listener: (this: HTMLTableColElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -6469,7 +6509,7 @@ interface HTMLTableColElement extends HTMLElement, HTMLTableAlignment { declare var HTMLTableColElement: { prototype: HTMLTableColElement; new(): HTMLTableColElement; -} +}; interface HTMLTableDataCellElement extends HTMLTableCellElement { addEventListener(type: K, listener: (this: HTMLTableDataCellElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; @@ -6479,111 +6519,111 @@ interface HTMLTableDataCellElement extends HTMLTableCellElement { declare var HTMLTableDataCellElement: { prototype: HTMLTableDataCellElement; new(): HTMLTableDataCellElement; -} +}; interface HTMLTableElement extends HTMLElement { /** - * Sets or retrieves a value that indicates the table alignment. - */ + * Sets or retrieves a value that indicates the table alignment. + */ align: string; bgColor: any; /** - * Sets or retrieves the width of the border to draw around the object. - */ + * Sets or retrieves the width of the border to draw around the object. + */ border: string; /** - * Sets or retrieves the border color of the object. - */ + * Sets or retrieves the border color of the object. + */ borderColor: any; /** - * Retrieves the caption object of a table. - */ + * Retrieves the caption object of a table. + */ caption: HTMLTableCaptionElement; /** - * Sets or retrieves the amount of space between the border of the cell and the content of the cell. - */ + * Sets or retrieves the amount of space between the border of the cell and the content of the cell. + */ cellPadding: string; /** - * Sets or retrieves the amount of space between cells in a table. - */ + * Sets or retrieves the amount of space between cells in a table. + */ cellSpacing: string; /** - * Sets or retrieves the number of columns in the table. - */ + * Sets or retrieves the number of columns in the table. + */ cols: number; /** - * Sets or retrieves the way the border frame around the table is displayed. - */ + * Sets or retrieves the way the border frame around the table is displayed. + */ frame: string; /** - * Sets or retrieves the height of the object. - */ + * Sets or retrieves the height of the object. + */ height: any; /** - * Sets or retrieves the number of horizontal rows contained in the object. - */ + * Sets or retrieves the number of horizontal rows contained in the object. + */ rows: HTMLCollectionOf; /** - * Sets or retrieves which dividing lines (inner borders) are displayed. - */ + * Sets or retrieves which dividing lines (inner borders) are displayed. + */ rules: string; /** - * Sets or retrieves a description and/or structure of the object. - */ + * Sets or retrieves a description and/or structure of the object. + */ summary: string; /** - * Retrieves a collection of all tBody objects in the table. Objects in this collection are in source order. - */ + * Retrieves a collection of all tBody objects in the table. Objects in this collection are in source order. + */ tBodies: HTMLCollectionOf; /** - * Retrieves the tFoot object of the table. - */ + * Retrieves the tFoot object of the table. + */ tFoot: HTMLTableSectionElement; /** - * Retrieves the tHead object of the table. - */ + * Retrieves the tHead object of the table. + */ tHead: HTMLTableSectionElement; /** - * Sets or retrieves the width of the object. - */ + * Sets or retrieves the width of the object. + */ width: string; /** - * Creates an empty caption element in the table. - */ + * Creates an empty caption element in the table. + */ createCaption(): HTMLTableCaptionElement; /** - * Creates an empty tBody element in the table. - */ + * Creates an empty tBody element in the table. + */ createTBody(): HTMLTableSectionElement; /** - * Creates an empty tFoot element in the table. - */ + * Creates an empty tFoot element in the table. + */ createTFoot(): HTMLTableSectionElement; /** - * Returns the tHead element object if successful, or null otherwise. - */ + * Returns the tHead element object if successful, or null otherwise. + */ createTHead(): HTMLTableSectionElement; /** - * Deletes the caption element and its contents from the table. - */ + * Deletes the caption element and its contents from the table. + */ deleteCaption(): void; /** - * 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. - */ + * 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. + */ deleteRow(index?: number): void; /** - * Deletes the tFoot element and its contents from the table. - */ + * Deletes the tFoot element and its contents from the table. + */ deleteTFoot(): void; /** - * Deletes the tHead element and its contents from the table. - */ + * Deletes the tHead element and its contents from the table. + */ deleteTHead(): void; /** - * Creates a new row (tr) in the table, and adds the row to the rows collection. - * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection. - */ + * Creates a new row (tr) in the table, and adds the row to the rows collection. + * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection. + */ insertRow(index?: number): HTMLTableRowElement; addEventListener(type: K, listener: (this: HTMLTableElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -6592,12 +6632,12 @@ interface HTMLTableElement extends HTMLElement { declare var HTMLTableElement: { prototype: HTMLTableElement; new(): HTMLTableElement; -} +}; interface HTMLTableHeaderCellElement extends HTMLTableCellElement { /** - * Sets or retrieves the group of cells in a table to which the object's information applies. - */ + * Sets or retrieves the group of cells in a table to which the object's information applies. + */ scope: string; addEventListener(type: K, listener: (this: HTMLTableHeaderCellElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -6606,39 +6646,39 @@ interface HTMLTableHeaderCellElement extends HTMLTableCellElement { declare var HTMLTableHeaderCellElement: { prototype: HTMLTableHeaderCellElement; new(): HTMLTableHeaderCellElement; -} +}; interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment { /** - * Sets or retrieves how the object is aligned with adjacent text. - */ + * Sets or retrieves how the object is aligned with adjacent text. + */ align: string; bgColor: any; /** - * Retrieves a collection of all cells in the table row. - */ + * Retrieves a collection of all cells in the table row. + */ cells: HTMLCollectionOf; /** - * Sets or retrieves the height of the object. - */ + * Sets or retrieves the height of the object. + */ height: any; /** - * Retrieves the position of the object in the rows collection for the table. - */ + * Retrieves the position of the object in the rows collection for the table. + */ readonly rowIndex: number; /** - * Retrieves the position of the object in the collection. - */ + * Retrieves the position of the object in the collection. + */ 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. - */ + * 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. + */ deleteCell(index?: number): void; /** - * 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. - */ + * 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): HTMLTableDataCellElement; addEventListener(type: K, listener: (this: HTMLTableRowElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -6647,26 +6687,26 @@ interface HTMLTableRowElement extends HTMLElement, HTMLTableAlignment { declare var HTMLTableRowElement: { prototype: HTMLTableRowElement; new(): HTMLTableRowElement; -} +}; interface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment { /** - * Sets or retrieves a value that indicates the table alignment. - */ + * Sets or retrieves a value that indicates the table alignment. + */ align: string; /** - * Sets or retrieves the number of horizontal rows contained in the object. - */ + * Sets or retrieves the number of horizontal rows contained in the object. + */ rows: HTMLCollectionOf; /** - * 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. - */ + * 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. + */ deleteRow(index?: number): void; /** - * Creates a new row (tr) in the table, and adds the row to the rows collection. - * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection. - */ + * Creates a new row (tr) in the table, and adds the row to the rows collection. + * @param index Number that specifies where to insert the row in the rows collection. The default value is -1, which appends the new row to the end of the rows collection. + */ insertRow(index?: number): HTMLTableRowElement; addEventListener(type: K, listener: (this: HTMLTableSectionElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -6675,7 +6715,7 @@ interface HTMLTableSectionElement extends HTMLElement, HTMLTableAlignment { declare var HTMLTableSectionElement: { prototype: HTMLTableSectionElement; new(): HTMLTableSectionElement; -} +}; interface HTMLTemplateElement extends HTMLElement { readonly content: DocumentFragment; @@ -6686,105 +6726,105 @@ interface HTMLTemplateElement extends HTMLElement { 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. - */ + * 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. + */ autofocus: boolean; /** - * Sets or retrieves the width of the object. - */ + * Sets or retrieves the width of the object. + */ cols: number; /** - * Sets or retrieves the initial contents of the object. - */ + * Sets or retrieves the initial contents of the object. + */ defaultValue: string; disabled: boolean; /** - * Retrieves a reference to the form that the object is embedded in. - */ + * Retrieves a reference to the form that the object is embedded in. + */ readonly form: HTMLFormElement; /** - * Sets or retrieves the maximum number of characters that the user can enter in a text control. - */ + * Sets or retrieves the maximum number of characters that the user can enter in a text control. + */ maxLength: number; /** - * Sets or retrieves the name of the object. - */ + * Sets or retrieves the name of the object. + */ name: string; /** - * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field. - */ + * Gets or sets a text string that is displayed in an input field as a hint or prompt to users as the format or type of information they need to enter.The text appears in an input field until the user puts focus on the field. + */ placeholder: string; /** - * Sets or retrieves the value indicated whether the content of the object is read-only. - */ + * Sets or retrieves the value indicated whether the content of the object is read-only. + */ readOnly: boolean; /** - * When present, marks an element that can't be submitted without a value. - */ + * When present, marks an element that can't be submitted without a value. + */ required: boolean; /** - * Sets or retrieves the number of horizontal rows contained in the object. - */ + * Sets or retrieves the number of horizontal rows contained in the object. + */ rows: number; /** - * Gets or sets the end position or offset of a text selection. - */ + * Gets or sets the end position or offset of a text selection. + */ selectionEnd: number; /** - * Gets or sets the starting position or offset of a text selection. - */ + * Gets or sets the starting position or offset of a text selection. + */ selectionStart: number; /** - * Sets or retrieves the value indicating whether the control is selected. - */ + * Sets or retrieves the value indicating whether the control is selected. + */ status: any; /** - * Retrieves the type of control. - */ + * Retrieves the type of control. + */ 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. - */ + * 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. + */ readonly validationMessage: string; /** - * Returns a ValidityState object that represents the validity states of an element. - */ + * Returns a ValidityState object that represents the validity states of an element. + */ readonly validity: ValidityState; /** - * Retrieves or sets the text in the entry field of the textArea element. - */ + * Retrieves or sets the text in the entry field of the textArea element. + */ value: string; /** - * Returns whether an element will successfully validate based on forms validation rules and constraints. - */ + * Returns whether an element will successfully validate based on forms validation rules and constraints. + */ readonly willValidate: boolean; /** - * Sets or retrieves how to handle wordwrapping in the object. - */ + * 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. - */ + * Returns whether a form will validate when it is submitted, without having to submit it. + */ checkValidity(): boolean; /** - * Highlights the input area of a form element. - */ + * Highlights the input area of a form element. + */ select(): void; /** - * 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. - */ + * 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. + */ setCustomValidity(error: string): void; /** - * Sets the start and end positions of a selection in a text field. - * @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. - */ + * Sets the start and end positions of a selection in a text field. + * @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; addEventListener(type: K, listener: (this: HTMLTextAreaElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -6793,7 +6833,7 @@ interface HTMLTextAreaElement extends HTMLElement { declare var HTMLTextAreaElement: { prototype: HTMLTextAreaElement; new(): HTMLTextAreaElement; -} +}; interface HTMLTimeElement extends HTMLElement { dateTime: string; @@ -6804,12 +6844,12 @@ interface HTMLTimeElement extends HTMLElement { declare var HTMLTimeElement: { prototype: HTMLTimeElement; new(): HTMLTimeElement; -} +}; interface HTMLTitleElement extends HTMLElement { /** - * Retrieves or sets the text of the object as a string. - */ + * Retrieves or sets the text of the object as a string. + */ text: string; addEventListener(type: K, listener: (this: HTMLTitleElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -6818,7 +6858,7 @@ interface HTMLTitleElement extends HTMLElement { declare var HTMLTitleElement: { prototype: HTMLTitleElement; new(): HTMLTitleElement; -} +}; interface HTMLTrackElement extends HTMLElement { default: boolean; @@ -6843,7 +6883,7 @@ declare var HTMLTrackElement: { readonly LOADED: number; readonly LOADING: number; readonly NONE: number; -} +}; interface HTMLUListElement extends HTMLElement { compact: boolean; @@ -6855,7 +6895,7 @@ interface HTMLUListElement extends HTMLElement { declare var HTMLUListElement: { prototype: HTMLUListElement; new(): HTMLUListElement; -} +}; interface HTMLUnknownElement extends HTMLElement { addEventListener(type: K, listener: (this: HTMLUnknownElement, ev: HTMLElementEventMap[K]) => any, useCapture?: boolean): void; @@ -6865,7 +6905,7 @@ interface HTMLUnknownElement extends HTMLElement { declare var HTMLUnknownElement: { prototype: HTMLUnknownElement; new(): HTMLUnknownElement; -} +}; interface HTMLVideoElementEventMap extends HTMLMediaElementEventMap { "MSVideoFormatChanged": Event; @@ -6875,8 +6915,8 @@ interface HTMLVideoElementEventMap extends HTMLMediaElementEventMap { interface HTMLVideoElement extends HTMLMediaElement { /** - * Gets or sets the height of the video element. - */ + * Gets or sets the height of the video element. + */ height: number; msHorizontalMirror: boolean; readonly msIsLayoutOptimalForPlayback: boolean; @@ -6888,31 +6928,31 @@ interface HTMLVideoElement extends HTMLMediaElement { onMSVideoFrameStepCompleted: (this: HTMLVideoElement, ev: Event) => any; onMSVideoOptimalLayoutChanged: (this: HTMLVideoElement, 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. - */ + * 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. + */ poster: string; /** - * Gets the intrinsic height of a video in CSS pixels, or zero if the dimensions are not known. - */ + * Gets the intrinsic height of a video in CSS pixels, or zero if the dimensions are not known. + */ readonly videoHeight: number; /** - * Gets the intrinsic width of a video in CSS pixels, or zero if the dimensions are not known. - */ + * Gets the intrinsic width of a video in CSS pixels, or zero if the dimensions are not known. + */ readonly videoWidth: number; readonly webkitDisplayingFullscreen: boolean; readonly webkitSupportsFullscreen: boolean; /** - * Gets or sets the width of the video element. - */ + * Gets or sets the width of the video element. + */ width: number; getVideoPlaybackQuality(): VideoPlaybackQuality; msFrameStep(forward: boolean): void; msInsertVideoEffect(activatableClassId: string, effectRequired: boolean, config?: any): void; msSetVideoRectangle(left: number, top: number, right: number, bottom: number): void; - webkitEnterFullScreen(): void; webkitEnterFullscreen(): void; - webkitExitFullScreen(): void; + webkitEnterFullScreen(): void; webkitExitFullscreen(): void; + webkitExitFullScreen(): void; addEventListener(type: K, listener: (this: HTMLVideoElement, ev: HTMLVideoElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; } @@ -6920,47 +6960,7 @@ interface HTMLVideoElement extends HTMLMediaElement { declare var HTMLVideoElement: { prototype: HTMLVideoElement; new(): HTMLVideoElement; -} - -interface HashChangeEvent extends Event { - readonly newURL: string | null; - readonly oldURL: string | null; -} - -declare var HashChangeEvent: { - prototype: HashChangeEvent; - new(typeArg: string, eventInitDict?: HashChangeEventInit): HashChangeEvent; -} - -interface Headers { - append(name: string, value: string): void; - delete(name: string): void; - forEach(callback: ForEachCallback): void; - get(name: string): string | null; - has(name: string): boolean; - set(name: string, value: string): void; -} - -declare var Headers: { - prototype: Headers; - new(init?: any): Headers; -} - -interface History { - readonly length: number; - readonly state: any; - scrollRestoration: ScrollRestoration; - back(): void; - forward(): void; - go(delta?: number): void; - pushState(data: any, title: string, url?: string | null): void; - replaceState(data: any, title: string, url?: string | null): void; -} - -declare var History: { - prototype: History; - new(): History; -} +}; interface IDBCursor { readonly direction: IDBCursorDirection; @@ -6984,7 +6984,7 @@ declare var IDBCursor: { readonly NEXT_NO_DUPLICATE: string; readonly PREV: string; readonly PREV_NO_DUPLICATE: string; -} +}; interface IDBCursorWithValue extends IDBCursor { readonly value: any; @@ -6993,7 +6993,7 @@ interface IDBCursorWithValue extends IDBCursor { declare var IDBCursorWithValue: { prototype: IDBCursorWithValue; new(): IDBCursorWithValue; -} +}; interface IDBDatabaseEventMap { "abort": Event; @@ -7010,7 +7010,7 @@ interface IDBDatabase extends EventTarget { close(): void; createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore; deleteObjectStore(name: string): void; - transaction(storeNames: string | string[], mode?: string): IDBTransaction; + transaction(storeNames: string | string[], mode?: IDBTransactionMode): IDBTransaction; addEventListener(type: "versionchange", listener: (ev: IDBVersionChangeEvent) => any, useCapture?: boolean): void; addEventListener(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -7019,7 +7019,7 @@ interface IDBDatabase extends EventTarget { declare var IDBDatabase: { prototype: IDBDatabase; new(): IDBDatabase; -} +}; interface IDBFactory { cmp(first: any, second: any): number; @@ -7030,7 +7030,7 @@ interface IDBFactory { declare var IDBFactory: { prototype: IDBFactory; new(): IDBFactory; -} +}; interface IDBIndex { keyPath: string | string[]; @@ -7041,14 +7041,14 @@ interface IDBIndex { 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; + openCursor(range?: IDBKeyRange | IDBValidKey, direction?: IDBCursorDirection): IDBRequest; + openKeyCursor(range?: IDBKeyRange | IDBValidKey, direction?: IDBCursorDirection): IDBRequest; } declare var IDBIndex: { prototype: IDBIndex; new(): IDBIndex; -} +}; interface IDBKeyRange { readonly lower: any; @@ -7064,7 +7064,7 @@ declare var IDBKeyRange: { lowerBound(lower: any, open?: boolean): IDBKeyRange; only(value: any): IDBKeyRange; upperBound(upper: any, open?: boolean): IDBKeyRange; -} +}; interface IDBObjectStore { readonly indexNames: DOMStringList; @@ -7080,14 +7080,14 @@ interface IDBObjectStore { deleteIndex(indexName: string): void; get(key: any): IDBRequest; index(name: string): IDBIndex; - openCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest; + openCursor(range?: IDBKeyRange | IDBValidKey, direction?: IDBCursorDirection): IDBRequest; put(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest; } declare var IDBObjectStore: { prototype: IDBObjectStore; new(): IDBObjectStore; -} +}; interface IDBOpenDBRequestEventMap extends IDBRequestEventMap { "blocked": Event; @@ -7104,7 +7104,7 @@ interface IDBOpenDBRequest extends IDBRequest { declare var IDBOpenDBRequest: { prototype: IDBOpenDBRequest; new(): IDBOpenDBRequest; -} +}; interface IDBRequestEventMap { "error": Event; @@ -7112,7 +7112,7 @@ interface IDBRequestEventMap { } interface IDBRequest extends EventTarget { - readonly error: DOMError; + readonly error: DOMException; onerror: (this: IDBRequest, ev: Event) => any; onsuccess: (this: IDBRequest, ev: Event) => any; readonly readyState: IDBRequestReadyState; @@ -7126,7 +7126,7 @@ interface IDBRequest extends EventTarget { declare var IDBRequest: { prototype: IDBRequest; new(): IDBRequest; -} +}; interface IDBTransactionEventMap { "abort": Event; @@ -7136,7 +7136,7 @@ interface IDBTransactionEventMap { interface IDBTransaction extends EventTarget { readonly db: IDBDatabase; - readonly error: DOMError; + readonly error: DOMException; readonly mode: IDBTransactionMode; onabort: (this: IDBTransaction, ev: Event) => any; oncomplete: (this: IDBTransaction, ev: Event) => any; @@ -7156,7 +7156,7 @@ declare var IDBTransaction: { readonly READ_ONLY: string; readonly READ_WRITE: string; readonly VERSION_CHANGE: string; -} +}; interface IDBVersionChangeEvent extends Event { readonly newVersion: number | null; @@ -7166,7 +7166,7 @@ interface IDBVersionChangeEvent extends Event { declare var IDBVersionChangeEvent: { prototype: IDBVersionChangeEvent; new(): IDBVersionChangeEvent; -} +}; interface IIRFilterNode extends AudioNode { getFrequencyResponse(frequencyHz: Float32Array, magResponse: Float32Array, phaseResponse: Float32Array): void; @@ -7175,7 +7175,7 @@ interface IIRFilterNode extends AudioNode { declare var IIRFilterNode: { prototype: IIRFilterNode; new(): IIRFilterNode; -} +}; interface ImageData { data: Uint8ClampedArray; @@ -7187,7 +7187,7 @@ declare var ImageData: { prototype: ImageData; new(width: number, height: number): ImageData; new(array: Uint8ClampedArray, width: number, height: number): ImageData; -} +}; interface IntersectionObserver { readonly root: Element | null; @@ -7202,7 +7202,7 @@ interface IntersectionObserver { declare var IntersectionObserver: { prototype: IntersectionObserver; new(callback: IntersectionObserverCallback, options?: IntersectionObserverInit): IntersectionObserver; -} +}; interface IntersectionObserverEntry { readonly boundingClientRect: ClientRect; @@ -7216,7 +7216,7 @@ interface IntersectionObserverEntry { declare var IntersectionObserverEntry: { prototype: IntersectionObserverEntry; new(intersectionObserverEntryInit: IntersectionObserverEntryInit): IntersectionObserverEntry; -} +}; interface KeyboardEvent extends UIEvent { readonly altKey: boolean; @@ -7251,7 +7251,7 @@ declare var KeyboardEvent: { 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; @@ -7261,7 +7261,7 @@ interface ListeningStateChangedEvent extends Event { declare var ListeningStateChangedEvent: { prototype: ListeningStateChangedEvent; new(): ListeningStateChangedEvent; -} +}; interface Location { hash: string; @@ -7282,7 +7282,7 @@ interface Location { declare var Location: { prototype: Location; new(): Location; -} +}; interface LongRunningScriptDetectedEvent extends Event { readonly executionTime: number; @@ -7292,8 +7292,390 @@ interface LongRunningScriptDetectedEvent extends Event { declare var LongRunningScriptDetectedEvent: { prototype: LongRunningScriptDetectedEvent; new(): LongRunningScriptDetectedEvent; +}; + +interface MediaDeviceInfo { + readonly deviceId: string; + readonly groupId: string; + readonly kind: MediaDeviceKind; + readonly label: string; } +declare var MediaDeviceInfo: { + prototype: MediaDeviceInfo; + new(): MediaDeviceInfo; +}; + +interface MediaDevicesEventMap { + "devicechange": Event; +} + +interface MediaDevices extends EventTarget { + ondevicechange: (this: MediaDevices, ev: Event) => any; + enumerateDevices(): any; + getSupportedConstraints(): MediaTrackSupportedConstraints; + getUserMedia(constraints: MediaStreamConstraints): Promise; + addEventListener(type: K, listener: (this: MediaDevices, ev: MediaDevicesEventMap[K]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; +} + +declare var MediaDevices: { + prototype: MediaDevices; + new(): MediaDevices; +}; + +interface MediaElementAudioSourceNode extends AudioNode { +} + +declare var MediaElementAudioSourceNode: { + prototype: 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 { + 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; + 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: MediaKeyMessageType; +} + +declare var MediaKeyMessageEvent: { + prototype: MediaKeyMessageEvent; + new(type: string, eventInitDict?: MediaKeyMessageEventInit): MediaKeyMessageEvent; +}; + +interface MediaKeys { + createSession(sessionType?: MediaKeySessionType): MediaKeySession; + setServerCertificate(serverCertificate: any): Promise; +} + +declare var MediaKeys: { + prototype: MediaKeys; + new(): MediaKeys; +}; + +interface MediaKeySession extends EventTarget { + readonly closed: Promise; + readonly expiration: number; + readonly keyStatuses: MediaKeyStatusMap; + readonly sessionId: string; + close(): Promise; + generateRequest(initDataType: string, initData: any): Promise; + load(sessionId: string): Promise; + remove(): Promise; + update(response: any): Promise; +} + +declare var MediaKeySession: { + prototype: MediaKeySession; + new(): MediaKeySession; +}; + +interface MediaKeyStatusMap { + readonly size: number; + forEach(callback: ForEachCallback): void; + get(keyId: any): MediaKeyStatus; + has(keyId: any): boolean; +} + +declare var MediaKeyStatusMap: { + prototype: MediaKeyStatusMap; + new(): MediaKeyStatusMap; +}; + +interface MediaKeySystemAccess { + readonly keySystem: string; + createMediaKeys(): Promise; + getConfiguration(): MediaKeySystemConfiguration; +} + +declare var MediaKeySystemAccess: { + prototype: MediaKeySystemAccess; + new(): MediaKeySystemAccess; +}; + +interface MediaList { + readonly length: number; + mediaText: string; + appendMedium(newMedium: string): void; + deleteMedium(oldMedium: string): void; + item(index: number): string; + toString(): string; + [index: number]: string; +} + +declare var MediaList: { + prototype: MediaList; + new(): MediaList; +}; + +interface MediaQueryList { + readonly matches: boolean; + readonly media: string; + addListener(listener: MediaQueryListListener): void; + removeListener(listener: MediaQueryListListener): void; +} + +declare var MediaQueryList: { + prototype: MediaQueryList; + new(): MediaQueryList; +}; + +interface MediaSource extends EventTarget { + readonly activeSourceBuffers: SourceBufferList; + duration: number; + readonly readyState: string; + readonly sourceBuffers: SourceBufferList; + addSourceBuffer(type: string): SourceBuffer; + endOfStream(error?: number): void; + removeSourceBuffer(sourceBuffer: SourceBuffer): void; +} + +declare var MediaSource: { + prototype: MediaSource; + new(): MediaSource; + isTypeSupported(type: string): boolean; +}; + +interface MediaStreamEventMap { + "active": Event; + "addtrack": MediaStreamTrackEvent; + "inactive": Event; + "removetrack": MediaStreamTrackEvent; +} + +interface MediaStream extends EventTarget { + readonly active: boolean; + readonly id: string; + onactive: (this: MediaStream, ev: Event) => any; + onaddtrack: (this: MediaStream, ev: MediaStreamTrackEvent) => any; + oninactive: (this: MediaStream, ev: Event) => any; + onremovetrack: (this: MediaStream, ev: MediaStreamTrackEvent) => 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: K, listener: (this: MediaStream, ev: MediaStreamEventMap[K]) => 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(typeArg: string, eventInitDict?: MediaStreamErrorEventInit): MediaStreamErrorEvent; +}; + +interface MediaStreamEvent extends Event { + readonly stream: MediaStream | null; +} + +declare var MediaStreamEvent: { + prototype: MediaStreamEvent; + new(type: string, eventInitDict: MediaStreamEventInit): MediaStreamEvent; +}; + +interface MediaStreamTrackEventMap { + "ended": MediaStreamErrorEvent; + "mute": Event; + "overconstrained": MediaStreamErrorEvent; + "unmute": Event; +} + +interface MediaStreamTrack extends EventTarget { + enabled: boolean; + readonly id: string; + readonly kind: string; + readonly label: string; + readonly muted: boolean; + onended: (this: MediaStreamTrack, ev: MediaStreamErrorEvent) => any; + onmute: (this: MediaStreamTrack, ev: Event) => any; + onoverconstrained: (this: MediaStreamTrack, ev: MediaStreamErrorEvent) => any; + onunmute: (this: MediaStreamTrack, ev: Event) => any; + readonly readonly: boolean; + readonly readyState: MediaStreamTrackState; + readonly remote: boolean; + applyConstraints(constraints: MediaTrackConstraints): Promise; + clone(): MediaStreamTrack; + getCapabilities(): MediaTrackCapabilities; + getConstraints(): MediaTrackConstraints; + getSettings(): MediaTrackSettings; + stop(): void; + addEventListener(type: K, listener: (this: MediaStreamTrack, ev: MediaStreamTrackEventMap[K]) => 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(typeArg: string, eventInitDict?: MediaStreamTrackEventInit): MediaStreamTrackEvent; +}; + +interface MessageChannel { + readonly port1: MessagePort; + readonly port2: MessagePort; +} + +declare var MessageChannel: { + prototype: MessageChannel; + new(): MessageChannel; +}; + +interface MessageEvent extends Event { + 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; +} + +declare var MessageEvent: { + prototype: MessageEvent; + new(type: string, eventInitDict?: MessageEventInit): MessageEvent; +}; + +interface MessagePortEventMap { + "message": MessageEvent; +} + +interface MessagePort extends EventTarget { + onmessage: (this: MessagePort, ev: MessageEvent) => any; + close(): void; + postMessage(message?: any, transfer?: any[]): void; + start(): void; + addEventListener(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; +} + +declare var MessagePort: { + prototype: MessagePort; + new(): MessagePort; +}; + +interface MimeType { + readonly description: string; + readonly enabledPlugin: Plugin; + readonly suffixes: string; + readonly type: string; +} + +declare var MimeType: { + prototype: MimeType; + new(): MimeType; +}; + +interface MimeTypeArray { + readonly length: number; + item(index: number): Plugin; + namedItem(type: string): Plugin; + [index: number]: Plugin; +} + +declare var MimeTypeArray: { + prototype: MimeTypeArray; + new(): MimeTypeArray; +}; + +interface MouseEvent extends UIEvent { + 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 | null): void; +} + +declare var MouseEvent: { + prototype: MouseEvent; + new(typeArg: string, eventInitDict?: MouseEventInit): MouseEvent; +}; + interface MSApp { clearTemporaryWebDataAsync(): MSAppAsyncOperation; createBlobFromRandomAccessStream(type: string, seeker: any): Blob; @@ -7342,7 +7724,7 @@ declare var MSAppAsyncOperation: { readonly COMPLETED: number; readonly ERROR: number; readonly STARTED: number; -} +}; interface MSAssertion { readonly id: string; @@ -7352,7 +7734,7 @@ interface MSAssertion { declare var MSAssertion: { prototype: MSAssertion; new(): MSAssertion; -} +}; interface MSBlobBuilder { append(data: any, endings?: string): void; @@ -7362,7 +7744,7 @@ interface MSBlobBuilder { declare var MSBlobBuilder: { prototype: MSBlobBuilder; new(): MSBlobBuilder; -} +}; interface MSCredentials { getAssertion(challenge: string, filter?: MSCredentialFilter, params?: MSSignatureParameters): Promise; @@ -7372,7 +7754,7 @@ interface MSCredentials { declare var MSCredentials: { prototype: MSCredentials; new(): MSCredentials; -} +}; interface MSFIDOCredentialAssertion extends MSAssertion { readonly algorithm: string | Algorithm; @@ -7384,7 +7766,7 @@ interface MSFIDOCredentialAssertion extends MSAssertion { declare var MSFIDOCredentialAssertion: { prototype: MSFIDOCredentialAssertion; new(): MSFIDOCredentialAssertion; -} +}; interface MSFIDOSignature { readonly authnrData: string; @@ -7395,7 +7777,7 @@ interface MSFIDOSignature { declare var MSFIDOSignature: { prototype: MSFIDOSignature; new(): MSFIDOSignature; -} +}; interface MSFIDOSignatureAssertion extends MSAssertion { readonly signature: MSFIDOSignature; @@ -7404,7 +7786,7 @@ interface MSFIDOSignatureAssertion extends MSAssertion { declare var MSFIDOSignatureAssertion: { prototype: MSFIDOSignatureAssertion; new(): MSFIDOSignatureAssertion; -} +}; interface MSGesture { target: Element; @@ -7415,7 +7797,7 @@ interface MSGesture { declare var MSGesture: { prototype: MSGesture; new(): MSGesture; -} +}; interface MSGestureEvent extends UIEvent { readonly clientX: number; @@ -7451,7 +7833,7 @@ declare var MSGestureEvent: { readonly MSGESTURE_FLAG_END: number; readonly MSGESTURE_FLAG_INERTIA: number; readonly MSGESTURE_FLAG_NONE: number; -} +}; interface MSGraphicsTrust { readonly constrictionActive: boolean; @@ -7461,7 +7843,7 @@ interface MSGraphicsTrust { declare var MSGraphicsTrust: { prototype: MSGraphicsTrust; new(): MSGraphicsTrust; -} +}; interface MSHTMLWebViewElement extends HTMLElement { readonly canGoBack: boolean; @@ -7495,7 +7877,7 @@ interface MSHTMLWebViewElement extends HTMLElement { declare var MSHTMLWebViewElement: { prototype: MSHTMLWebViewElement; new(): MSHTMLWebViewElement; -} +}; interface MSInputMethodContextEventMap { "MSCandidateWindowHide": Event; @@ -7521,7 +7903,7 @@ interface MSInputMethodContext extends EventTarget { declare var MSInputMethodContext: { prototype: MSInputMethodContext; new(): MSInputMethodContext; -} +}; interface MSManipulationEvent extends UIEvent { readonly currentState: number; @@ -7550,7 +7932,7 @@ declare var MSManipulationEvent: { readonly MS_MANIPULATION_STATE_PRESELECT: number; readonly MS_MANIPULATION_STATE_SELECTING: number; readonly MS_MANIPULATION_STATE_STOPPED: number; -} +}; interface MSMediaKeyError { readonly code: number; @@ -7572,7 +7954,7 @@ declare var MSMediaKeyError: { readonly MS_MEDIA_KEYERR_OUTPUT: number; readonly MS_MEDIA_KEYERR_SERVICE: number; readonly MS_MEDIA_KEYERR_UNKNOWN: number; -} +}; interface MSMediaKeyMessageEvent extends Event { readonly destinationURL: string | null; @@ -7582,7 +7964,7 @@ interface MSMediaKeyMessageEvent extends Event { declare var MSMediaKeyMessageEvent: { prototype: MSMediaKeyMessageEvent; new(): MSMediaKeyMessageEvent; -} +}; interface MSMediaKeyNeededEvent extends Event { readonly initData: Uint8Array | null; @@ -7591,8 +7973,20 @@ interface MSMediaKeyNeededEvent extends Event { declare var MSMediaKeyNeededEvent: { prototype: MSMediaKeyNeededEvent; new(): MSMediaKeyNeededEvent; +}; + +interface MSMediaKeys { + readonly keySystem: string; + createSession(type: string, initData: Uint8Array, cdmData?: Uint8Array): MSMediaKeySession; } +declare var MSMediaKeys: { + prototype: MSMediaKeys; + new(keySystem: string): MSMediaKeys; + isTypeSupported(keySystem: string, type?: string): boolean; + isTypeSupportedWithFeatures(keySystem: string, type?: string): string; +}; + interface MSMediaKeySession extends EventTarget { readonly error: MSMediaKeyError | null; readonly keySystem: string; @@ -7604,19 +7998,7 @@ interface MSMediaKeySession extends EventTarget { declare var MSMediaKeySession: { prototype: MSMediaKeySession; new(): MSMediaKeySession; -} - -interface MSMediaKeys { - readonly keySystem: string; - createSession(type: string, initData: Uint8Array, cdmData?: Uint8Array): MSMediaKeySession; -} - -declare var MSMediaKeys: { - prototype: MSMediaKeys; - new(keySystem: string): MSMediaKeys; - isTypeSupported(keySystem: string, type?: string): boolean; - isTypeSupportedWithFeatures(keySystem: string, type?: string): string; -} +}; interface MSPointerEvent extends MouseEvent { readonly currentPoint: any; @@ -7639,7 +8021,7 @@ interface MSPointerEvent extends MouseEvent { declare var MSPointerEvent: { prototype: MSPointerEvent; new(typeArg: string, eventInitDict?: PointerEventInit): MSPointerEvent; -} +}; interface MSRangeCollection { readonly length: number; @@ -7650,7 +8032,7 @@ interface MSRangeCollection { declare var MSRangeCollection: { prototype: MSRangeCollection; new(): MSRangeCollection; -} +}; interface MSSiteModeEvent extends Event { readonly actionURL: string; @@ -7660,7 +8042,7 @@ interface MSSiteModeEvent extends Event { declare var MSSiteModeEvent: { prototype: MSSiteModeEvent; new(): MSSiteModeEvent; -} +}; interface MSStream { readonly type: string; @@ -7671,7 +8053,7 @@ interface MSStream { declare var MSStream: { prototype: MSStream; new(): MSStream; -} +}; interface MSStreamReader extends EventTarget, MSBaseReader { readonly error: DOMError; @@ -7687,7 +8069,7 @@ interface MSStreamReader extends EventTarget, MSBaseReader { declare var MSStreamReader: { prototype: MSStreamReader; new(): MSStreamReader; -} +}; interface MSWebViewAsyncOperationEventMap { "complete": Event; @@ -7722,7 +8104,7 @@ declare var MSWebViewAsyncOperation: { readonly TYPE_CAPTURE_PREVIEW_TO_RANDOM_ACCESS_STREAM: number; readonly TYPE_CREATE_DATA_PACKAGE_FROM_SELECTION: number; readonly TYPE_INVOKE_SCRIPT: number; -} +}; interface MSWebViewSettings { isIndexedDBEnabled: boolean; @@ -7732,389 +8114,7 @@ interface MSWebViewSettings { declare var MSWebViewSettings: { prototype: MSWebViewSettings; new(): MSWebViewSettings; -} - -interface MediaDeviceInfo { - readonly deviceId: string; - readonly groupId: string; - readonly kind: MediaDeviceKind; - readonly label: string; -} - -declare var MediaDeviceInfo: { - prototype: MediaDeviceInfo; - new(): MediaDeviceInfo; -} - -interface MediaDevicesEventMap { - "devicechange": Event; -} - -interface MediaDevices extends EventTarget { - ondevicechange: (this: MediaDevices, ev: Event) => any; - enumerateDevices(): any; - getSupportedConstraints(): MediaTrackSupportedConstraints; - getUserMedia(constraints: MediaStreamConstraints): Promise; - addEventListener(type: K, listener: (this: MediaDevices, ev: MediaDevicesEventMap[K]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var MediaDevices: { - prototype: MediaDevices; - new(): MediaDevices; -} - -interface MediaElementAudioSourceNode extends AudioNode { -} - -declare var MediaElementAudioSourceNode: { - prototype: 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 { - 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; - 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: MediaKeyMessageType; -} - -declare var MediaKeyMessageEvent: { - prototype: MediaKeyMessageEvent; - new(type: string, eventInitDict?: MediaKeyMessageEventInit): MediaKeyMessageEvent; -} - -interface MediaKeySession extends EventTarget { - readonly closed: Promise; - readonly expiration: number; - readonly keyStatuses: MediaKeyStatusMap; - readonly sessionId: string; - close(): Promise; - generateRequest(initDataType: string, initData: any): Promise; - load(sessionId: string): Promise; - remove(): Promise; - update(response: any): Promise; -} - -declare var MediaKeySession: { - prototype: MediaKeySession; - new(): MediaKeySession; -} - -interface MediaKeyStatusMap { - readonly size: number; - forEach(callback: ForEachCallback): void; - get(keyId: any): MediaKeyStatus; - has(keyId: any): boolean; -} - -declare var MediaKeyStatusMap: { - prototype: MediaKeyStatusMap; - new(): MediaKeyStatusMap; -} - -interface MediaKeySystemAccess { - readonly keySystem: string; - createMediaKeys(): Promise; - getConfiguration(): MediaKeySystemConfiguration; -} - -declare var MediaKeySystemAccess: { - prototype: MediaKeySystemAccess; - new(): MediaKeySystemAccess; -} - -interface MediaKeys { - createSession(sessionType?: MediaKeySessionType): MediaKeySession; - setServerCertificate(serverCertificate: any): Promise; -} - -declare var MediaKeys: { - prototype: MediaKeys; - new(): MediaKeys; -} - -interface MediaList { - readonly length: number; - mediaText: string; - appendMedium(newMedium: string): void; - deleteMedium(oldMedium: string): void; - item(index: number): string; - toString(): string; - [index: number]: string; -} - -declare var MediaList: { - prototype: MediaList; - new(): MediaList; -} - -interface MediaQueryList { - readonly matches: boolean; - readonly media: string; - addListener(listener: MediaQueryListListener): void; - removeListener(listener: MediaQueryListListener): void; -} - -declare var MediaQueryList: { - prototype: MediaQueryList; - new(): MediaQueryList; -} - -interface MediaSource extends EventTarget { - readonly activeSourceBuffers: SourceBufferList; - duration: number; - readonly readyState: string; - readonly sourceBuffers: SourceBufferList; - addSourceBuffer(type: string): SourceBuffer; - endOfStream(error?: number): void; - removeSourceBuffer(sourceBuffer: SourceBuffer): void; -} - -declare var MediaSource: { - prototype: MediaSource; - new(): MediaSource; - isTypeSupported(type: string): boolean; -} - -interface MediaStreamEventMap { - "active": Event; - "addtrack": MediaStreamTrackEvent; - "inactive": Event; - "removetrack": MediaStreamTrackEvent; -} - -interface MediaStream extends EventTarget { - readonly active: boolean; - readonly id: string; - onactive: (this: MediaStream, ev: Event) => any; - onaddtrack: (this: MediaStream, ev: MediaStreamTrackEvent) => any; - oninactive: (this: MediaStream, ev: Event) => any; - onremovetrack: (this: MediaStream, ev: MediaStreamTrackEvent) => 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: K, listener: (this: MediaStream, ev: MediaStreamEventMap[K]) => 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(typeArg: string, eventInitDict?: MediaStreamErrorEventInit): MediaStreamErrorEvent; -} - -interface MediaStreamEvent extends Event { - readonly stream: MediaStream | null; -} - -declare var MediaStreamEvent: { - prototype: MediaStreamEvent; - new(type: string, eventInitDict: MediaStreamEventInit): MediaStreamEvent; -} - -interface MediaStreamTrackEventMap { - "ended": MediaStreamErrorEvent; - "mute": Event; - "overconstrained": MediaStreamErrorEvent; - "unmute": Event; -} - -interface MediaStreamTrack extends EventTarget { - enabled: boolean; - readonly id: string; - readonly kind: string; - readonly label: string; - readonly muted: boolean; - onended: (this: MediaStreamTrack, ev: MediaStreamErrorEvent) => any; - onmute: (this: MediaStreamTrack, ev: Event) => any; - onoverconstrained: (this: MediaStreamTrack, ev: MediaStreamErrorEvent) => any; - onunmute: (this: MediaStreamTrack, ev: Event) => any; - readonly readonly: boolean; - readonly readyState: MediaStreamTrackState; - readonly remote: boolean; - applyConstraints(constraints: MediaTrackConstraints): Promise; - clone(): MediaStreamTrack; - getCapabilities(): MediaTrackCapabilities; - getConstraints(): MediaTrackConstraints; - getSettings(): MediaTrackSettings; - stop(): void; - addEventListener(type: K, listener: (this: MediaStreamTrack, ev: MediaStreamTrackEventMap[K]) => 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(typeArg: string, eventInitDict?: MediaStreamTrackEventInit): MediaStreamTrackEvent; -} - -interface MessageChannel { - readonly port1: MessagePort; - readonly port2: MessagePort; -} - -declare var MessageChannel: { - prototype: MessageChannel; - new(): MessageChannel; -} - -interface MessageEvent extends Event { - 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; -} - -declare var MessageEvent: { - prototype: MessageEvent; - new(type: string, eventInitDict?: MessageEventInit): MessageEvent; -} - -interface MessagePortEventMap { - "message": MessageEvent; -} - -interface MessagePort extends EventTarget { - onmessage: (this: MessagePort, ev: MessageEvent) => any; - close(): void; - postMessage(message?: any, transfer?: any[]): void; - start(): void; - addEventListener(type: K, listener: (this: MessagePort, ev: MessagePortEventMap[K]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var MessagePort: { - prototype: MessagePort; - new(): MessagePort; -} - -interface MimeType { - readonly description: string; - readonly enabledPlugin: Plugin; - readonly suffixes: string; - readonly type: string; -} - -declare var MimeType: { - prototype: MimeType; - new(): MimeType; -} - -interface MimeTypeArray { - readonly length: number; - item(index: number): Plugin; - namedItem(type: string): Plugin; - [index: number]: Plugin; -} - -declare var MimeTypeArray: { - prototype: MimeTypeArray; - new(): MimeTypeArray; -} - -interface MouseEvent extends UIEvent { - 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 | null): void; -} - -declare var MouseEvent: { - prototype: MouseEvent; - new(typeArg: string, eventInitDict?: MouseEventInit): MouseEvent; -} +}; interface MutationEvent extends Event { readonly attrChange: number; @@ -8134,7 +8134,7 @@ declare var MutationEvent: { readonly ADDITION: number; readonly MODIFICATION: number; readonly REMOVAL: number; -} +}; interface MutationObserver { disconnect(): void; @@ -8145,7 +8145,7 @@ interface MutationObserver { declare var MutationObserver: { prototype: MutationObserver; new(callback: MutationCallback): MutationObserver; -} +}; interface MutationRecord { readonly addedNodes: NodeList; @@ -8162,7 +8162,7 @@ interface MutationRecord { declare var MutationRecord: { prototype: MutationRecord; new(): MutationRecord; -} +}; interface NamedNodeMap { readonly length: number; @@ -8179,7 +8179,7 @@ interface NamedNodeMap { declare var NamedNodeMap: { prototype: NamedNodeMap; new(): NamedNodeMap; -} +}; interface NavigationCompletedEvent extends NavigationEvent { readonly isSuccess: boolean; @@ -8189,7 +8189,7 @@ interface NavigationCompletedEvent extends NavigationEvent { declare var NavigationCompletedEvent: { prototype: NavigationCompletedEvent; new(): NavigationCompletedEvent; -} +}; interface NavigationEvent extends Event { readonly uri: string; @@ -8198,7 +8198,7 @@ interface NavigationEvent extends Event { declare var NavigationEvent: { prototype: NavigationEvent; new(): NavigationEvent; -} +}; interface NavigationEventWithReferrer extends NavigationEvent { readonly referer: string; @@ -8207,7 +8207,7 @@ interface NavigationEventWithReferrer extends NavigationEvent { declare var NavigationEventWithReferrer: { prototype: NavigationEventWithReferrer; new(): NavigationEventWithReferrer; -} +}; interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorContentUtils, NavigatorStorageUtils, NavigatorGeolocation, MSNavigatorDoNotTrack, MSFileSaver, NavigatorBeacon, NavigatorConcurrentHardware, NavigatorUserMedia { readonly authentication: WebAuthentication; @@ -8234,7 +8234,7 @@ interface Navigator extends Object, NavigatorID, NavigatorOnLine, NavigatorConte declare var Navigator: { prototype: Navigator; new(): Navigator; -} +}; interface Node extends EventTarget { readonly attributes: NamedNodeMap; @@ -8309,7 +8309,7 @@ declare var Node: { readonly NOTATION_NODE: number; readonly PROCESSING_INSTRUCTION_NODE: number; readonly TEXT_NODE: number; -} +}; interface NodeFilter { acceptNode(n: Node): number; @@ -8332,7 +8332,7 @@ declare var NodeFilter: { readonly SHOW_NOTATION: number; readonly SHOW_PROCESSING_INSTRUCTION: number; readonly SHOW_TEXT: number; -} +}; interface NodeIterator { readonly expandEntityReferences: boolean; @@ -8347,7 +8347,7 @@ interface NodeIterator { declare var NodeIterator: { prototype: NodeIterator; new(): NodeIterator; -} +}; interface NodeList { readonly length: number; @@ -8358,7 +8358,7 @@ interface NodeList { declare var NodeList: { prototype: NodeList; new(): NodeList; -} +}; interface NotificationEventMap { "click": Event; @@ -8388,7 +8388,7 @@ declare var Notification: { prototype: Notification; new(title: string, options?: NotificationOptions): Notification; requestPermission(callback?: NotificationPermissionCallback): Promise; -} +}; interface OES_element_index_uint { } @@ -8396,7 +8396,7 @@ interface OES_element_index_uint { declare var OES_element_index_uint: { prototype: OES_element_index_uint; new(): OES_element_index_uint; -} +}; interface OES_standard_derivatives { readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number; @@ -8406,7 +8406,7 @@ declare var OES_standard_derivatives: { prototype: OES_standard_derivatives; new(): OES_standard_derivatives; readonly FRAGMENT_SHADER_DERIVATIVE_HINT_OES: number; -} +}; interface OES_texture_float { } @@ -8414,7 +8414,7 @@ interface OES_texture_float { declare var OES_texture_float: { prototype: OES_texture_float; new(): OES_texture_float; -} +}; interface OES_texture_float_linear { } @@ -8422,7 +8422,7 @@ interface OES_texture_float_linear { declare var OES_texture_float_linear: { prototype: OES_texture_float_linear; new(): OES_texture_float_linear; -} +}; interface OES_texture_half_float { readonly HALF_FLOAT_OES: number; @@ -8432,7 +8432,7 @@ declare var OES_texture_half_float: { prototype: OES_texture_half_float; new(): OES_texture_half_float; readonly HALF_FLOAT_OES: number; -} +}; interface OES_texture_half_float_linear { } @@ -8440,7 +8440,7 @@ interface OES_texture_half_float_linear { declare var OES_texture_half_float_linear: { prototype: OES_texture_half_float_linear; new(): OES_texture_half_float_linear; -} +}; interface OfflineAudioCompletionEvent extends Event { readonly renderedBuffer: AudioBuffer; @@ -8449,7 +8449,7 @@ interface OfflineAudioCompletionEvent extends Event { declare var OfflineAudioCompletionEvent: { prototype: OfflineAudioCompletionEvent; new(): OfflineAudioCompletionEvent; -} +}; interface OfflineAudioContextEventMap extends AudioContextEventMap { "complete": OfflineAudioCompletionEvent; @@ -8467,7 +8467,7 @@ interface OfflineAudioContext extends AudioContextBase { declare var OfflineAudioContext: { prototype: OfflineAudioContext; new(numberOfChannels: number, length: number, sampleRate: number): OfflineAudioContext; -} +}; interface OscillatorNodeEventMap { "ended": MediaStreamErrorEvent; @@ -8488,7 +8488,7 @@ interface OscillatorNode extends AudioNode { declare var OscillatorNode: { prototype: OscillatorNode; new(): OscillatorNode; -} +}; interface OverflowEvent extends UIEvent { readonly horizontalOverflow: boolean; @@ -8505,7 +8505,7 @@ declare var OverflowEvent: { readonly BOTH: number; readonly HORIZONTAL: number; readonly VERTICAL: number; -} +}; interface PageTransitionEvent extends Event { readonly persisted: boolean; @@ -8514,7 +8514,7 @@ interface PageTransitionEvent extends Event { declare var PageTransitionEvent: { prototype: PageTransitionEvent; new(): PageTransitionEvent; -} +}; interface PannerNode extends AudioNode { coneInnerAngle: number; @@ -8533,7 +8533,7 @@ interface PannerNode extends AudioNode { declare var PannerNode: { prototype: PannerNode; new(): PannerNode; -} +}; interface Path2D extends Object, CanvasPathMethods { } @@ -8541,7 +8541,7 @@ interface Path2D extends Object, CanvasPathMethods { declare var Path2D: { prototype: Path2D; new(path?: Path2D): Path2D; -} +}; interface PaymentAddress { readonly addressLine: string[]; @@ -8561,7 +8561,7 @@ interface PaymentAddress { declare var PaymentAddress: { prototype: PaymentAddress; new(): PaymentAddress; -} +}; interface PaymentRequestEventMap { "shippingaddresschange": Event; @@ -8583,7 +8583,7 @@ interface PaymentRequest extends EventTarget { declare var PaymentRequest: { prototype: PaymentRequest; new(methodData: PaymentMethodData[], details: PaymentDetails, options?: PaymentOptions): PaymentRequest; -} +}; interface PaymentRequestUpdateEvent extends Event { updateWith(d: Promise): void; @@ -8592,7 +8592,7 @@ interface PaymentRequestUpdateEvent extends Event { declare var PaymentRequestUpdateEvent: { prototype: PaymentRequestUpdateEvent; new(type: string, eventInitDict?: PaymentRequestUpdateEventInit): PaymentRequestUpdateEvent; -} +}; interface PaymentResponse { readonly details: any; @@ -8609,8 +8609,158 @@ interface PaymentResponse { declare var PaymentResponse: { prototype: PaymentResponse; new(): PaymentResponse; +}; + +interface Performance { + readonly navigation: PerformanceNavigation; + readonly timing: PerformanceTiming; + clearMarks(markName?: string): void; + clearMeasures(measureName?: string): void; + clearResourceTimings(): void; + getEntries(): any; + getEntriesByName(name: string, entryType?: string): any; + getEntriesByType(entryType: string): any; + getMarks(markName?: string): any; + getMeasures(measureName?: string): any; + mark(markName: string): void; + measure(measureName: string, startMarkName?: string, endMarkName?: string): void; + now(): number; + setResourceTimingBufferSize(maxSize: number): void; + toJSON(): any; } +declare var Performance: { + prototype: Performance; + new(): Performance; +}; + +interface PerformanceEntry { + readonly duration: number; + readonly entryType: string; + readonly name: string; + readonly startTime: number; +} + +declare var PerformanceEntry: { + prototype: PerformanceEntry; + new(): PerformanceEntry; +}; + +interface PerformanceMark extends PerformanceEntry { +} + +declare var PerformanceMark: { + prototype: PerformanceMark; + new(): PerformanceMark; +}; + +interface PerformanceMeasure extends PerformanceEntry { +} + +declare var PerformanceMeasure: { + prototype: PerformanceMeasure; + new(): PerformanceMeasure; +}; + +interface PerformanceNavigation { + readonly redirectCount: number; + readonly type: number; + toJSON(): any; + readonly TYPE_BACK_FORWARD: number; + readonly TYPE_NAVIGATE: number; + readonly TYPE_RELOAD: number; + readonly TYPE_RESERVED: number; +} + +declare var PerformanceNavigation: { + prototype: PerformanceNavigation; + new(): PerformanceNavigation; + readonly TYPE_BACK_FORWARD: number; + readonly TYPE_NAVIGATE: number; + readonly TYPE_RELOAD: number; + readonly TYPE_RESERVED: number; +}; + +interface PerformanceNavigationTiming extends PerformanceEntry { + readonly connectEnd: number; + readonly connectStart: number; + readonly domainLookupEnd: number; + readonly domainLookupStart: number; + readonly domComplete: number; + readonly domContentLoadedEventEnd: number; + readonly domContentLoadedEventStart: number; + readonly domInteractive: number; + readonly domLoading: 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: NavigationType; + readonly unloadEventEnd: number; + readonly unloadEventStart: number; +} + +declare var PerformanceNavigationTiming: { + prototype: PerformanceNavigationTiming; + new(): PerformanceNavigationTiming; +}; + +interface PerformanceResourceTiming extends PerformanceEntry { + 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: { + prototype: PerformanceResourceTiming; + new(): PerformanceResourceTiming; +}; + +interface PerformanceTiming { + readonly connectEnd: number; + readonly connectStart: number; + readonly domainLookupEnd: number; + readonly domainLookupStart: number; + readonly domComplete: number; + readonly domContentLoadedEventEnd: number; + readonly domContentLoadedEventStart: number; + readonly domInteractive: number; + readonly domLoading: 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; +} + +declare var PerformanceTiming: { + prototype: PerformanceTiming; + new(): PerformanceTiming; +}; + interface PerfWidgetExternal { readonly activeNetworkRequestCount: number; readonly averageFrameTime: number; @@ -8638,157 +8788,7 @@ interface PerfWidgetExternal { declare var PerfWidgetExternal: { prototype: PerfWidgetExternal; new(): PerfWidgetExternal; -} - -interface Performance { - readonly navigation: PerformanceNavigation; - readonly timing: PerformanceTiming; - clearMarks(markName?: string): void; - clearMeasures(measureName?: string): void; - clearResourceTimings(): void; - getEntries(): any; - getEntriesByName(name: string, entryType?: string): any; - getEntriesByType(entryType: string): any; - getMarks(markName?: string): any; - getMeasures(measureName?: string): any; - mark(markName: string): void; - measure(measureName: string, startMarkName?: string, endMarkName?: string): void; - now(): number; - setResourceTimingBufferSize(maxSize: number): void; - toJSON(): any; -} - -declare var Performance: { - prototype: Performance; - new(): Performance; -} - -interface PerformanceEntry { - readonly duration: number; - readonly entryType: string; - readonly name: string; - readonly startTime: number; -} - -declare var PerformanceEntry: { - prototype: PerformanceEntry; - new(): PerformanceEntry; -} - -interface PerformanceMark extends PerformanceEntry { -} - -declare var PerformanceMark: { - prototype: PerformanceMark; - new(): PerformanceMark; -} - -interface PerformanceMeasure extends PerformanceEntry { -} - -declare var PerformanceMeasure: { - prototype: PerformanceMeasure; - new(): PerformanceMeasure; -} - -interface PerformanceNavigation { - readonly redirectCount: number; - readonly type: number; - toJSON(): any; - readonly TYPE_BACK_FORWARD: number; - readonly TYPE_NAVIGATE: number; - readonly TYPE_RELOAD: number; - readonly TYPE_RESERVED: number; -} - -declare var PerformanceNavigation: { - prototype: PerformanceNavigation; - new(): PerformanceNavigation; - readonly TYPE_BACK_FORWARD: number; - readonly TYPE_NAVIGATE: number; - readonly TYPE_RELOAD: number; - readonly TYPE_RESERVED: number; -} - -interface PerformanceNavigationTiming extends PerformanceEntry { - 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: NavigationType; - readonly unloadEventEnd: number; - readonly unloadEventStart: number; -} - -declare var PerformanceNavigationTiming: { - prototype: PerformanceNavigationTiming; - new(): PerformanceNavigationTiming; -} - -interface PerformanceResourceTiming extends PerformanceEntry { - 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: { - prototype: PerformanceResourceTiming; - new(): PerformanceResourceTiming; -} - -interface PerformanceTiming { - 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; -} - -declare var PerformanceTiming: { - prototype: PerformanceTiming; - new(): PerformanceTiming; -} +}; interface PeriodicWave { } @@ -8796,7 +8796,7 @@ interface PeriodicWave { declare var PeriodicWave: { prototype: PeriodicWave; new(): PeriodicWave; -} +}; interface PermissionRequest extends DeferredPermissionRequest { readonly state: MSWebViewPermissionState; @@ -8806,7 +8806,7 @@ interface PermissionRequest extends DeferredPermissionRequest { declare var PermissionRequest: { prototype: PermissionRequest; new(): PermissionRequest; -} +}; interface PermissionRequestedEvent extends Event { readonly permissionRequest: PermissionRequest; @@ -8815,7 +8815,7 @@ interface PermissionRequestedEvent extends Event { declare var PermissionRequestedEvent: { prototype: PermissionRequestedEvent; new(): PermissionRequestedEvent; -} +}; interface Plugin { readonly description: string; @@ -8831,7 +8831,7 @@ interface Plugin { declare var Plugin: { prototype: Plugin; new(): Plugin; -} +}; interface PluginArray { readonly length: number; @@ -8844,7 +8844,7 @@ interface PluginArray { declare var PluginArray: { prototype: PluginArray; new(): PluginArray; -} +}; interface PointerEvent extends MouseEvent { readonly currentPoint: any; @@ -8867,7 +8867,7 @@ interface PointerEvent extends MouseEvent { declare var PointerEvent: { prototype: PointerEvent; new(typeArg: string, eventInitDict?: PointerEventInit): PointerEvent; -} +}; interface PopStateEvent extends Event { readonly state: any; @@ -8877,7 +8877,7 @@ interface PopStateEvent extends Event { declare var PopStateEvent: { prototype: PopStateEvent; new(typeArg: string, eventInitDict?: PopStateEventInit): PopStateEvent; -} +}; interface Position { readonly coords: Coordinates; @@ -8887,7 +8887,7 @@ interface Position { declare var Position: { prototype: Position; new(): Position; -} +}; interface PositionError { readonly code: number; @@ -8904,7 +8904,7 @@ declare var PositionError: { readonly PERMISSION_DENIED: number; readonly POSITION_UNAVAILABLE: number; readonly TIMEOUT: number; -} +}; interface ProcessingInstruction extends CharacterData { readonly target: string; @@ -8913,7 +8913,7 @@ interface ProcessingInstruction extends CharacterData { declare var ProcessingInstruction: { prototype: ProcessingInstruction; new(): ProcessingInstruction; -} +}; interface ProgressEvent extends Event { readonly lengthComputable: boolean; @@ -8925,7 +8925,7 @@ interface ProgressEvent extends Event { declare var ProgressEvent: { prototype: ProgressEvent; new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent; -} +}; interface PushManager { getSubscription(): Promise; @@ -8936,7 +8936,7 @@ interface PushManager { declare var PushManager: { prototype: PushManager; new(): PushManager; -} +}; interface PushSubscription { readonly endpoint: USVString; @@ -8949,7 +8949,7 @@ interface PushSubscription { declare var PushSubscription: { prototype: PushSubscription; new(): PushSubscription; -} +}; interface PushSubscriptionOptions { readonly applicationServerKey: ArrayBuffer | null; @@ -8959,17 +8959,114 @@ interface PushSubscriptionOptions { declare var PushSubscriptionOptions: { prototype: PushSubscriptionOptions; new(): PushSubscriptionOptions; +}; + +interface Range { + 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; + compareBoundaryPoints(how: number, sourceRange: Range): number; + createContextualFragment(fragment: string): DocumentFragment; + deleteContents(): void; + detach(): void; + expand(Unit: ExpandGranularity): boolean; + extractContents(): DocumentFragment; + getBoundingClientRect(): ClientRect; + getClientRects(): ClientRectList; + insertNode(newNode: Node): void; + selectNode(refNode: Node): void; + selectNodeContents(refNode: Node): void; + setEnd(refNode: Node, offset: number): void; + setEndAfter(refNode: Node): void; + setEndBefore(refNode: Node): void; + setStart(refNode: Node, offset: number): void; + setStartAfter(refNode: Node): void; + setStartBefore(refNode: Node): void; + surroundContents(newParent: Node): void; + toString(): string; + readonly END_TO_END: number; + readonly END_TO_START: number; + readonly START_TO_END: number; + readonly START_TO_START: number; } -interface RTCDTMFToneChangeEvent extends Event { - readonly tone: string; +declare var Range: { + prototype: Range; + new(): Range; + readonly END_TO_END: number; + readonly END_TO_START: number; + readonly START_TO_END: number; + readonly START_TO_START: number; +}; + +interface ReadableStream { + readonly locked: boolean; + cancel(): Promise; + getReader(): ReadableStreamReader; } -declare var RTCDTMFToneChangeEvent: { - prototype: RTCDTMFToneChangeEvent; - new(typeArg: string, eventInitDict: RTCDTMFToneChangeEventInit): RTCDTMFToneChangeEvent; +declare var ReadableStream: { + prototype: ReadableStream; + new(): ReadableStream; +}; + +interface ReadableStreamReader { + cancel(): Promise; + read(): Promise; + releaseLock(): void; } +declare var ReadableStreamReader: { + prototype: ReadableStreamReader; + new(): ReadableStreamReader; +}; + +interface Request extends Object, Body { + readonly cache: RequestCache; + readonly credentials: RequestCredentials; + readonly destination: RequestDestination; + readonly headers: Headers; + readonly integrity: string; + readonly keepalive: boolean; + readonly method: string; + readonly mode: RequestMode; + readonly redirect: RequestRedirect; + readonly referrer: string; + readonly referrerPolicy: ReferrerPolicy; + readonly type: RequestType; + readonly url: string; + clone(): Request; +} + +declare var Request: { + prototype: Request; + new(input: Request | string, init?: RequestInit): Request; +}; + +interface Response extends Object, Body { + readonly body: ReadableStream | null; + readonly headers: Headers; + readonly ok: boolean; + readonly status: number; + readonly statusText: string; + readonly type: ResponseType; + readonly url: string; + clone(): Response; +} + +declare var Response: { + prototype: Response; + new(body?: any, init?: ResponseInit): Response; + error: () => Response; + redirect: (url: string, status?: number) => Response; +}; + interface RTCDtlsTransportEventMap { "dtlsstatechange": RTCDtlsTransportStateChangedEvent; "error": Event; @@ -8992,7 +9089,7 @@ interface RTCDtlsTransport extends RTCStatsProvider { declare var RTCDtlsTransport: { prototype: RTCDtlsTransport; new(transport: RTCIceTransport): RTCDtlsTransport; -} +}; interface RTCDtlsTransportStateChangedEvent extends Event { readonly state: RTCDtlsTransportState; @@ -9001,7 +9098,7 @@ interface RTCDtlsTransportStateChangedEvent extends Event { declare var RTCDtlsTransportStateChangedEvent: { prototype: RTCDtlsTransportStateChangedEvent; new(): RTCDtlsTransportStateChangedEvent; -} +}; interface RTCDtmfSenderEventMap { "tonechange": RTCDTMFToneChangeEvent; @@ -9022,19 +9119,28 @@ interface RTCDtmfSender extends EventTarget { declare var RTCDtmfSender: { prototype: RTCDtmfSender; new(sender: RTCRtpSender): RTCDtmfSender; +}; + +interface RTCDTMFToneChangeEvent extends Event { + readonly tone: string; } +declare var RTCDTMFToneChangeEvent: { + prototype: RTCDTMFToneChangeEvent; + new(typeArg: string, eventInitDict: RTCDTMFToneChangeEventInit): RTCDTMFToneChangeEvent; +}; + interface RTCIceCandidate { candidate: string | null; - sdpMLineIndex: number | null; sdpMid: string | null; + sdpMLineIndex: number | null; toJSON(): any; } declare var RTCIceCandidate: { prototype: RTCIceCandidate; new(candidateInitDict?: RTCIceCandidateInit): RTCIceCandidate; -} +}; interface RTCIceCandidatePairChangedEvent extends Event { readonly pair: RTCIceCandidatePair; @@ -9043,7 +9149,7 @@ interface RTCIceCandidatePairChangedEvent extends Event { declare var RTCIceCandidatePairChangedEvent: { prototype: RTCIceCandidatePairChangedEvent; new(): RTCIceCandidatePairChangedEvent; -} +}; interface RTCIceGathererEventMap { "error": Event; @@ -9064,7 +9170,7 @@ interface RTCIceGatherer extends RTCStatsProvider { declare var RTCIceGatherer: { prototype: RTCIceGatherer; new(options: RTCIceGatherOptions): RTCIceGatherer; -} +}; interface RTCIceGathererEvent extends Event { readonly candidate: RTCIceCandidateDictionary | RTCIceCandidateComplete; @@ -9073,7 +9179,7 @@ interface RTCIceGathererEvent extends Event { declare var RTCIceGathererEvent: { prototype: RTCIceGathererEvent; new(): RTCIceGathererEvent; -} +}; interface RTCIceTransportEventMap { "candidatepairchange": RTCIceCandidatePairChangedEvent; @@ -9102,7 +9208,7 @@ interface RTCIceTransport extends RTCStatsProvider { declare var RTCIceTransport: { prototype: RTCIceTransport; new(): RTCIceTransport; -} +}; interface RTCIceTransportStateChangedEvent extends Event { readonly state: RTCIceTransportState; @@ -9111,7 +9217,7 @@ interface RTCIceTransportStateChangedEvent extends Event { declare var RTCIceTransportStateChangedEvent: { prototype: RTCIceTransportStateChangedEvent; new(): RTCIceTransportStateChangedEvent; -} +}; interface RTCPeerConnectionEventMap { "addstream": MediaStreamEvent; @@ -9157,7 +9263,7 @@ interface RTCPeerConnection extends EventTarget { declare var RTCPeerConnection: { prototype: RTCPeerConnection; new(configuration: RTCConfiguration): RTCPeerConnection; -} +}; interface RTCPeerConnectionIceEvent extends Event { readonly candidate: RTCIceCandidate; @@ -9166,7 +9272,7 @@ interface RTCPeerConnectionIceEvent extends Event { declare var RTCPeerConnectionIceEvent: { prototype: RTCPeerConnectionIceEvent; new(type: string, eventInitDict: RTCPeerConnectionIceEventInit): RTCPeerConnectionIceEvent; -} +}; interface RTCRtpReceiverEventMap { "error": Event; @@ -9190,7 +9296,7 @@ declare var RTCRtpReceiver: { prototype: RTCRtpReceiver; new(transport: RTCDtlsTransport | RTCSrtpSdesTransport, kind: string, rtcpTransport?: RTCDtlsTransport): RTCRtpReceiver; getCapabilities(kind?: string): RTCRtpCapabilities; -} +}; interface RTCRtpSenderEventMap { "error": Event; @@ -9215,7 +9321,7 @@ declare var RTCRtpSender: { prototype: RTCRtpSender; new(track: MediaStreamTrack, transport: RTCDtlsTransport | RTCSrtpSdesTransport, rtcpTransport?: RTCDtlsTransport): RTCRtpSender; getCapabilities(kind?: string): RTCRtpCapabilities; -} +}; interface RTCSessionDescription { sdp: string | null; @@ -9226,7 +9332,7 @@ interface RTCSessionDescription { declare var RTCSessionDescription: { prototype: RTCSessionDescription; new(descriptionInitDict?: RTCSessionDescriptionInit): RTCSessionDescription; -} +}; interface RTCSrtpSdesTransportEventMap { "error": Event; @@ -9243,7 +9349,7 @@ declare var RTCSrtpSdesTransport: { prototype: RTCSrtpSdesTransport; new(transport: RTCIceTransport, encryptParameters: RTCSrtpSdesParameters, decryptParameters: RTCSrtpSdesParameters): RTCSrtpSdesTransport; getLocalParameters(): RTCSrtpSdesParameters[]; -} +}; interface RTCSsrcConflictEvent extends Event { readonly ssrc: number; @@ -9252,7 +9358,7 @@ interface RTCSsrcConflictEvent extends Event { declare var RTCSsrcConflictEvent: { prototype: RTCSsrcConflictEvent; new(): RTCSsrcConflictEvent; -} +}; interface RTCStatsProvider extends EventTarget { getStats(): Promise; @@ -9262,112 +9368,421 @@ interface RTCStatsProvider extends EventTarget { declare var RTCStatsProvider: { prototype: RTCStatsProvider; new(): RTCStatsProvider; +}; + +interface ScopedCredential { + readonly id: ArrayBuffer; + readonly type: ScopedCredentialType; } -interface Range { - 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; - compareBoundaryPoints(how: number, sourceRange: Range): number; - createContextualFragment(fragment: string): DocumentFragment; - deleteContents(): void; - detach(): void; - expand(Unit: ExpandGranularity): boolean; - extractContents(): DocumentFragment; - getBoundingClientRect(): ClientRect; - getClientRects(): ClientRectList; - insertNode(newNode: Node): void; - selectNode(refNode: Node): void; - selectNodeContents(refNode: Node): void; - setEnd(refNode: Node, offset: number): void; - setEndAfter(refNode: Node): void; - setEndBefore(refNode: Node): void; - setStart(refNode: Node, offset: number): void; - setStartAfter(refNode: Node): void; - setStartBefore(refNode: Node): void; - surroundContents(newParent: Node): void; +declare var ScopedCredential: { + prototype: ScopedCredential; + new(): ScopedCredential; +}; + +interface ScopedCredentialInfo { + readonly credential: ScopedCredential; + readonly publicKey: CryptoKey; +} + +declare var ScopedCredentialInfo: { + prototype: ScopedCredentialInfo; + new(): ScopedCredentialInfo; +}; + +interface ScreenEventMap { + "MSOrientationChange": Event; +} + +interface Screen extends EventTarget { + readonly availHeight: number; + readonly availWidth: number; + bufferDepth: 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: Screen, ev: Event) => any; + readonly pixelDepth: number; + readonly systemXDPI: number; + readonly systemYDPI: number; + readonly width: number; + msLockOrientation(orientations: string | string[]): boolean; + msUnlockOrientation(): void; + addEventListener(type: K, listener: (this: Screen, ev: ScreenEventMap[K]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; +} + +declare var Screen: { + prototype: Screen; + new(): Screen; +}; + +interface ScriptNotifyEvent extends Event { + readonly callingUri: string; + readonly value: string; +} + +declare var ScriptNotifyEvent: { + prototype: ScriptNotifyEvent; + new(): ScriptNotifyEvent; +}; + +interface ScriptProcessorNodeEventMap { + "audioprocess": AudioProcessingEvent; +} + +interface ScriptProcessorNode extends AudioNode { + readonly bufferSize: number; + onaudioprocess: (this: ScriptProcessorNode, ev: AudioProcessingEvent) => any; + addEventListener(type: K, listener: (this: ScriptProcessorNode, ev: ScriptProcessorNodeEventMap[K]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; +} + +declare var ScriptProcessorNode: { + prototype: ScriptProcessorNode; + new(): ScriptProcessorNode; +}; + +interface Selection { + readonly anchorNode: Node; + readonly anchorOffset: number; + readonly baseNode: Node; + readonly baseOffset: number; + readonly extentNode: Node; + readonly extentOffset: 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; + collapseToStart(): void; + containsNode(node: Node, partlyContained: boolean): boolean; + deleteFromDocument(): void; + empty(): void; + extend(newNode: Node, offset: number): void; + getRangeAt(index: number): Range; + removeAllRanges(): void; + removeRange(range: Range): void; + selectAllChildren(parentNode: Node): void; + setBaseAndExtent(baseNode: Node, baseOffset: number, extentNode: Node, extentOffset: number): void; + setPosition(parentNode: Node, offset: number): void; toString(): string; - 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; - readonly END_TO_END: number; - readonly END_TO_START: number; - readonly START_TO_END: number; - readonly START_TO_START: number; +declare var Selection: { + prototype: Selection; + new(): Selection; +}; + +interface ServiceWorkerEventMap extends AbstractWorkerEventMap { + "statechange": Event; } -interface ReadableStream { - readonly locked: boolean; - cancel(): Promise; - getReader(): ReadableStreamReader; +interface ServiceWorker extends EventTarget, AbstractWorker { + onstatechange: (this: ServiceWorker, ev: Event) => any; + readonly scriptURL: USVString; + readonly state: ServiceWorkerState; + postMessage(message: any, transfer?: any[]): void; + addEventListener(type: K, listener: (this: ServiceWorker, ev: ServiceWorkerEventMap[K]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; } -declare var ReadableStream: { - prototype: ReadableStream; - new(): ReadableStream; +declare var ServiceWorker: { + prototype: ServiceWorker; + new(): ServiceWorker; +}; + +interface ServiceWorkerContainerEventMap { + "controllerchange": Event; + "message": ServiceWorkerMessageEvent; } -interface ReadableStreamReader { - cancel(): Promise; - read(): Promise; - releaseLock(): void; +interface ServiceWorkerContainer extends EventTarget { + readonly controller: ServiceWorker | null; + oncontrollerchange: (this: ServiceWorkerContainer, ev: Event) => any; + onmessage: (this: ServiceWorkerContainer, ev: ServiceWorkerMessageEvent) => any; + readonly ready: Promise; + getRegistration(clientURL?: USVString): Promise; + getRegistrations(): any; + register(scriptURL: USVString, options?: RegistrationOptions): Promise; + addEventListener(type: K, listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; } -declare var ReadableStreamReader: { - prototype: ReadableStreamReader; - new(): ReadableStreamReader; +declare var ServiceWorkerContainer: { + prototype: ServiceWorkerContainer; + new(): ServiceWorkerContainer; +}; + +interface ServiceWorkerMessageEvent extends Event { + readonly data: any; + readonly lastEventId: string; + readonly origin: string; + readonly ports: MessagePort[] | null; + readonly source: ServiceWorker | MessagePort | null; } -interface Request extends Object, Body { - readonly cache: RequestCache; - readonly credentials: RequestCredentials; - readonly destination: RequestDestination; - readonly headers: Headers; - readonly integrity: string; - readonly keepalive: boolean; - readonly method: string; - readonly mode: RequestMode; - readonly redirect: RequestRedirect; - readonly referrer: string; - readonly referrerPolicy: ReferrerPolicy; - readonly type: RequestType; +declare var ServiceWorkerMessageEvent: { + prototype: ServiceWorkerMessageEvent; + new(type: string, eventInitDict?: ServiceWorkerMessageEventInit): ServiceWorkerMessageEvent; +}; + +interface ServiceWorkerRegistrationEventMap { + "updatefound": Event; +} + +interface ServiceWorkerRegistration extends EventTarget { + readonly active: ServiceWorker | null; + readonly installing: ServiceWorker | null; + onupdatefound: (this: ServiceWorkerRegistration, ev: Event) => any; + readonly pushManager: PushManager; + readonly scope: USVString; + readonly sync: SyncManager; + readonly waiting: ServiceWorker | null; + getNotifications(filter?: GetNotificationOptions): any; + showNotification(title: string, options?: NotificationOptions): Promise; + unregister(): Promise; + update(): Promise; + addEventListener(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; +} + +declare var ServiceWorkerRegistration: { + prototype: ServiceWorkerRegistration; + new(): ServiceWorkerRegistration; +}; + +interface SourceBuffer extends EventTarget { + appendWindowEnd: number; + appendWindowStart: number; + readonly audioTracks: AudioTrackList; + readonly buffered: TimeRanges; + mode: AppendMode; + timestampOffset: number; + readonly updating: boolean; + readonly videoTracks: VideoTrackList; + abort(): void; + appendBuffer(data: ArrayBuffer | ArrayBufferView): void; + appendStream(stream: MSStream, maxSize?: number): void; + remove(start: number, end: number): void; +} + +declare var SourceBuffer: { + prototype: SourceBuffer; + new(): SourceBuffer; +}; + +interface SourceBufferList extends EventTarget { + readonly length: number; + item(index: number): SourceBuffer; + [index: number]: SourceBuffer; +} + +declare var SourceBufferList: { + prototype: SourceBufferList; + new(): SourceBufferList; +}; + +interface SpeechSynthesisEventMap { + "voiceschanged": Event; +} + +interface SpeechSynthesis extends EventTarget { + onvoiceschanged: (this: SpeechSynthesis, ev: Event) => any; + readonly paused: boolean; + readonly pending: boolean; + readonly speaking: boolean; + cancel(): void; + getVoices(): SpeechSynthesisVoice[]; + pause(): void; + resume(): void; + speak(utterance: SpeechSynthesisUtterance): void; + addEventListener(type: K, listener: (this: SpeechSynthesis, ev: SpeechSynthesisEventMap[K]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; +} + +declare var SpeechSynthesis: { + prototype: SpeechSynthesis; + new(): SpeechSynthesis; +}; + +interface SpeechSynthesisEvent extends Event { + readonly charIndex: number; + readonly elapsedTime: number; + readonly name: string; + readonly utterance: SpeechSynthesisUtterance | null; +} + +declare var SpeechSynthesisEvent: { + prototype: SpeechSynthesisEvent; + new(type: string, eventInitDict?: SpeechSynthesisEventInit): SpeechSynthesisEvent; +}; + +interface SpeechSynthesisUtteranceEventMap { + "boundary": Event; + "end": Event; + "error": Event; + "mark": Event; + "pause": Event; + "resume": Event; + "start": Event; +} + +interface SpeechSynthesisUtterance extends EventTarget { + lang: string; + onboundary: (this: SpeechSynthesisUtterance, ev: Event) => any; + onend: (this: SpeechSynthesisUtterance, ev: Event) => any; + onerror: (this: SpeechSynthesisUtterance, ev: Event) => any; + onmark: (this: SpeechSynthesisUtterance, ev: Event) => any; + onpause: (this: SpeechSynthesisUtterance, ev: Event) => any; + onresume: (this: SpeechSynthesisUtterance, ev: Event) => any; + onstart: (this: SpeechSynthesisUtterance, ev: Event) => any; + pitch: number; + rate: number; + text: string; + voice: SpeechSynthesisVoice; + volume: number; + addEventListener(type: K, listener: (this: SpeechSynthesisUtterance, ev: SpeechSynthesisUtteranceEventMap[K]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; +} + +declare var SpeechSynthesisUtterance: { + prototype: SpeechSynthesisUtterance; + new(text?: string): SpeechSynthesisUtterance; +}; + +interface SpeechSynthesisVoice { + readonly default: boolean; + readonly lang: string; + readonly localService: boolean; + readonly name: string; + readonly voiceURI: string; +} + +declare var SpeechSynthesisVoice: { + prototype: SpeechSynthesisVoice; + new(): SpeechSynthesisVoice; +}; + +interface StereoPannerNode extends AudioNode { + readonly pan: AudioParam; +} + +declare var StereoPannerNode: { + prototype: StereoPannerNode; + new(): StereoPannerNode; +}; + +interface Storage { + readonly length: number; + clear(): void; + getItem(key: string): string | null; + key(index: number): string | null; + removeItem(key: string): void; + setItem(key: string, data: string): void; + [key: string]: any; + [index: number]: string; +} + +declare var Storage: { + prototype: Storage; + new(): Storage; +}; + +interface StorageEvent extends Event { readonly url: string; - clone(): Request; + key?: string; + oldValue?: string; + newValue?: string; + storageArea?: Storage; } -declare var Request: { - prototype: Request; - new(input: Request | string, init?: RequestInit): Request; +declare var StorageEvent: { + prototype: StorageEvent; + new (type: string, eventInitDict?: StorageEventInit): StorageEvent; +}; + +interface StyleMedia { + readonly type: string; + matchMedium(mediaquery: string): boolean; } -interface Response extends Object, Body { - readonly body: ReadableStream | null; - readonly headers: Headers; - readonly ok: boolean; - readonly status: number; - readonly statusText: string; - readonly type: ResponseType; - readonly url: string; - clone(): Response; +declare var StyleMedia: { + prototype: StyleMedia; + new(): StyleMedia; +}; + +interface StyleSheet { + disabled: boolean; + readonly href: string; + readonly media: MediaList; + readonly ownerNode: Node; + readonly parentStyleSheet: StyleSheet; + readonly title: string; + readonly type: string; } -declare var Response: { - prototype: Response; - new(body?: any, init?: ResponseInit): Response; +declare var StyleSheet: { + prototype: StyleSheet; + new(): StyleSheet; +}; + +interface StyleSheetList { + readonly length: number; + item(index?: number): StyleSheet; + [index: number]: StyleSheet; } +declare var StyleSheetList: { + prototype: StyleSheetList; + new(): StyleSheetList; +}; + +interface StyleSheetPageList { + readonly length: number; + item(index: number): CSSPageRule; + [index: number]: CSSPageRule; +} + +declare var StyleSheetPageList: { + prototype: StyleSheetPageList; + new(): StyleSheetPageList; +}; + +interface SubtleCrypto { + decrypt(algorithm: string | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: BufferSource): PromiseLike; + deriveBits(algorithm: string | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, length: number): PromiseLike; + deriveKey(algorithm: string | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: string | AesDerivedKeyParams | HmacImportParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, extractable: boolean, keyUsages: string[]): PromiseLike; + digest(algorithm: AlgorithmIdentifier, data: BufferSource): PromiseLike; + encrypt(algorithm: string | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: BufferSource): PromiseLike; + exportKey(format: "jwk", key: CryptoKey): PromiseLike; + exportKey(format: "raw" | "pkcs8" | "spki", key: CryptoKey): PromiseLike; + exportKey(format: string, key: CryptoKey): PromiseLike; + generateKey(algorithm: string, extractable: boolean, keyUsages: string[]): PromiseLike; + generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams | DhKeyGenParams, extractable: boolean, keyUsages: string[]): PromiseLike; + generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: string[]): PromiseLike; + importKey(format: "jwk", keyData: JsonWebKey, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable: boolean, keyUsages: string[]): PromiseLike; + importKey(format: "raw" | "pkcs8" | "spki", keyData: BufferSource, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable: boolean, keyUsages: string[]): PromiseLike; + importKey(format: string, keyData: JsonWebKey | BufferSource, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable: boolean, keyUsages: string[]): PromiseLike; + sign(algorithm: string | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, data: BufferSource): PromiseLike; + unwrapKey(format: string, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier, unwrappedKeyAlgorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: string[]): PromiseLike; + verify(algorithm: string | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, signature: BufferSource, data: BufferSource): PromiseLike; + wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier): PromiseLike; +} + +declare var SubtleCrypto: { + prototype: SubtleCrypto; + new(): SubtleCrypto; +}; + interface SVGAElement extends SVGGraphicsElement, SVGURIReference { readonly target: SVGAnimatedString; addEventListener(type: K, listener: (this: SVGAElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void; @@ -9377,7 +9792,7 @@ interface SVGAElement extends SVGGraphicsElement, SVGURIReference { declare var SVGAElement: { prototype: SVGAElement; new(): SVGAElement; -} +}; interface SVGAngle { readonly unitType: number; @@ -9401,7 +9816,7 @@ declare var SVGAngle: { readonly SVG_ANGLETYPE_RAD: number; readonly SVG_ANGLETYPE_UNKNOWN: number; readonly SVG_ANGLETYPE_UNSPECIFIED: number; -} +}; interface SVGAnimatedAngle { readonly animVal: SVGAngle; @@ -9411,7 +9826,7 @@ interface SVGAnimatedAngle { declare var SVGAnimatedAngle: { prototype: SVGAnimatedAngle; new(): SVGAnimatedAngle; -} +}; interface SVGAnimatedBoolean { readonly animVal: boolean; @@ -9421,7 +9836,7 @@ interface SVGAnimatedBoolean { declare var SVGAnimatedBoolean: { prototype: SVGAnimatedBoolean; new(): SVGAnimatedBoolean; -} +}; interface SVGAnimatedEnumeration { readonly animVal: number; @@ -9431,7 +9846,7 @@ interface SVGAnimatedEnumeration { declare var SVGAnimatedEnumeration: { prototype: SVGAnimatedEnumeration; new(): SVGAnimatedEnumeration; -} +}; interface SVGAnimatedInteger { readonly animVal: number; @@ -9441,7 +9856,7 @@ interface SVGAnimatedInteger { declare var SVGAnimatedInteger: { prototype: SVGAnimatedInteger; new(): SVGAnimatedInteger; -} +}; interface SVGAnimatedLength { readonly animVal: SVGLength; @@ -9451,7 +9866,7 @@ interface SVGAnimatedLength { declare var SVGAnimatedLength: { prototype: SVGAnimatedLength; new(): SVGAnimatedLength; -} +}; interface SVGAnimatedLengthList { readonly animVal: SVGLengthList; @@ -9461,7 +9876,7 @@ interface SVGAnimatedLengthList { declare var SVGAnimatedLengthList: { prototype: SVGAnimatedLengthList; new(): SVGAnimatedLengthList; -} +}; interface SVGAnimatedNumber { readonly animVal: number; @@ -9471,7 +9886,7 @@ interface SVGAnimatedNumber { declare var SVGAnimatedNumber: { prototype: SVGAnimatedNumber; new(): SVGAnimatedNumber; -} +}; interface SVGAnimatedNumberList { readonly animVal: SVGNumberList; @@ -9481,7 +9896,7 @@ interface SVGAnimatedNumberList { declare var SVGAnimatedNumberList: { prototype: SVGAnimatedNumberList; new(): SVGAnimatedNumberList; -} +}; interface SVGAnimatedPreserveAspectRatio { readonly animVal: SVGPreserveAspectRatio; @@ -9491,7 +9906,7 @@ interface SVGAnimatedPreserveAspectRatio { declare var SVGAnimatedPreserveAspectRatio: { prototype: SVGAnimatedPreserveAspectRatio; new(): SVGAnimatedPreserveAspectRatio; -} +}; interface SVGAnimatedRect { readonly animVal: SVGRect; @@ -9501,7 +9916,7 @@ interface SVGAnimatedRect { declare var SVGAnimatedRect: { prototype: SVGAnimatedRect; new(): SVGAnimatedRect; -} +}; interface SVGAnimatedString { readonly animVal: string; @@ -9511,7 +9926,7 @@ interface SVGAnimatedString { declare var SVGAnimatedString: { prototype: SVGAnimatedString; new(): SVGAnimatedString; -} +}; interface SVGAnimatedTransformList { readonly animVal: SVGTransformList; @@ -9521,7 +9936,7 @@ interface SVGAnimatedTransformList { declare var SVGAnimatedTransformList: { prototype: SVGAnimatedTransformList; new(): SVGAnimatedTransformList; -} +}; interface SVGCircleElement extends SVGGraphicsElement { readonly cx: SVGAnimatedLength; @@ -9534,7 +9949,7 @@ interface SVGCircleElement extends SVGGraphicsElement { declare var SVGCircleElement: { prototype: SVGCircleElement; new(): SVGCircleElement; -} +}; interface SVGClipPathElement extends SVGGraphicsElement, SVGUnitTypes { readonly clipPathUnits: SVGAnimatedEnumeration; @@ -9545,7 +9960,7 @@ interface SVGClipPathElement extends SVGGraphicsElement, SVGUnitTypes { declare var SVGClipPathElement: { prototype: SVGClipPathElement; new(): SVGClipPathElement; -} +}; interface SVGComponentTransferFunctionElement extends SVGElement { readonly amplitude: SVGAnimatedNumber; @@ -9574,7 +9989,7 @@ declare var SVGComponentTransferFunctionElement: { readonly SVG_FECOMPONENTTRANSFER_TYPE_LINEAR: number; readonly SVG_FECOMPONENTTRANSFER_TYPE_TABLE: number; readonly SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN: number; -} +}; interface SVGDefsElement extends SVGGraphicsElement { addEventListener(type: K, listener: (this: SVGDefsElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void; @@ -9584,7 +9999,7 @@ interface SVGDefsElement extends SVGGraphicsElement { declare var SVGDefsElement: { prototype: SVGDefsElement; new(): SVGDefsElement; -} +}; interface SVGDescElement extends SVGElement { addEventListener(type: K, listener: (this: SVGDescElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void; @@ -9594,7 +10009,7 @@ interface SVGDescElement extends SVGElement { declare var SVGDescElement: { prototype: SVGDescElement; new(): SVGDescElement; -} +}; interface SVGElementEventMap extends ElementEventMap { "click": MouseEvent; @@ -9632,7 +10047,7 @@ interface SVGElement extends Element { declare var SVGElement: { prototype: SVGElement; new(): SVGElement; -} +}; interface SVGElementInstance extends EventTarget { readonly childNodes: SVGElementInstanceList; @@ -9648,7 +10063,7 @@ interface SVGElementInstance extends EventTarget { declare var SVGElementInstance: { prototype: SVGElementInstance; new(): SVGElementInstance; -} +}; interface SVGElementInstanceList { readonly length: number; @@ -9658,7 +10073,7 @@ interface SVGElementInstanceList { declare var SVGElementInstanceList: { prototype: SVGElementInstanceList; new(): SVGElementInstanceList; -} +}; interface SVGEllipseElement extends SVGGraphicsElement { readonly cx: SVGAnimatedLength; @@ -9672,7 +10087,7 @@ interface SVGEllipseElement extends SVGGraphicsElement { declare var SVGEllipseElement: { prototype: SVGEllipseElement; new(): SVGEllipseElement; -} +}; interface SVGFEBlendElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { readonly in1: SVGAnimatedString; @@ -9719,7 +10134,7 @@ declare var SVGFEBlendElement: { readonly SVG_FEBLEND_MODE_SCREEN: number; readonly SVG_FEBLEND_MODE_SOFT_LIGHT: number; readonly SVG_FEBLEND_MODE_UNKNOWN: number; -} +}; interface SVGFEColorMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { readonly in1: SVGAnimatedString; @@ -9742,7 +10157,7 @@ declare var SVGFEColorMatrixElement: { readonly SVG_FECOLORMATRIX_TYPE_MATRIX: number; readonly SVG_FECOLORMATRIX_TYPE_SATURATE: number; readonly SVG_FECOLORMATRIX_TYPE_UNKNOWN: number; -} +}; interface SVGFEComponentTransferElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { readonly in1: SVGAnimatedString; @@ -9753,7 +10168,7 @@ interface SVGFEComponentTransferElement extends SVGElement, SVGFilterPrimitiveSt declare var SVGFEComponentTransferElement: { prototype: SVGFEComponentTransferElement; new(): SVGFEComponentTransferElement; -} +}; interface SVGFECompositeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { readonly in1: SVGAnimatedString; @@ -9784,7 +10199,7 @@ declare var SVGFECompositeElement: { readonly SVG_FECOMPOSITE_OPERATOR_OVER: number; readonly SVG_FECOMPOSITE_OPERATOR_UNKNOWN: number; readonly SVG_FECOMPOSITE_OPERATOR_XOR: number; -} +}; interface SVGFEConvolveMatrixElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { readonly bias: SVGAnimatedNumber; @@ -9814,7 +10229,7 @@ declare var SVGFEConvolveMatrixElement: { readonly SVG_EDGEMODE_NONE: number; readonly SVG_EDGEMODE_UNKNOWN: number; readonly SVG_EDGEMODE_WRAP: number; -} +}; interface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { readonly diffuseConstant: SVGAnimatedNumber; @@ -9829,7 +10244,7 @@ interface SVGFEDiffuseLightingElement extends SVGElement, SVGFilterPrimitiveStan declare var SVGFEDiffuseLightingElement: { prototype: SVGFEDiffuseLightingElement; new(): SVGFEDiffuseLightingElement; -} +}; interface SVGFEDisplacementMapElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { readonly in1: SVGAnimatedString; @@ -9854,7 +10269,7 @@ declare var SVGFEDisplacementMapElement: { readonly SVG_CHANNEL_G: number; readonly SVG_CHANNEL_R: number; readonly SVG_CHANNEL_UNKNOWN: number; -} +}; interface SVGFEDistantLightElement extends SVGElement { readonly azimuth: SVGAnimatedNumber; @@ -9866,7 +10281,7 @@ interface SVGFEDistantLightElement extends SVGElement { declare var SVGFEDistantLightElement: { prototype: SVGFEDistantLightElement; new(): SVGFEDistantLightElement; -} +}; interface SVGFEFloodElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { addEventListener(type: K, listener: (this: SVGFEFloodElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void; @@ -9876,7 +10291,7 @@ interface SVGFEFloodElement extends SVGElement, SVGFilterPrimitiveStandardAttrib declare var SVGFEFloodElement: { prototype: SVGFEFloodElement; new(): SVGFEFloodElement; -} +}; interface SVGFEFuncAElement extends SVGComponentTransferFunctionElement { addEventListener(type: K, listener: (this: SVGFEFuncAElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void; @@ -9886,7 +10301,7 @@ interface SVGFEFuncAElement extends SVGComponentTransferFunctionElement { declare var SVGFEFuncAElement: { prototype: SVGFEFuncAElement; new(): SVGFEFuncAElement; -} +}; interface SVGFEFuncBElement extends SVGComponentTransferFunctionElement { addEventListener(type: K, listener: (this: SVGFEFuncBElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void; @@ -9896,7 +10311,7 @@ interface SVGFEFuncBElement extends SVGComponentTransferFunctionElement { declare var SVGFEFuncBElement: { prototype: SVGFEFuncBElement; new(): SVGFEFuncBElement; -} +}; interface SVGFEFuncGElement extends SVGComponentTransferFunctionElement { addEventListener(type: K, listener: (this: SVGFEFuncGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void; @@ -9906,7 +10321,7 @@ interface SVGFEFuncGElement extends SVGComponentTransferFunctionElement { declare var SVGFEFuncGElement: { prototype: SVGFEFuncGElement; new(): SVGFEFuncGElement; -} +}; interface SVGFEFuncRElement extends SVGComponentTransferFunctionElement { addEventListener(type: K, listener: (this: SVGFEFuncRElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void; @@ -9916,7 +10331,7 @@ interface SVGFEFuncRElement extends SVGComponentTransferFunctionElement { declare var SVGFEFuncRElement: { prototype: SVGFEFuncRElement; new(): SVGFEFuncRElement; -} +}; interface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { readonly in1: SVGAnimatedString; @@ -9930,7 +10345,7 @@ interface SVGFEGaussianBlurElement extends SVGElement, SVGFilterPrimitiveStandar declare var SVGFEGaussianBlurElement: { prototype: SVGFEGaussianBlurElement; new(): SVGFEGaussianBlurElement; -} +}; interface SVGFEImageElement extends SVGElement, SVGFilterPrimitiveStandardAttributes, SVGURIReference { readonly preserveAspectRatio: SVGAnimatedPreserveAspectRatio; @@ -9941,7 +10356,7 @@ interface SVGFEImageElement extends SVGElement, SVGFilterPrimitiveStandardAttrib declare var SVGFEImageElement: { prototype: SVGFEImageElement; new(): SVGFEImageElement; -} +}; interface SVGFEMergeElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { addEventListener(type: K, listener: (this: SVGFEMergeElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void; @@ -9951,7 +10366,7 @@ interface SVGFEMergeElement extends SVGElement, SVGFilterPrimitiveStandardAttrib declare var SVGFEMergeElement: { prototype: SVGFEMergeElement; new(): SVGFEMergeElement; -} +}; interface SVGFEMergeNodeElement extends SVGElement { readonly in1: SVGAnimatedString; @@ -9962,7 +10377,7 @@ interface SVGFEMergeNodeElement extends SVGElement { declare var SVGFEMergeNodeElement: { prototype: SVGFEMergeNodeElement; new(): SVGFEMergeNodeElement; -} +}; interface SVGFEMorphologyElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { readonly in1: SVGAnimatedString; @@ -9982,7 +10397,7 @@ declare var SVGFEMorphologyElement: { readonly SVG_MORPHOLOGY_OPERATOR_DILATE: number; readonly SVG_MORPHOLOGY_OPERATOR_ERODE: number; readonly SVG_MORPHOLOGY_OPERATOR_UNKNOWN: number; -} +}; interface SVGFEOffsetElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { readonly dx: SVGAnimatedNumber; @@ -9995,7 +10410,7 @@ interface SVGFEOffsetElement extends SVGElement, SVGFilterPrimitiveStandardAttri declare var SVGFEOffsetElement: { prototype: SVGFEOffsetElement; new(): SVGFEOffsetElement; -} +}; interface SVGFEPointLightElement extends SVGElement { readonly x: SVGAnimatedNumber; @@ -10008,7 +10423,7 @@ interface SVGFEPointLightElement extends SVGElement { declare var SVGFEPointLightElement: { prototype: SVGFEPointLightElement; new(): SVGFEPointLightElement; -} +}; interface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { readonly in1: SVGAnimatedString; @@ -10024,7 +10439,7 @@ interface SVGFESpecularLightingElement extends SVGElement, SVGFilterPrimitiveSta declare var SVGFESpecularLightingElement: { prototype: SVGFESpecularLightingElement; new(): SVGFESpecularLightingElement; -} +}; interface SVGFESpotLightElement extends SVGElement { readonly limitingConeAngle: SVGAnimatedNumber; @@ -10042,7 +10457,7 @@ interface SVGFESpotLightElement extends SVGElement { declare var SVGFESpotLightElement: { prototype: SVGFESpotLightElement; new(): SVGFESpotLightElement; -} +}; interface SVGFETileElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { readonly in1: SVGAnimatedString; @@ -10053,7 +10468,7 @@ interface SVGFETileElement extends SVGElement, SVGFilterPrimitiveStandardAttribu declare var SVGFETileElement: { prototype: SVGFETileElement; new(): SVGFETileElement; -} +}; interface SVGFETurbulenceElement extends SVGElement, SVGFilterPrimitiveStandardAttributes { readonly baseFrequencyX: SVGAnimatedNumber; @@ -10081,7 +10496,7 @@ declare var SVGFETurbulenceElement: { readonly SVG_TURBULENCE_TYPE_FRACTALNOISE: number; readonly SVG_TURBULENCE_TYPE_TURBULENCE: number; readonly SVG_TURBULENCE_TYPE_UNKNOWN: number; -} +}; interface SVGFilterElement extends SVGElement, SVGUnitTypes, SVGURIReference { readonly filterResX: SVGAnimatedInteger; @@ -10100,7 +10515,7 @@ interface SVGFilterElement extends SVGElement, SVGUnitTypes, SVGURIReference { declare var SVGFilterElement: { prototype: SVGFilterElement; new(): SVGFilterElement; -} +}; interface SVGForeignObjectElement extends SVGGraphicsElement { readonly height: SVGAnimatedLength; @@ -10114,7 +10529,7 @@ interface SVGForeignObjectElement extends SVGGraphicsElement { declare var SVGForeignObjectElement: { prototype: SVGForeignObjectElement; new(): SVGForeignObjectElement; -} +}; interface SVGGElement extends SVGGraphicsElement { addEventListener(type: K, listener: (this: SVGGElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void; @@ -10124,7 +10539,7 @@ interface SVGGElement extends SVGGraphicsElement { declare var SVGGElement: { prototype: SVGGElement; new(): SVGGElement; -} +}; interface SVGGradientElement extends SVGElement, SVGUnitTypes, SVGURIReference { readonly gradientTransform: SVGAnimatedTransformList; @@ -10145,7 +10560,7 @@ declare var SVGGradientElement: { readonly SVG_SPREADMETHOD_REFLECT: number; readonly SVG_SPREADMETHOD_REPEAT: number; readonly SVG_SPREADMETHOD_UNKNOWN: number; -} +}; interface SVGGraphicsElement extends SVGElement, SVGTests { readonly farthestViewportElement: SVGElement; @@ -10162,7 +10577,7 @@ interface SVGGraphicsElement extends SVGElement, SVGTests { declare var SVGGraphicsElement: { prototype: SVGGraphicsElement; new(): SVGGraphicsElement; -} +}; interface SVGImageElement extends SVGGraphicsElement, SVGURIReference { readonly height: SVGAnimatedLength; @@ -10177,7 +10592,7 @@ interface SVGImageElement extends SVGGraphicsElement, SVGURIReference { declare var SVGImageElement: { prototype: SVGImageElement; new(): SVGImageElement; -} +}; interface SVGLength { readonly unitType: number; @@ -10213,7 +10628,7 @@ declare var SVGLength: { readonly SVG_LENGTHTYPE_PT: number; readonly SVG_LENGTHTYPE_PX: number; readonly SVG_LENGTHTYPE_UNKNOWN: number; -} +}; interface SVGLengthList { readonly numberOfItems: number; @@ -10229,21 +10644,7 @@ interface SVGLengthList { declare var SVGLengthList: { prototype: SVGLengthList; new(): SVGLengthList; -} - -interface SVGLineElement extends SVGGraphicsElement { - readonly x1: SVGAnimatedLength; - readonly x2: SVGAnimatedLength; - readonly y1: SVGAnimatedLength; - readonly y2: SVGAnimatedLength; - addEventListener(type: K, listener: (this: SVGLineElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGLineElement: { - prototype: SVGLineElement; - new(): SVGLineElement; -} +}; interface SVGLinearGradientElement extends SVGGradientElement { readonly x1: SVGAnimatedLength; @@ -10257,8 +10658,22 @@ interface SVGLinearGradientElement extends SVGGradientElement { declare var SVGLinearGradientElement: { prototype: SVGLinearGradientElement; new(): SVGLinearGradientElement; +}; + +interface SVGLineElement extends SVGGraphicsElement { + readonly x1: SVGAnimatedLength; + readonly x2: SVGAnimatedLength; + readonly y1: SVGAnimatedLength; + readonly y2: SVGAnimatedLength; + addEventListener(type: K, listener: (this: SVGLineElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; } +declare var SVGLineElement: { + prototype: SVGLineElement; + new(): SVGLineElement; +}; + interface SVGMarkerElement extends SVGElement, SVGFitToViewBox { readonly markerHeight: SVGAnimatedLength; readonly markerUnits: SVGAnimatedEnumeration; @@ -10269,12 +10684,12 @@ interface SVGMarkerElement extends SVGElement, SVGFitToViewBox { readonly refY: SVGAnimatedLength; setOrientToAngle(angle: SVGAngle): void; setOrientToAuto(): void; - 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; + readonly SVG_MARKERUNITS_STROKEWIDTH: number; + readonly SVG_MARKERUNITS_UNKNOWN: number; + readonly SVG_MARKERUNITS_USERSPACEONUSE: number; addEventListener(type: K, listener: (this: SVGMarkerElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; } @@ -10282,13 +10697,13 @@ interface SVGMarkerElement extends SVGElement, SVGFitToViewBox { declare var SVGMarkerElement: { prototype: SVGMarkerElement; new(): SVGMarkerElement; - 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; -} + readonly SVG_MARKERUNITS_STROKEWIDTH: number; + readonly SVG_MARKERUNITS_UNKNOWN: number; + readonly SVG_MARKERUNITS_USERSPACEONUSE: number; +}; interface SVGMaskElement extends SVGElement, SVGTests, SVGUnitTypes { readonly height: SVGAnimatedLength; @@ -10304,7 +10719,7 @@ interface SVGMaskElement extends SVGElement, SVGTests, SVGUnitTypes { declare var SVGMaskElement: { prototype: SVGMaskElement; new(): SVGMaskElement; -} +}; interface SVGMatrix { a: number; @@ -10329,7 +10744,7 @@ interface SVGMatrix { declare var SVGMatrix: { prototype: SVGMatrix; new(): SVGMatrix; -} +}; interface SVGMetadataElement extends SVGElement { addEventListener(type: K, listener: (this: SVGMetadataElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void; @@ -10339,7 +10754,7 @@ interface SVGMetadataElement extends SVGElement { declare var SVGMetadataElement: { prototype: SVGMetadataElement; new(): SVGMetadataElement; -} +}; interface SVGNumber { value: number; @@ -10348,7 +10763,7 @@ interface SVGNumber { declare var SVGNumber: { prototype: SVGNumber; new(): SVGNumber; -} +}; interface SVGNumberList { readonly numberOfItems: number; @@ -10364,7 +10779,7 @@ interface SVGNumberList { declare var SVGNumberList: { prototype: SVGNumberList; new(): SVGNumberList; -} +}; interface SVGPathElement extends SVGGraphicsElement { readonly pathSegList: SVGPathSegList; @@ -10397,7 +10812,7 @@ interface SVGPathElement extends SVGGraphicsElement { declare var SVGPathElement: { prototype: SVGPathElement; new(): SVGPathElement; -} +}; interface SVGPathSeg { readonly pathSegType: number; @@ -10447,7 +10862,7 @@ declare var SVGPathSeg: { readonly PATHSEG_MOVETO_ABS: number; readonly PATHSEG_MOVETO_REL: number; readonly PATHSEG_UNKNOWN: number; -} +}; interface SVGPathSegArcAbs extends SVGPathSeg { angle: number; @@ -10462,7 +10877,7 @@ interface SVGPathSegArcAbs extends SVGPathSeg { declare var SVGPathSegArcAbs: { prototype: SVGPathSegArcAbs; new(): SVGPathSegArcAbs; -} +}; interface SVGPathSegArcRel extends SVGPathSeg { angle: number; @@ -10477,7 +10892,7 @@ interface SVGPathSegArcRel extends SVGPathSeg { declare var SVGPathSegArcRel: { prototype: SVGPathSegArcRel; new(): SVGPathSegArcRel; -} +}; interface SVGPathSegClosePath extends SVGPathSeg { } @@ -10485,7 +10900,7 @@ interface SVGPathSegClosePath extends SVGPathSeg { declare var SVGPathSegClosePath: { prototype: SVGPathSegClosePath; new(): SVGPathSegClosePath; -} +}; interface SVGPathSegCurvetoCubicAbs extends SVGPathSeg { x: number; @@ -10499,7 +10914,7 @@ interface SVGPathSegCurvetoCubicAbs extends SVGPathSeg { declare var SVGPathSegCurvetoCubicAbs: { prototype: SVGPathSegCurvetoCubicAbs; new(): SVGPathSegCurvetoCubicAbs; -} +}; interface SVGPathSegCurvetoCubicRel extends SVGPathSeg { x: number; @@ -10513,7 +10928,7 @@ interface SVGPathSegCurvetoCubicRel extends SVGPathSeg { declare var SVGPathSegCurvetoCubicRel: { prototype: SVGPathSegCurvetoCubicRel; new(): SVGPathSegCurvetoCubicRel; -} +}; interface SVGPathSegCurvetoCubicSmoothAbs extends SVGPathSeg { x: number; @@ -10525,7 +10940,7 @@ interface SVGPathSegCurvetoCubicSmoothAbs extends SVGPathSeg { declare var SVGPathSegCurvetoCubicSmoothAbs: { prototype: SVGPathSegCurvetoCubicSmoothAbs; new(): SVGPathSegCurvetoCubicSmoothAbs; -} +}; interface SVGPathSegCurvetoCubicSmoothRel extends SVGPathSeg { x: number; @@ -10537,7 +10952,7 @@ interface SVGPathSegCurvetoCubicSmoothRel extends SVGPathSeg { declare var SVGPathSegCurvetoCubicSmoothRel: { prototype: SVGPathSegCurvetoCubicSmoothRel; new(): SVGPathSegCurvetoCubicSmoothRel; -} +}; interface SVGPathSegCurvetoQuadraticAbs extends SVGPathSeg { x: number; @@ -10549,7 +10964,7 @@ interface SVGPathSegCurvetoQuadraticAbs extends SVGPathSeg { declare var SVGPathSegCurvetoQuadraticAbs: { prototype: SVGPathSegCurvetoQuadraticAbs; new(): SVGPathSegCurvetoQuadraticAbs; -} +}; interface SVGPathSegCurvetoQuadraticRel extends SVGPathSeg { x: number; @@ -10561,7 +10976,7 @@ interface SVGPathSegCurvetoQuadraticRel extends SVGPathSeg { declare var SVGPathSegCurvetoQuadraticRel: { prototype: SVGPathSegCurvetoQuadraticRel; new(): SVGPathSegCurvetoQuadraticRel; -} +}; interface SVGPathSegCurvetoQuadraticSmoothAbs extends SVGPathSeg { x: number; @@ -10571,7 +10986,7 @@ interface SVGPathSegCurvetoQuadraticSmoothAbs extends SVGPathSeg { declare var SVGPathSegCurvetoQuadraticSmoothAbs: { prototype: SVGPathSegCurvetoQuadraticSmoothAbs; new(): SVGPathSegCurvetoQuadraticSmoothAbs; -} +}; interface SVGPathSegCurvetoQuadraticSmoothRel extends SVGPathSeg { x: number; @@ -10581,7 +10996,7 @@ interface SVGPathSegCurvetoQuadraticSmoothRel extends SVGPathSeg { declare var SVGPathSegCurvetoQuadraticSmoothRel: { prototype: SVGPathSegCurvetoQuadraticSmoothRel; new(): SVGPathSegCurvetoQuadraticSmoothRel; -} +}; interface SVGPathSegLinetoAbs extends SVGPathSeg { x: number; @@ -10591,7 +11006,7 @@ interface SVGPathSegLinetoAbs extends SVGPathSeg { declare var SVGPathSegLinetoAbs: { prototype: SVGPathSegLinetoAbs; new(): SVGPathSegLinetoAbs; -} +}; interface SVGPathSegLinetoHorizontalAbs extends SVGPathSeg { x: number; @@ -10600,7 +11015,7 @@ interface SVGPathSegLinetoHorizontalAbs extends SVGPathSeg { declare var SVGPathSegLinetoHorizontalAbs: { prototype: SVGPathSegLinetoHorizontalAbs; new(): SVGPathSegLinetoHorizontalAbs; -} +}; interface SVGPathSegLinetoHorizontalRel extends SVGPathSeg { x: number; @@ -10609,7 +11024,7 @@ interface SVGPathSegLinetoHorizontalRel extends SVGPathSeg { declare var SVGPathSegLinetoHorizontalRel: { prototype: SVGPathSegLinetoHorizontalRel; new(): SVGPathSegLinetoHorizontalRel; -} +}; interface SVGPathSegLinetoRel extends SVGPathSeg { x: number; @@ -10619,7 +11034,7 @@ interface SVGPathSegLinetoRel extends SVGPathSeg { declare var SVGPathSegLinetoRel: { prototype: SVGPathSegLinetoRel; new(): SVGPathSegLinetoRel; -} +}; interface SVGPathSegLinetoVerticalAbs extends SVGPathSeg { y: number; @@ -10628,7 +11043,7 @@ interface SVGPathSegLinetoVerticalAbs extends SVGPathSeg { declare var SVGPathSegLinetoVerticalAbs: { prototype: SVGPathSegLinetoVerticalAbs; new(): SVGPathSegLinetoVerticalAbs; -} +}; interface SVGPathSegLinetoVerticalRel extends SVGPathSeg { y: number; @@ -10637,7 +11052,7 @@ interface SVGPathSegLinetoVerticalRel extends SVGPathSeg { declare var SVGPathSegLinetoVerticalRel: { prototype: SVGPathSegLinetoVerticalRel; new(): SVGPathSegLinetoVerticalRel; -} +}; interface SVGPathSegList { readonly numberOfItems: number; @@ -10653,7 +11068,7 @@ interface SVGPathSegList { declare var SVGPathSegList: { prototype: SVGPathSegList; new(): SVGPathSegList; -} +}; interface SVGPathSegMovetoAbs extends SVGPathSeg { x: number; @@ -10663,7 +11078,7 @@ interface SVGPathSegMovetoAbs extends SVGPathSeg { declare var SVGPathSegMovetoAbs: { prototype: SVGPathSegMovetoAbs; new(): SVGPathSegMovetoAbs; -} +}; interface SVGPathSegMovetoRel extends SVGPathSeg { x: number; @@ -10673,7 +11088,7 @@ interface SVGPathSegMovetoRel extends SVGPathSeg { declare var SVGPathSegMovetoRel: { prototype: SVGPathSegMovetoRel; new(): SVGPathSegMovetoRel; -} +}; interface SVGPatternElement extends SVGElement, SVGTests, SVGUnitTypes, SVGFitToViewBox, SVGURIReference { readonly height: SVGAnimatedLength; @@ -10690,7 +11105,7 @@ interface SVGPatternElement extends SVGElement, SVGTests, SVGUnitTypes, SVGFitTo declare var SVGPatternElement: { prototype: SVGPatternElement; new(): SVGPatternElement; -} +}; interface SVGPoint { x: number; @@ -10701,7 +11116,7 @@ interface SVGPoint { declare var SVGPoint: { prototype: SVGPoint; new(): SVGPoint; -} +}; interface SVGPointList { readonly numberOfItems: number; @@ -10717,7 +11132,7 @@ interface SVGPointList { declare var SVGPointList: { prototype: SVGPointList; new(): SVGPointList; -} +}; interface SVGPolygonElement extends SVGGraphicsElement, SVGAnimatedPoints { addEventListener(type: K, listener: (this: SVGPolygonElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void; @@ -10727,7 +11142,7 @@ interface SVGPolygonElement extends SVGGraphicsElement, SVGAnimatedPoints { declare var SVGPolygonElement: { prototype: SVGPolygonElement; new(): SVGPolygonElement; -} +}; interface SVGPolylineElement extends SVGGraphicsElement, SVGAnimatedPoints { addEventListener(type: K, listener: (this: SVGPolylineElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void; @@ -10737,7 +11152,7 @@ interface SVGPolylineElement extends SVGGraphicsElement, SVGAnimatedPoints { declare var SVGPolylineElement: { prototype: SVGPolylineElement; new(): SVGPolylineElement; -} +}; interface SVGPreserveAspectRatio { align: number; @@ -10775,7 +11190,7 @@ declare var SVGPreserveAspectRatio: { readonly SVG_PRESERVEASPECTRATIO_XMINYMAX: number; readonly SVG_PRESERVEASPECTRATIO_XMINYMID: number; readonly SVG_PRESERVEASPECTRATIO_XMINYMIN: number; -} +}; interface SVGRadialGradientElement extends SVGGradientElement { readonly cx: SVGAnimatedLength; @@ -10790,7 +11205,7 @@ interface SVGRadialGradientElement extends SVGGradientElement { declare var SVGRadialGradientElement: { prototype: SVGRadialGradientElement; new(): SVGRadialGradientElement; -} +}; interface SVGRect { height: number; @@ -10802,7 +11217,7 @@ interface SVGRect { declare var SVGRect: { prototype: SVGRect; new(): SVGRect; -} +}; interface SVGRectElement extends SVGGraphicsElement { readonly height: SVGAnimatedLength; @@ -10818,8 +11233,60 @@ interface SVGRectElement extends SVGGraphicsElement { declare var SVGRectElement: { prototype: SVGRectElement; new(): SVGRectElement; +}; + +interface SVGScriptElement extends SVGElement, SVGURIReference { + type: string; + addEventListener(type: K, listener: (this: SVGScriptElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; } +declare var SVGScriptElement: { + prototype: SVGScriptElement; + new(): SVGScriptElement; +}; + +interface SVGStopElement extends SVGElement { + readonly offset: SVGAnimatedNumber; + addEventListener(type: K, listener: (this: SVGStopElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; +} + +declare var SVGStopElement: { + prototype: SVGStopElement; + new(): SVGStopElement; +}; + +interface SVGStringList { + readonly numberOfItems: number; + appendItem(newItem: string): string; + clear(): void; + getItem(index: number): string; + initialize(newItem: string): string; + insertItemBefore(newItem: string, index: number): string; + removeItem(index: number): string; + replaceItem(newItem: string, index: number): string; +} + +declare var SVGStringList: { + prototype: SVGStringList; + new(): SVGStringList; +}; + +interface SVGStyleElement extends SVGElement { + disabled: boolean; + media: string; + title: string; + type: string; + addEventListener(type: K, listener: (this: SVGStyleElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; +} + +declare var SVGStyleElement: { + prototype: SVGStyleElement; + new(): SVGStyleElement; +}; + interface SVGSVGElementEventMap extends SVGElementEventMap { "SVGAbort": Event; "SVGError": Event; @@ -10879,59 +11346,7 @@ interface SVGSVGElement extends SVGGraphicsElement, DocumentEvent, SVGFitToViewB declare var SVGSVGElement: { prototype: SVGSVGElement; new(): SVGSVGElement; -} - -interface SVGScriptElement extends SVGElement, SVGURIReference { - type: string; - addEventListener(type: K, listener: (this: SVGScriptElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGScriptElement: { - prototype: SVGScriptElement; - new(): SVGScriptElement; -} - -interface SVGStopElement extends SVGElement { - readonly offset: SVGAnimatedNumber; - addEventListener(type: K, listener: (this: SVGStopElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGStopElement: { - prototype: SVGStopElement; - new(): SVGStopElement; -} - -interface SVGStringList { - readonly numberOfItems: number; - appendItem(newItem: string): string; - clear(): void; - getItem(index: number): string; - initialize(newItem: string): string; - insertItemBefore(newItem: string, index: number): string; - removeItem(index: number): string; - replaceItem(newItem: string, index: number): string; -} - -declare var SVGStringList: { - prototype: SVGStringList; - new(): SVGStringList; -} - -interface SVGStyleElement extends SVGElement { - disabled: boolean; - media: string; - title: string; - type: string; - addEventListener(type: K, listener: (this: SVGStyleElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGStyleElement: { - prototype: SVGStyleElement; - new(): SVGStyleElement; -} +}; interface SVGSwitchElement extends SVGGraphicsElement { addEventListener(type: K, listener: (this: SVGSwitchElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void; @@ -10941,7 +11356,7 @@ interface SVGSwitchElement extends SVGGraphicsElement { declare var SVGSwitchElement: { prototype: SVGSwitchElement; new(): SVGSwitchElement; -} +}; interface SVGSymbolElement extends SVGElement, SVGFitToViewBox { addEventListener(type: K, listener: (this: SVGSymbolElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void; @@ -10951,17 +11366,7 @@ interface SVGSymbolElement extends SVGElement, SVGFitToViewBox { declare var SVGSymbolElement: { prototype: SVGSymbolElement; new(): SVGSymbolElement; -} - -interface SVGTSpanElement extends SVGTextPositioningElement { - addEventListener(type: K, listener: (this: SVGTSpanElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SVGTSpanElement: { - prototype: SVGTSpanElement; - new(): SVGTSpanElement; -} +}; interface SVGTextContentElement extends SVGGraphicsElement { readonly lengthAdjust: SVGAnimatedEnumeration; @@ -10988,7 +11393,7 @@ declare var SVGTextContentElement: { readonly LENGTHADJUST_SPACING: number; readonly LENGTHADJUST_SPACINGANDGLYPHS: number; readonly LENGTHADJUST_UNKNOWN: number; -} +}; interface SVGTextElement extends SVGTextPositioningElement { addEventListener(type: K, listener: (this: SVGTextElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void; @@ -10998,7 +11403,7 @@ interface SVGTextElement extends SVGTextPositioningElement { declare var SVGTextElement: { prototype: SVGTextElement; new(): SVGTextElement; -} +}; interface SVGTextPathElement extends SVGTextContentElement, SVGURIReference { readonly method: SVGAnimatedEnumeration; @@ -11023,7 +11428,7 @@ declare var SVGTextPathElement: { readonly TEXTPATH_SPACINGTYPE_AUTO: number; readonly TEXTPATH_SPACINGTYPE_EXACT: number; readonly TEXTPATH_SPACINGTYPE_UNKNOWN: number; -} +}; interface SVGTextPositioningElement extends SVGTextContentElement { readonly dx: SVGAnimatedLengthList; @@ -11038,7 +11443,7 @@ interface SVGTextPositioningElement extends SVGTextContentElement { declare var SVGTextPositioningElement: { prototype: SVGTextPositioningElement; new(): SVGTextPositioningElement; -} +}; interface SVGTitleElement extends SVGElement { addEventListener(type: K, listener: (this: SVGTitleElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void; @@ -11048,7 +11453,7 @@ interface SVGTitleElement extends SVGElement { declare var SVGTitleElement: { prototype: SVGTitleElement; new(): SVGTitleElement; -} +}; interface SVGTransform { readonly angle: number; @@ -11079,7 +11484,7 @@ declare var SVGTransform: { readonly SVG_TRANSFORM_SKEWY: number; readonly SVG_TRANSFORM_TRANSLATE: number; readonly SVG_TRANSFORM_UNKNOWN: number; -} +}; interface SVGTransformList { readonly numberOfItems: number; @@ -11097,8 +11502,18 @@ interface SVGTransformList { declare var SVGTransformList: { prototype: SVGTransformList; new(): SVGTransformList; +}; + +interface SVGTSpanElement extends SVGTextPositioningElement { + addEventListener(type: K, listener: (this: SVGTSpanElement, ev: SVGElementEventMap[K]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; } +declare var SVGTSpanElement: { + prototype: SVGTSpanElement; + new(): SVGTSpanElement; +}; + interface SVGUnitTypes { readonly SVG_UNIT_TYPE_OBJECTBOUNDINGBOX: number; readonly SVG_UNIT_TYPE_UNKNOWN: number; @@ -11120,7 +11535,7 @@ interface SVGUseElement extends SVGGraphicsElement, SVGURIReference { declare var SVGUseElement: { prototype: SVGUseElement; new(): SVGUseElement; -} +}; interface SVGViewElement extends SVGElement, SVGZoomAndPan, SVGFitToViewBox { readonly viewTarget: SVGStringList; @@ -11131,7 +11546,7 @@ interface SVGViewElement extends SVGElement, SVGZoomAndPan, SVGFitToViewBox { declare var SVGViewElement: { prototype: SVGViewElement; new(): SVGViewElement; -} +}; interface SVGZoomAndPan { readonly zoomAndPan: number; @@ -11141,7 +11556,7 @@ declare var SVGZoomAndPan: { readonly SVG_ZOOMANDPAN_DISABLE: number; readonly SVG_ZOOMANDPAN_MAGNIFY: number; readonly SVG_ZOOMANDPAN_UNKNOWN: number; -} +}; interface SVGZoomEvent extends UIEvent { readonly newScale: number; @@ -11154,420 +11569,7 @@ interface SVGZoomEvent extends UIEvent { declare var SVGZoomEvent: { prototype: SVGZoomEvent; new(): SVGZoomEvent; -} - -interface ScopedCredential { - readonly id: ArrayBuffer; - readonly type: ScopedCredentialType; -} - -declare var ScopedCredential: { - prototype: ScopedCredential; - new(): ScopedCredential; -} - -interface ScopedCredentialInfo { - readonly credential: ScopedCredential; - readonly publicKey: CryptoKey; -} - -declare var ScopedCredentialInfo: { - prototype: ScopedCredentialInfo; - new(): ScopedCredentialInfo; -} - -interface ScreenEventMap { - "MSOrientationChange": Event; -} - -interface Screen extends EventTarget { - readonly availHeight: number; - readonly availWidth: number; - bufferDepth: 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: Screen, ev: Event) => any; - readonly pixelDepth: number; - readonly systemXDPI: number; - readonly systemYDPI: number; - readonly width: number; - msLockOrientation(orientations: string | string[]): boolean; - msUnlockOrientation(): void; - addEventListener(type: K, listener: (this: Screen, ev: ScreenEventMap[K]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var Screen: { - prototype: Screen; - new(): Screen; -} - -interface ScriptNotifyEvent extends Event { - readonly callingUri: string; - readonly value: string; -} - -declare var ScriptNotifyEvent: { - prototype: ScriptNotifyEvent; - new(): ScriptNotifyEvent; -} - -interface ScriptProcessorNodeEventMap { - "audioprocess": AudioProcessingEvent; -} - -interface ScriptProcessorNode extends AudioNode { - readonly bufferSize: number; - onaudioprocess: (this: ScriptProcessorNode, ev: AudioProcessingEvent) => any; - addEventListener(type: K, listener: (this: ScriptProcessorNode, ev: ScriptProcessorNodeEventMap[K]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var ScriptProcessorNode: { - prototype: ScriptProcessorNode; - new(): ScriptProcessorNode; -} - -interface Selection { - readonly anchorNode: Node; - readonly anchorOffset: number; - readonly baseNode: Node; - readonly baseOffset: number; - readonly extentNode: Node; - readonly extentOffset: 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; - collapseToStart(): void; - containsNode(node: Node, partlyContained: boolean): boolean; - deleteFromDocument(): void; - empty(): void; - extend(newNode: Node, offset: number): void; - getRangeAt(index: number): Range; - removeAllRanges(): void; - removeRange(range: Range): void; - selectAllChildren(parentNode: Node): void; - setBaseAndExtent(baseNode: Node, baseOffset: number, extentNode: Node, extentOffset: number): void; - setPosition(parentNode: Node, offset: number): void; - toString(): string; -} - -declare var Selection: { - prototype: Selection; - new(): Selection; -} - -interface ServiceWorkerEventMap extends AbstractWorkerEventMap { - "statechange": Event; -} - -interface ServiceWorker extends EventTarget, AbstractWorker { - onstatechange: (this: ServiceWorker, ev: Event) => any; - readonly scriptURL: USVString; - readonly state: ServiceWorkerState; - postMessage(message: any, transfer?: any[]): void; - addEventListener(type: K, listener: (this: ServiceWorker, ev: ServiceWorkerEventMap[K]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var ServiceWorker: { - prototype: ServiceWorker; - new(): ServiceWorker; -} - -interface ServiceWorkerContainerEventMap { - "controllerchange": Event; - "message": ServiceWorkerMessageEvent; -} - -interface ServiceWorkerContainer extends EventTarget { - readonly controller: ServiceWorker | null; - oncontrollerchange: (this: ServiceWorkerContainer, ev: Event) => any; - onmessage: (this: ServiceWorkerContainer, ev: ServiceWorkerMessageEvent) => any; - readonly ready: Promise; - getRegistration(clientURL?: USVString): Promise; - getRegistrations(): any; - register(scriptURL: USVString, options?: RegistrationOptions): Promise; - addEventListener(type: K, listener: (this: ServiceWorkerContainer, ev: ServiceWorkerContainerEventMap[K]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var ServiceWorkerContainer: { - prototype: ServiceWorkerContainer; - new(): ServiceWorkerContainer; -} - -interface ServiceWorkerMessageEvent extends Event { - readonly data: any; - readonly lastEventId: string; - readonly origin: string; - readonly ports: MessagePort[] | null; - readonly source: ServiceWorker | MessagePort | null; -} - -declare var ServiceWorkerMessageEvent: { - prototype: ServiceWorkerMessageEvent; - new(type: string, eventInitDict?: ServiceWorkerMessageEventInit): ServiceWorkerMessageEvent; -} - -interface ServiceWorkerRegistrationEventMap { - "updatefound": Event; -} - -interface ServiceWorkerRegistration extends EventTarget { - readonly active: ServiceWorker | null; - readonly installing: ServiceWorker | null; - onupdatefound: (this: ServiceWorkerRegistration, ev: Event) => any; - readonly pushManager: PushManager; - readonly scope: USVString; - readonly sync: SyncManager; - readonly waiting: ServiceWorker | null; - getNotifications(filter?: GetNotificationOptions): any; - showNotification(title: string, options?: NotificationOptions): Promise; - unregister(): Promise; - update(): Promise; - addEventListener(type: K, listener: (this: ServiceWorkerRegistration, ev: ServiceWorkerRegistrationEventMap[K]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var ServiceWorkerRegistration: { - prototype: ServiceWorkerRegistration; - new(): ServiceWorkerRegistration; -} - -interface SourceBuffer extends EventTarget { - appendWindowEnd: number; - appendWindowStart: number; - readonly audioTracks: AudioTrackList; - readonly buffered: TimeRanges; - mode: AppendMode; - timestampOffset: number; - readonly updating: boolean; - readonly videoTracks: VideoTrackList; - abort(): void; - appendBuffer(data: ArrayBuffer | ArrayBufferView): void; - appendStream(stream: MSStream, maxSize?: number): void; - remove(start: number, end: number): void; -} - -declare var SourceBuffer: { - prototype: SourceBuffer; - new(): SourceBuffer; -} - -interface SourceBufferList extends EventTarget { - readonly length: number; - item(index: number): SourceBuffer; - [index: number]: SourceBuffer; -} - -declare var SourceBufferList: { - prototype: SourceBufferList; - new(): SourceBufferList; -} - -interface SpeechSynthesisEventMap { - "voiceschanged": Event; -} - -interface SpeechSynthesis extends EventTarget { - onvoiceschanged: (this: SpeechSynthesis, ev: Event) => any; - readonly paused: boolean; - readonly pending: boolean; - readonly speaking: boolean; - cancel(): void; - getVoices(): SpeechSynthesisVoice[]; - pause(): void; - resume(): void; - speak(utterance: SpeechSynthesisUtterance): void; - addEventListener(type: K, listener: (this: SpeechSynthesis, ev: SpeechSynthesisEventMap[K]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SpeechSynthesis: { - prototype: SpeechSynthesis; - new(): SpeechSynthesis; -} - -interface SpeechSynthesisEvent extends Event { - readonly charIndex: number; - readonly elapsedTime: number; - readonly name: string; - readonly utterance: SpeechSynthesisUtterance | null; -} - -declare var SpeechSynthesisEvent: { - prototype: SpeechSynthesisEvent; - new(type: string, eventInitDict?: SpeechSynthesisEventInit): SpeechSynthesisEvent; -} - -interface SpeechSynthesisUtteranceEventMap { - "boundary": Event; - "end": Event; - "error": Event; - "mark": Event; - "pause": Event; - "resume": Event; - "start": Event; -} - -interface SpeechSynthesisUtterance extends EventTarget { - lang: string; - onboundary: (this: SpeechSynthesisUtterance, ev: Event) => any; - onend: (this: SpeechSynthesisUtterance, ev: Event) => any; - onerror: (this: SpeechSynthesisUtterance, ev: Event) => any; - onmark: (this: SpeechSynthesisUtterance, ev: Event) => any; - onpause: (this: SpeechSynthesisUtterance, ev: Event) => any; - onresume: (this: SpeechSynthesisUtterance, ev: Event) => any; - onstart: (this: SpeechSynthesisUtterance, ev: Event) => any; - pitch: number; - rate: number; - text: string; - voice: SpeechSynthesisVoice; - volume: number; - addEventListener(type: K, listener: (this: SpeechSynthesisUtterance, ev: SpeechSynthesisUtteranceEventMap[K]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var SpeechSynthesisUtterance: { - prototype: SpeechSynthesisUtterance; - new(text?: string): SpeechSynthesisUtterance; -} - -interface SpeechSynthesisVoice { - readonly default: boolean; - readonly lang: string; - readonly localService: boolean; - readonly name: string; - readonly voiceURI: string; -} - -declare var SpeechSynthesisVoice: { - prototype: SpeechSynthesisVoice; - new(): SpeechSynthesisVoice; -} - -interface StereoPannerNode extends AudioNode { - readonly pan: AudioParam; -} - -declare var StereoPannerNode: { - prototype: StereoPannerNode; - new(): StereoPannerNode; -} - -interface Storage { - readonly length: number; - clear(): void; - getItem(key: string): string | null; - key(index: number): string | null; - removeItem(key: string): void; - setItem(key: string, data: string): void; - [key: string]: any; - [index: number]: string; -} - -declare var Storage: { - prototype: Storage; - new(): Storage; -} - -interface StorageEvent extends Event { - readonly url: string; - key?: string; - oldValue?: string; - newValue?: string; - storageArea?: Storage; -} - -declare var StorageEvent: { - prototype: StorageEvent; - new (type: string, eventInitDict?: StorageEventInit): StorageEvent; -} - -interface StyleMedia { - readonly type: string; - matchMedium(mediaquery: string): boolean; -} - -declare var StyleMedia: { - prototype: StyleMedia; - new(): StyleMedia; -} - -interface StyleSheet { - disabled: boolean; - readonly href: string; - readonly media: MediaList; - readonly ownerNode: Node; - readonly parentStyleSheet: StyleSheet; - readonly title: string; - readonly type: string; -} - -declare var StyleSheet: { - prototype: StyleSheet; - new(): StyleSheet; -} - -interface StyleSheetList { - readonly length: number; - item(index?: number): StyleSheet; - [index: number]: StyleSheet; -} - -declare var StyleSheetList: { - prototype: StyleSheetList; - new(): StyleSheetList; -} - -interface StyleSheetPageList { - readonly length: number; - item(index: number): CSSPageRule; - [index: number]: CSSPageRule; -} - -declare var StyleSheetPageList: { - prototype: StyleSheetPageList; - new(): StyleSheetPageList; -} - -interface SubtleCrypto { - decrypt(algorithm: string | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: BufferSource): PromiseLike; - deriveBits(algorithm: string | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, length: number): PromiseLike; - deriveKey(algorithm: string | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: string | AesDerivedKeyParams | HmacImportParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, extractable: boolean, keyUsages: string[]): PromiseLike; - digest(algorithm: AlgorithmIdentifier, data: BufferSource): PromiseLike; - encrypt(algorithm: string | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: BufferSource): PromiseLike; - exportKey(format: "jwk", key: CryptoKey): PromiseLike; - exportKey(format: "raw" | "pkcs8" | "spki", key: CryptoKey): PromiseLike; - exportKey(format: string, key: CryptoKey): PromiseLike; - generateKey(algorithm: string, extractable: boolean, keyUsages: string[]): PromiseLike; - generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams | DhKeyGenParams, extractable: boolean, keyUsages: string[]): PromiseLike; - generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: string[]): PromiseLike; - importKey(format: "jwk", keyData: JsonWebKey, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable:boolean, keyUsages: string[]): PromiseLike; - importKey(format: "raw" | "pkcs8" | "spki", keyData: BufferSource, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable:boolean, keyUsages: string[]): PromiseLike; - importKey(format: string, keyData: JsonWebKey | BufferSource, algorithm: string | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams, extractable:boolean, keyUsages: string[]): PromiseLike; - sign(algorithm: string | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, data: BufferSource): PromiseLike; - unwrapKey(format: string, wrappedKey: BufferSource, unwrappingKey: CryptoKey, unwrapAlgorithm: AlgorithmIdentifier, unwrappedKeyAlgorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: string[]): PromiseLike; - verify(algorithm: string | RsaPssParams | EcdsaParams | AesCmacParams, key: CryptoKey, signature: BufferSource, data: BufferSource): PromiseLike; - wrapKey(format: string, key: CryptoKey, wrappingKey: CryptoKey, wrapAlgorithm: AlgorithmIdentifier): PromiseLike; -} - -declare var SubtleCrypto: { - prototype: SubtleCrypto; - new(): SubtleCrypto; -} +}; interface SyncManager { getTags(): any; @@ -11577,7 +11579,7 @@ interface SyncManager { declare var SyncManager: { prototype: SyncManager; new(): SyncManager; -} +}; interface Text extends CharacterData { readonly wholeText: string; @@ -11588,7 +11590,7 @@ interface Text extends CharacterData { declare var Text: { prototype: Text; new(data?: string): Text; -} +}; interface TextEvent extends UIEvent { readonly data: string; @@ -11620,7 +11622,7 @@ declare var TextEvent: { readonly DOM_INPUT_METHOD_SCRIPT: number; readonly DOM_INPUT_METHOD_UNKNOWN: number; readonly DOM_INPUT_METHOD_VOICE: number; -} +}; interface TextMetrics { readonly width: number; @@ -11629,7 +11631,7 @@ interface TextMetrics { declare var TextMetrics: { prototype: TextMetrics; new(): TextMetrics; -} +}; interface TextTrackEventMap { "cuechange": Event; @@ -11672,7 +11674,7 @@ declare var TextTrack: { readonly LOADING: number; readonly NONE: number; readonly SHOWING: number; -} +}; interface TextTrackCueEventMap { "enter": Event; @@ -11696,7 +11698,7 @@ interface TextTrackCue extends EventTarget { declare var TextTrackCue: { prototype: TextTrackCue; new(startTime: number, endTime: number, text: string): TextTrackCue; -} +}; interface TextTrackCueList { readonly length: number; @@ -11708,7 +11710,7 @@ interface TextTrackCueList { declare var TextTrackCueList: { prototype: TextTrackCueList; new(): TextTrackCueList; -} +}; interface TextTrackListEventMap { "addtrack": TrackEvent; @@ -11726,7 +11728,7 @@ interface TextTrackList extends EventTarget { declare var TextTrackList: { prototype: TextTrackList; new(): TextTrackList; -} +}; interface TimeRanges { readonly length: number; @@ -11737,7 +11739,7 @@ interface TimeRanges { declare var TimeRanges: { prototype: TimeRanges; new(): TimeRanges; -} +}; interface Touch { readonly clientX: number; @@ -11753,7 +11755,7 @@ interface Touch { declare var Touch: { prototype: Touch; new(): Touch; -} +}; interface TouchEvent extends UIEvent { readonly altKey: boolean; @@ -11771,7 +11773,7 @@ interface TouchEvent extends UIEvent { declare var TouchEvent: { prototype: TouchEvent; new(type: string, touchEventInit?: TouchEventInit): TouchEvent; -} +}; interface TouchList { readonly length: number; @@ -11782,7 +11784,7 @@ interface TouchList { declare var TouchList: { prototype: TouchList; new(): TouchList; -} +}; interface TrackEvent extends Event { readonly track: VideoTrack | AudioTrack | TextTrack | null; @@ -11791,7 +11793,7 @@ interface TrackEvent extends Event { declare var TrackEvent: { prototype: TrackEvent; new(typeArg: string, eventInitDict?: TrackEventInit): TrackEvent; -} +}; interface TransitionEvent extends Event { readonly elapsedTime: number; @@ -11802,7 +11804,7 @@ interface TransitionEvent extends Event { declare var TransitionEvent: { prototype: TransitionEvent; new(typeArg: string, eventInitDict?: TransitionEventInit): TransitionEvent; -} +}; interface TreeWalker { currentNode: Node; @@ -11822,7 +11824,7 @@ interface TreeWalker { declare var TreeWalker: { prototype: TreeWalker; new(): TreeWalker; -} +}; interface UIEvent extends Event { readonly detail: number; @@ -11833,8 +11835,17 @@ interface UIEvent extends Event { declare var UIEvent: { prototype: UIEvent; new(typeArg: string, eventInitDict?: UIEventInit): UIEvent; +}; + +interface UnviewableContentIdentifiedEvent extends NavigationEventWithReferrer { + readonly mediaType: string; } +declare var UnviewableContentIdentifiedEvent: { + prototype: UnviewableContentIdentifiedEvent; + new(): UnviewableContentIdentifiedEvent; +}; + interface URL { hash: string; host: string; @@ -11856,16 +11867,7 @@ declare var URL: { new(url: string, base?: string): URL; createObjectURL(object: any, options?: ObjectURLOptions): string; revokeObjectURL(url: string): void; -} - -interface UnviewableContentIdentifiedEvent extends NavigationEventWithReferrer { - readonly mediaType: string; -} - -declare var UnviewableContentIdentifiedEvent: { - prototype: UnviewableContentIdentifiedEvent; - new(): UnviewableContentIdentifiedEvent; -} +}; interface ValidityState { readonly badInput: boolean; @@ -11883,7 +11885,7 @@ interface ValidityState { declare var ValidityState: { prototype: ValidityState; new(): ValidityState; -} +}; interface VideoPlaybackQuality { readonly corruptedVideoFrames: number; @@ -11896,7 +11898,7 @@ interface VideoPlaybackQuality { declare var VideoPlaybackQuality: { prototype: VideoPlaybackQuality; new(): VideoPlaybackQuality; -} +}; interface VideoTrack { readonly id: string; @@ -11910,7 +11912,7 @@ interface VideoTrack { declare var VideoTrack: { prototype: VideoTrack; new(): VideoTrack; -} +}; interface VideoTrackListEventMap { "addtrack": TrackEvent; @@ -11934,45 +11936,7 @@ interface VideoTrackList extends EventTarget { declare var VideoTrackList: { prototype: VideoTrackList; new(): VideoTrackList; -} - -interface WEBGL_compressed_texture_s3tc { - 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; - 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 { - 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; - readonly UNMASKED_RENDERER_WEBGL: number; - readonly UNMASKED_VENDOR_WEBGL: number; -} - -interface WEBGL_depth_texture { - readonly UNSIGNED_INT_24_8_WEBGL: number; -} - -declare var WEBGL_depth_texture: { - prototype: WEBGL_depth_texture; - new(): WEBGL_depth_texture; - readonly UNSIGNED_INT_24_8_WEBGL: number; -} +}; interface WaveShaperNode extends AudioNode { curve: Float32Array | null; @@ -11982,7 +11946,7 @@ interface WaveShaperNode extends AudioNode { declare var WaveShaperNode: { prototype: WaveShaperNode; new(): WaveShaperNode; -} +}; interface WebAuthentication { getAssertion(assertionChallenge: any, options?: AssertionOptions): Promise; @@ -11992,7 +11956,7 @@ interface WebAuthentication { declare var WebAuthentication: { prototype: WebAuthentication; new(): WebAuthentication; -} +}; interface WebAuthnAssertion { readonly authenticatorData: ArrayBuffer; @@ -12004,8 +11968,46 @@ interface WebAuthnAssertion { declare var WebAuthnAssertion: { prototype: WebAuthnAssertion; new(): WebAuthnAssertion; +}; + +interface WEBGL_compressed_texture_s3tc { + readonly 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; } +declare var WEBGL_compressed_texture_s3tc: { + prototype: WEBGL_compressed_texture_s3tc; + new(): WEBGL_compressed_texture_s3tc; + readonly 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; +}; + +interface WEBGL_debug_renderer_info { + 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; + readonly UNMASKED_RENDERER_WEBGL: number; + readonly UNMASKED_VENDOR_WEBGL: number; +}; + +interface WEBGL_depth_texture { + readonly UNSIGNED_INT_24_8_WEBGL: number; +} + +declare var WEBGL_depth_texture: { + prototype: WEBGL_depth_texture; + new(): WEBGL_depth_texture; + readonly UNSIGNED_INT_24_8_WEBGL: number; +}; + interface WebGLActiveInfo { readonly name: string; readonly size: number; @@ -12015,7 +12017,7 @@ interface WebGLActiveInfo { declare var WebGLActiveInfo: { prototype: WebGLActiveInfo; new(): WebGLActiveInfo; -} +}; interface WebGLBuffer extends WebGLObject { } @@ -12023,7 +12025,7 @@ interface WebGLBuffer extends WebGLObject { declare var WebGLBuffer: { prototype: WebGLBuffer; new(): WebGLBuffer; -} +}; interface WebGLContextEvent extends Event { readonly statusMessage: string; @@ -12032,7 +12034,7 @@ interface WebGLContextEvent extends Event { declare var WebGLContextEvent: { prototype: WebGLContextEvent; new(typeArg: string, eventInitDict?: WebGLContextEventInit): WebGLContextEvent; -} +}; interface WebGLFramebuffer extends WebGLObject { } @@ -12040,7 +12042,7 @@ interface WebGLFramebuffer extends WebGLObject { declare var WebGLFramebuffer: { prototype: WebGLFramebuffer; new(): WebGLFramebuffer; -} +}; interface WebGLObject { } @@ -12048,7 +12050,7 @@ interface WebGLObject { declare var WebGLObject: { prototype: WebGLObject; new(): WebGLObject; -} +}; interface WebGLProgram extends WebGLObject { } @@ -12056,7 +12058,7 @@ interface WebGLProgram extends WebGLObject { declare var WebGLProgram: { prototype: WebGLProgram; new(): WebGLProgram; -} +}; interface WebGLRenderbuffer extends WebGLObject { } @@ -12064,7 +12066,7 @@ interface WebGLRenderbuffer extends WebGLObject { declare var WebGLRenderbuffer: { prototype: WebGLRenderbuffer; new(): WebGLRenderbuffer; -} +}; interface WebGLRenderingContext { readonly canvas: HTMLCanvasElement; @@ -12325,13 +12327,13 @@ interface WebGLRenderingContext { readonly KEEP: number; readonly LEQUAL: number; readonly LESS: number; + readonly LINE_LOOP: number; + readonly LINE_STRIP: number; + readonly LINE_WIDTH: 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; @@ -12356,9 +12358,9 @@ interface WebGLRenderingContext { readonly NEAREST_MIPMAP_NEAREST: number; readonly NEVER: number; readonly NICEST: number; + readonly NO_ERROR: 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; @@ -12388,18 +12390,18 @@ interface WebGLRenderingContext { readonly REPEAT: number; readonly REPLACE: number; readonly RGB: number; - readonly RGB565: number; readonly RGB5_A1: number; + readonly RGB565: 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 SAMPLER_2D: number; + readonly SAMPLER_CUBE: number; + readonly SAMPLES: number; readonly SCISSOR_BOX: number; readonly SCISSOR_TEST: number; readonly SHADER_TYPE: number; @@ -12433,6 +12435,20 @@ interface WebGLRenderingContext { readonly STREAM_DRAW: number; readonly SUBPIXEL_BITS: number; readonly TEXTURE: 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 TEXTURE0: number; readonly TEXTURE1: number; readonly TEXTURE10: number; @@ -12465,23 +12481,9 @@ interface WebGLRenderingContext { 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 TRIANGLES: number; readonly UNPACK_ALIGNMENT: number; readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: number; readonly UNPACK_FLIP_Y_WEBGL: number; @@ -12627,13 +12629,13 @@ declare var WebGLRenderingContext: { readonly KEEP: number; readonly LEQUAL: number; readonly LESS: number; + readonly LINE_LOOP: number; + readonly LINE_STRIP: number; + readonly LINE_WIDTH: 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; @@ -12658,9 +12660,9 @@ declare var WebGLRenderingContext: { readonly NEAREST_MIPMAP_NEAREST: number; readonly NEVER: number; readonly NICEST: number; + readonly NO_ERROR: 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; @@ -12690,18 +12692,18 @@ declare var WebGLRenderingContext: { readonly REPEAT: number; readonly REPLACE: number; readonly RGB: number; - readonly RGB565: number; readonly RGB5_A1: number; + readonly RGB565: 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 SAMPLER_2D: number; + readonly SAMPLER_CUBE: number; + readonly SAMPLES: number; readonly SCISSOR_BOX: number; readonly SCISSOR_TEST: number; readonly SHADER_TYPE: number; @@ -12735,6 +12737,20 @@ declare var WebGLRenderingContext: { readonly STREAM_DRAW: number; readonly SUBPIXEL_BITS: number; readonly TEXTURE: 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 TEXTURE0: number; readonly TEXTURE1: number; readonly TEXTURE10: number; @@ -12767,23 +12783,9 @@ declare var WebGLRenderingContext: { 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 TRIANGLES: number; readonly UNPACK_ALIGNMENT: number; readonly UNPACK_COLORSPACE_CONVERSION_WEBGL: number; readonly UNPACK_FLIP_Y_WEBGL: number; @@ -12807,7 +12809,7 @@ declare var WebGLRenderingContext: { readonly VERTEX_SHADER: number; readonly VIEWPORT: number; readonly ZERO: number; -} +}; interface WebGLShader extends WebGLObject { } @@ -12815,7 +12817,7 @@ interface WebGLShader extends WebGLObject { declare var WebGLShader: { prototype: WebGLShader; new(): WebGLShader; -} +}; interface WebGLShaderPrecisionFormat { readonly precision: number; @@ -12826,7 +12828,7 @@ interface WebGLShaderPrecisionFormat { declare var WebGLShaderPrecisionFormat: { prototype: WebGLShaderPrecisionFormat; new(): WebGLShaderPrecisionFormat; -} +}; interface WebGLTexture extends WebGLObject { } @@ -12834,7 +12836,7 @@ interface WebGLTexture extends WebGLObject { declare var WebGLTexture: { prototype: WebGLTexture; new(): WebGLTexture; -} +}; interface WebGLUniformLocation { } @@ -12842,7 +12844,7 @@ interface WebGLUniformLocation { declare var WebGLUniformLocation: { prototype: WebGLUniformLocation; new(): WebGLUniformLocation; -} +}; interface WebKitCSSMatrix { a: number; @@ -12882,7 +12884,7 @@ interface WebKitCSSMatrix { declare var WebKitCSSMatrix: { prototype: WebKitCSSMatrix; new(text?: string): WebKitCSSMatrix; -} +}; interface WebKitDirectoryEntry extends WebKitEntry { createReader(): WebKitDirectoryReader; @@ -12891,7 +12893,7 @@ interface WebKitDirectoryEntry extends WebKitEntry { declare var WebKitDirectoryEntry: { prototype: WebKitDirectoryEntry; new(): WebKitDirectoryEntry; -} +}; interface WebKitDirectoryReader { readEntries(successCallback: WebKitEntriesCallback, errorCallback?: WebKitErrorCallback): void; @@ -12900,7 +12902,7 @@ interface WebKitDirectoryReader { declare var WebKitDirectoryReader: { prototype: WebKitDirectoryReader; new(): WebKitDirectoryReader; -} +}; interface WebKitEntry { readonly filesystem: WebKitFileSystem; @@ -12913,7 +12915,7 @@ interface WebKitEntry { declare var WebKitEntry: { prototype: WebKitEntry; new(): WebKitEntry; -} +}; interface WebKitFileEntry extends WebKitEntry { file(successCallback: WebKitFileCallback, errorCallback?: WebKitErrorCallback): void; @@ -12922,7 +12924,7 @@ interface WebKitFileEntry extends WebKitEntry { declare var WebKitFileEntry: { prototype: WebKitFileEntry; new(): WebKitFileEntry; -} +}; interface WebKitFileSystem { readonly name: string; @@ -12932,7 +12934,7 @@ interface WebKitFileSystem { declare var WebKitFileSystem: { prototype: WebKitFileSystem; new(): WebKitFileSystem; -} +}; interface WebKitPoint { x: number; @@ -12942,8 +12944,18 @@ interface WebKitPoint { declare var WebKitPoint: { prototype: WebKitPoint; new(x?: number, y?: number): WebKitPoint; +}; + +interface webkitRTCPeerConnection extends RTCPeerConnection { + addEventListener(type: K, listener: (this: webkitRTCPeerConnection, ev: RTCPeerConnectionEventMap[K]) => any, useCapture?: boolean): void; + addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; } +declare var webkitRTCPeerConnection: { + prototype: webkitRTCPeerConnection; + new(configuration: RTCConfiguration): webkitRTCPeerConnection; +}; + interface WebSocketEventMap { "close": CloseEvent; "error": Event; @@ -12979,7 +12991,7 @@ declare var WebSocket: { readonly CLOSING: number; readonly CONNECTING: number; readonly OPEN: number; -} +}; interface WheelEvent extends MouseEvent { readonly deltaMode: number; @@ -13002,7 +13014,7 @@ declare var WheelEvent: { readonly DOM_DELTA_LINE: number; readonly DOM_DELTA_PAGE: number; readonly DOM_DELTA_PIXEL: number; -} +}; interface WindowEventMap extends GlobalEventHandlersEventMap { "abort": UIEvent; @@ -13030,6 +13042,7 @@ interface WindowEventMap extends GlobalEventHandlersEventMap { "durationchange": Event; "emptied": Event; "ended": MediaStreamErrorEvent; + "error": ErrorEvent; "focus": FocusEvent; "hashchange": HashChangeEvent; "input": Event; @@ -13088,6 +13101,10 @@ interface WindowEventMap extends GlobalEventHandlersEventMap { "submit": Event; "suspend": Event; "timeupdate": Event; + "touchcancel": TouchEvent; + "touchend": TouchEvent; + "touchmove": TouchEvent; + "touchstart": TouchEvent; "unload": Event; "volumechange": Event; "waiting": Event; @@ -13101,8 +13118,8 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window readonly crypto: Crypto; defaultStatus: string; readonly devicePixelRatio: number; - readonly doNotTrack: string; readonly document: Document; + readonly doNotTrack: string; event: Event | undefined; readonly external: External; readonly frameElement: Element; @@ -13225,9 +13242,9 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window readonly screenTop: number; readonly screenX: number; readonly screenY: number; + readonly scrollbars: BarProp; readonly scrollX: number; readonly scrollY: number; - readonly scrollbars: BarProp; readonly self: Window; readonly speechSynthesis: SpeechSynthesis; status: string; @@ -13283,7 +13300,7 @@ interface Window extends EventTarget, WindowTimers, WindowSessionStorage, Window declare var Window: { prototype: Window; new(): Window; -} +}; interface WorkerEventMap extends AbstractWorkerEventMap { "message": MessageEvent; @@ -13300,7 +13317,7 @@ interface Worker extends EventTarget, AbstractWorker { declare var Worker: { prototype: Worker; new(stringUrl: string): Worker; -} +}; interface XMLDocument extends Document { addEventListener(type: K, listener: (this: XMLDocument, ev: DocumentEventMap[K]) => any, useCapture?: boolean): void; @@ -13310,7 +13327,7 @@ interface XMLDocument extends Document { declare var XMLDocument: { prototype: XMLDocument; new(): XMLDocument; -} +}; interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap { "readystatechange": Event; @@ -13357,7 +13374,7 @@ declare var XMLHttpRequest: { readonly LOADING: number; readonly OPENED: number; readonly UNSENT: number; -} +}; interface XMLHttpRequestUpload extends EventTarget, XMLHttpRequestEventTarget { addEventListener(type: K, listener: (this: XMLHttpRequestUpload, ev: XMLHttpRequestEventTargetEventMap[K]) => any, useCapture?: boolean): void; @@ -13367,7 +13384,7 @@ interface XMLHttpRequestUpload extends EventTarget, XMLHttpRequestEventTarget { declare var XMLHttpRequestUpload: { prototype: XMLHttpRequestUpload; new(): XMLHttpRequestUpload; -} +}; interface XMLSerializer { serializeToString(target: Node): string; @@ -13376,7 +13393,7 @@ interface XMLSerializer { declare var XMLSerializer: { prototype: XMLSerializer; new(): XMLSerializer; -} +}; interface XPathEvaluator { createExpression(expression: string, resolver: XPathNSResolver): XPathExpression; @@ -13387,7 +13404,7 @@ interface XPathEvaluator { declare var XPathEvaluator: { prototype: XPathEvaluator; new(): XPathEvaluator; -} +}; interface XPathExpression { evaluate(contextNode: Node, type: number, result: XPathResult | null): XPathResult; @@ -13396,7 +13413,7 @@ interface XPathExpression { declare var XPathExpression: { prototype: XPathExpression; new(): XPathExpression; -} +}; interface XPathNSResolver { lookupNamespaceURI(prefix: string): string; @@ -13405,7 +13422,7 @@ interface XPathNSResolver { declare var XPathNSResolver: { prototype: XPathNSResolver; new(): XPathNSResolver; -} +}; interface XPathResult { readonly booleanValue: boolean; @@ -13442,7 +13459,7 @@ declare var XPathResult: { readonly STRING_TYPE: number; readonly UNORDERED_NODE_ITERATOR_TYPE: number; readonly UNORDERED_NODE_SNAPSHOT_TYPE: number; -} +}; interface XSLTProcessor { clearParameters(): void; @@ -13458,17 +13475,7 @@ interface XSLTProcessor { declare var XSLTProcessor: { prototype: XSLTProcessor; new(): XSLTProcessor; -} - -interface webkitRTCPeerConnection extends RTCPeerConnection { - addEventListener(type: K, listener: (this: webkitRTCPeerConnection, ev: RTCPeerConnectionEventMap[K]) => any, useCapture?: boolean): void; - addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; -} - -declare var webkitRTCPeerConnection: { - prototype: webkitRTCPeerConnection; - new(configuration: RTCConfiguration): webkitRTCPeerConnection; -} +}; interface AbstractWorkerEventMap { "error": ErrorEvent; @@ -13505,6 +13512,81 @@ interface ChildNode { remove(): void; } +interface DocumentEvent { + createEvent(eventInterface: "AnimationEvent"): AnimationEvent; + createEvent(eventInterface: "AudioProcessingEvent"): AudioProcessingEvent; + createEvent(eventInterface: "BeforeUnloadEvent"): BeforeUnloadEvent; + createEvent(eventInterface: "ClipboardEvent"): ClipboardEvent; + createEvent(eventInterface: "CloseEvent"): CloseEvent; + createEvent(eventInterface: "CompositionEvent"): CompositionEvent; + createEvent(eventInterface: "CustomEvent"): CustomEvent; + createEvent(eventInterface: "DeviceLightEvent"): DeviceLightEvent; + createEvent(eventInterface: "DeviceMotionEvent"): DeviceMotionEvent; + createEvent(eventInterface: "DeviceOrientationEvent"): DeviceOrientationEvent; + createEvent(eventInterface: "DragEvent"): DragEvent; + createEvent(eventInterface: "ErrorEvent"): ErrorEvent; + createEvent(eventInterface: "Event"): Event; + createEvent(eventInterface: "Events"): Event; + createEvent(eventInterface: "FocusEvent"): FocusEvent; + createEvent(eventInterface: "FocusNavigationEvent"): FocusNavigationEvent; + createEvent(eventInterface: "GamepadEvent"): GamepadEvent; + 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; + createEvent(eventInterface: "MSMediaKeyMessageEvent"): MSMediaKeyMessageEvent; + 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: "MediaStreamEvent"): MediaStreamEvent; + createEvent(eventInterface: "MediaStreamTrackEvent"): MediaStreamTrackEvent; + createEvent(eventInterface: "MessageEvent"): MessageEvent; + createEvent(eventInterface: "MouseEvent"): MouseEvent; + createEvent(eventInterface: "MouseEvents"): MouseEvent; + 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: "PaymentRequestUpdateEvent"): PaymentRequestUpdateEvent; + 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: "RTCPeerConnectionIceEvent"): RTCPeerConnectionIceEvent; + createEvent(eventInterface: "RTCSsrcConflictEvent"): RTCSsrcConflictEvent; + createEvent(eventInterface: "SVGZoomEvent"): SVGZoomEvent; + createEvent(eventInterface: "SVGZoomEvents"): SVGZoomEvent; + createEvent(eventInterface: "ScriptNotifyEvent"): ScriptNotifyEvent; + createEvent(eventInterface: "ServiceWorkerMessageEvent"): ServiceWorkerMessageEvent; + createEvent(eventInterface: "SpeechSynthesisEvent"): SpeechSynthesisEvent; + createEvent(eventInterface: "StorageEvent"): StorageEvent; + createEvent(eventInterface: "TextEvent"): TextEvent; + createEvent(eventInterface: "TouchEvent"): TouchEvent; + createEvent(eventInterface: "TrackEvent"): TrackEvent; + createEvent(eventInterface: "TransitionEvent"): TransitionEvent; + createEvent(eventInterface: "UIEvent"): UIEvent; + createEvent(eventInterface: "UIEvents"): UIEvent; + createEvent(eventInterface: "UnviewableContentIdentifiedEvent"): UnviewableContentIdentifiedEvent; + createEvent(eventInterface: "WebGLContextEvent"): WebGLContextEvent; + createEvent(eventInterface: "WheelEvent"): WheelEvent; + createEvent(eventInterface: string): Event; +} + interface DOML2DeprecatedColorProperty { color: string; } @@ -13513,81 +13595,6 @@ interface DOML2DeprecatedSizeProperty { size: number; } -interface DocumentEvent { - createEvent(eventInterface:"AnimationEvent"): AnimationEvent; - createEvent(eventInterface:"AudioProcessingEvent"): AudioProcessingEvent; - createEvent(eventInterface:"BeforeUnloadEvent"): BeforeUnloadEvent; - createEvent(eventInterface:"ClipboardEvent"): ClipboardEvent; - createEvent(eventInterface:"CloseEvent"): CloseEvent; - createEvent(eventInterface:"CompositionEvent"): CompositionEvent; - createEvent(eventInterface:"CustomEvent"): CustomEvent; - createEvent(eventInterface:"DeviceLightEvent"): DeviceLightEvent; - createEvent(eventInterface:"DeviceMotionEvent"): DeviceMotionEvent; - createEvent(eventInterface:"DeviceOrientationEvent"): DeviceOrientationEvent; - createEvent(eventInterface:"DragEvent"): DragEvent; - createEvent(eventInterface:"ErrorEvent"): ErrorEvent; - createEvent(eventInterface:"Event"): Event; - createEvent(eventInterface:"Events"): Event; - createEvent(eventInterface:"FocusEvent"): FocusEvent; - createEvent(eventInterface:"FocusNavigationEvent"): FocusNavigationEvent; - createEvent(eventInterface:"GamepadEvent"): GamepadEvent; - 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; - createEvent(eventInterface:"MSMediaKeyMessageEvent"): MSMediaKeyMessageEvent; - 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:"MediaStreamEvent"): MediaStreamEvent; - createEvent(eventInterface:"MediaStreamTrackEvent"): MediaStreamTrackEvent; - createEvent(eventInterface:"MessageEvent"): MessageEvent; - createEvent(eventInterface:"MouseEvent"): MouseEvent; - createEvent(eventInterface:"MouseEvents"): MouseEvent; - 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:"PaymentRequestUpdateEvent"): PaymentRequestUpdateEvent; - 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:"RTCPeerConnectionIceEvent"): RTCPeerConnectionIceEvent; - createEvent(eventInterface:"RTCSsrcConflictEvent"): RTCSsrcConflictEvent; - createEvent(eventInterface:"SVGZoomEvent"): SVGZoomEvent; - createEvent(eventInterface:"SVGZoomEvents"): SVGZoomEvent; - createEvent(eventInterface:"ScriptNotifyEvent"): ScriptNotifyEvent; - createEvent(eventInterface:"ServiceWorkerMessageEvent"): ServiceWorkerMessageEvent; - createEvent(eventInterface:"SpeechSynthesisEvent"): SpeechSynthesisEvent; - createEvent(eventInterface:"StorageEvent"): StorageEvent; - createEvent(eventInterface:"TextEvent"): TextEvent; - createEvent(eventInterface:"TouchEvent"): TouchEvent; - createEvent(eventInterface:"TrackEvent"): TrackEvent; - createEvent(eventInterface:"TransitionEvent"): TransitionEvent; - createEvent(eventInterface:"UIEvent"): UIEvent; - createEvent(eventInterface:"UIEvents"): UIEvent; - createEvent(eventInterface:"UnviewableContentIdentifiedEvent"): UnviewableContentIdentifiedEvent; - createEvent(eventInterface:"WebGLContextEvent"): WebGLContextEvent; - createEvent(eventInterface:"WheelEvent"): WheelEvent; - createEvent(eventInterface: string): Event; -} - interface ElementTraversal { readonly childElementCount: number; readonly firstElementChild: Element | null; @@ -13632,16 +13639,16 @@ interface GlobalFetch { interface HTMLTableAlignment { /** - * Sets or retrieves a value that you can use to implement your own ch functionality for the object. - */ + * Sets or retrieves a value that you can use to implement your own ch functionality for the object. + */ ch: string; /** - * Sets or retrieves a value that you can use to implement your own chOff functionality for the object. - */ + * Sets or retrieves a value that you can use to implement your own chOff functionality for the object. + */ chOff: string; /** - * Sets or retrieves how text and other content are vertically aligned within the object that contains them. - */ + * Sets or retrieves how text and other content are vertically aligned within the object that contains them. + */ vAlign: string; } @@ -13866,38 +13873,38 @@ interface ImageBitmap { interface URLSearchParams { /** - * Appends a specified key/value pair as a new search parameter. - */ + * Appends a specified key/value pair as a new search parameter. + */ append(name: string, value: string): void; /** - * Deletes the given search parameter, and its associated value, from the list of all search parameters. - */ + * Deletes the given search parameter, and its associated value, from the list of all search parameters. + */ delete(name: string): void; /** - * Returns the first value associated to the given search parameter. - */ + * Returns the first value associated to the given search parameter. + */ get(name: string): string | null; /** - * Returns all the values association with a given search parameter. - */ + * Returns all the values association with a given search parameter. + */ getAll(name: string): string[]; /** - * Returns a Boolean indicating if such a search parameter exists. - */ + * Returns a Boolean indicating if such a search parameter exists. + */ has(name: string): boolean; /** - * Sets the value associated to a given search parameter to the given value. If there were several values, delete the others. - */ + * Sets the value associated to a given search parameter to the given value. If there were several values, delete the others. + */ set(name: string, value: string): void; } declare var URLSearchParams: { prototype: URLSearchParams; /** - * Constructor returning a URLSearchParams object. - */ + * Constructor returning a URLSearchParams object. + */ new (init?: string | URLSearchParams): URLSearchParams; -} +}; interface NodeListOf extends NodeList { length: number; @@ -14145,7 +14152,7 @@ interface ShadowRoot extends DocumentOrShadowRoot, DocumentFragment { } interface ShadowRootInit { - mode: 'open'|'closed'; + mode: "open" | "closed"; delegatesFocus?: boolean; } @@ -14195,8 +14202,50 @@ interface TouchEventInit extends EventModifierInit { declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject; +interface DecodeErrorCallback { + (error: DOMException): void; +} +interface DecodeSuccessCallback { + (decodedData: AudioBuffer): void; +} interface ErrorEventHandler { - (message: string, filename?: string, lineno?: number, colno?: number, error?:Error): void; + (message: string, filename?: string, lineno?: number, colno?: number, error?: Error): void; +} +interface ForEachCallback { + (keyId: any, status: MediaKeyStatus): void; +} +interface FrameRequestCallback { + (time: number): void; +} +interface FunctionStringCallback { + (data: string): void; +} +interface IntersectionObserverCallback { + (entries: IntersectionObserverEntry[], observer: IntersectionObserver): void; +} +interface MediaQueryListListener { + (mql: MediaQueryList): void; +} +interface MSExecAtPriorityFunctionCallback { + (...args: any[]): any; +} +interface MSLaunchUriCallback { + (): void; +} +interface MSUnsafeFunctionCallback { + (): any; +} +interface MutationCallback { + (mutations: MutationRecord[], observer: MutationObserver): void; +} +interface NavigatorUserMediaErrorCallback { + (error: MediaStreamError): void; +} +interface NavigatorUserMediaSuccessCallback { + (stream: MediaStream): void; +} +interface NotificationPermissionCallback { + (permission: NotificationPermission): void; } interface PositionCallback { (position: Position): void; @@ -14204,59 +14253,17 @@ interface PositionCallback { interface PositionErrorCallback { (error: PositionError): void; } -interface MediaQueryListListener { - (mql: MediaQueryList): void; -} -interface MSLaunchUriCallback { - (): void; -} -interface FrameRequestCallback { - (time: number): void; -} -interface MSUnsafeFunctionCallback { - (): any; -} -interface MSExecAtPriorityFunctionCallback { - (...args: any[]): any; -} -interface MutationCallback { - (mutations: MutationRecord[], observer: MutationObserver): void; -} -interface DecodeSuccessCallback { - (decodedData: AudioBuffer): void; -} -interface DecodeErrorCallback { - (error: DOMException): void; -} -interface VoidFunction { - (): void; +interface RTCPeerConnectionErrorCallback { + (error: DOMError): void; } interface RTCSessionDescriptionCallback { (sdp: RTCSessionDescription): void; } -interface RTCPeerConnectionErrorCallback { - (error: DOMError): void; -} interface RTCStatsCallback { (report: RTCStatsReport): void; } -interface FunctionStringCallback { - (data: string): void; -} -interface NavigatorUserMediaSuccessCallback { - (stream: MediaStream): void; -} -interface NavigatorUserMediaErrorCallback { - (error: MediaStreamError): void; -} -interface ForEachCallback { - (keyId: any, status: MediaKeyStatus): void; -} -interface NotificationPermissionCallback { - (permission: NotificationPermission): void; -} -interface IntersectionObserverCallback { - (entries: IntersectionObserverEntry[], observer: IntersectionObserver): void; +interface VoidFunction { + (): void; } interface HTMLElementTagNameMap { "a": HTMLAnchorElement; @@ -14344,48 +14351,27 @@ interface HTMLElementTagNameMap { "xmp": HTMLPreElement; } -interface ElementTagNameMap { - "a": HTMLAnchorElement; +interface ElementTagNameMap extends HTMLElementTagNameMap { "abbr": HTMLElement; "acronym": HTMLElement; "address": HTMLElement; - "applet": HTMLAppletElement; - "area": HTMLAreaElement; "article": HTMLElement; "aside": HTMLElement; - "audio": HTMLAudioElement; "b": HTMLElement; - "base": HTMLBaseElement; - "basefont": HTMLBaseFontElement; "bdo": HTMLElement; "big": HTMLElement; - "blockquote": HTMLQuoteElement; - "body": HTMLBodyElement; - "br": HTMLBRElement; - "button": HTMLButtonElement; - "canvas": HTMLCanvasElement; - "caption": HTMLTableCaptionElement; "center": HTMLElement; "circle": SVGCircleElement; "cite": HTMLElement; "clippath": SVGClipPathElement; "code": HTMLElement; - "col": HTMLTableColElement; - "colgroup": HTMLTableColElement; - "data": HTMLDataElement; - "datalist": HTMLDataListElement; "dd": HTMLElement; "defs": SVGDefsElement; - "del": HTMLModElement; "desc": SVGDescElement; "dfn": HTMLElement; - "dir": HTMLDirectoryElement; - "div": HTMLDivElement; - "dl": HTMLDListElement; "dt": HTMLElement; "ellipse": SVGEllipseElement; "em": HTMLElement; - "embed": HTMLEmbedElement; "feblend": SVGFEBlendElement; "fecolormatrix": SVGFEColorMatrixElement; "fecomponenttransfer": SVGFEComponentTransferElement; @@ -14410,307 +14396,67 @@ interface ElementTagNameMap { "fespotlight": SVGFESpotLightElement; "fetile": SVGFETileElement; "feturbulence": SVGFETurbulenceElement; - "fieldset": HTMLFieldSetElement; "figcaption": HTMLElement; "figure": HTMLElement; "filter": SVGFilterElement; - "font": HTMLFontElement; "footer": HTMLElement; "foreignobject": SVGForeignObjectElement; - "form": HTMLFormElement; - "frame": HTMLFrameElement; - "frameset": HTMLFrameSetElement; "g": SVGGElement; - "h1": HTMLHeadingElement; - "h2": HTMLHeadingElement; - "h3": HTMLHeadingElement; - "h4": HTMLHeadingElement; - "h5": HTMLHeadingElement; - "h6": HTMLHeadingElement; - "head": HTMLHeadElement; "header": HTMLElement; "hgroup": HTMLElement; - "hr": HTMLHRElement; - "html": HTMLHtmlElement; "i": HTMLElement; - "iframe": HTMLIFrameElement; "image": SVGImageElement; - "img": HTMLImageElement; - "input": HTMLInputElement; - "ins": HTMLModElement; - "isindex": HTMLUnknownElement; "kbd": HTMLElement; "keygen": HTMLElement; - "label": HTMLLabelElement; - "legend": HTMLLegendElement; - "li": HTMLLIElement; "line": SVGLineElement; "lineargradient": SVGLinearGradientElement; - "link": HTMLLinkElement; - "listing": HTMLPreElement; - "map": HTMLMapElement; "mark": HTMLElement; "marker": SVGMarkerElement; - "marquee": HTMLMarqueeElement; "mask": SVGMaskElement; - "menu": HTMLMenuElement; - "meta": HTMLMetaElement; "metadata": SVGMetadataElement; - "meter": HTMLMeterElement; "nav": HTMLElement; - "nextid": HTMLUnknownElement; "nobr": HTMLElement; "noframes": HTMLElement; "noscript": HTMLElement; - "object": HTMLObjectElement; - "ol": HTMLOListElement; - "optgroup": HTMLOptGroupElement; - "option": HTMLOptionElement; - "output": HTMLOutputElement; - "p": HTMLParagraphElement; - "param": HTMLParamElement; "path": SVGPathElement; "pattern": SVGPatternElement; - "picture": HTMLPictureElement; "plaintext": HTMLElement; "polygon": SVGPolygonElement; "polyline": SVGPolylineElement; - "pre": HTMLPreElement; - "progress": HTMLProgressElement; - "q": HTMLQuoteElement; "radialgradient": SVGRadialGradientElement; "rect": SVGRectElement; "rt": HTMLElement; "ruby": HTMLElement; "s": HTMLElement; "samp": HTMLElement; - "script": HTMLScriptElement; "section": HTMLElement; - "select": HTMLSelectElement; "small": HTMLElement; - "source": HTMLSourceElement; - "span": HTMLSpanElement; "stop": SVGStopElement; "strike": HTMLElement; "strong": HTMLElement; - "style": HTMLStyleElement; "sub": HTMLElement; "sup": HTMLElement; "svg": SVGSVGElement; "switch": SVGSwitchElement; "symbol": SVGSymbolElement; - "table": HTMLTableElement; - "tbody": HTMLTableSectionElement; - "td": HTMLTableDataCellElement; - "template": HTMLTemplateElement; "text": SVGTextElement; "textpath": SVGTextPathElement; - "textarea": HTMLTextAreaElement; - "tfoot": HTMLTableSectionElement; - "th": HTMLTableHeaderCellElement; - "thead": HTMLTableSectionElement; - "time": HTMLTimeElement; - "title": HTMLTitleElement; - "tr": HTMLTableRowElement; - "track": HTMLTrackElement; "tspan": SVGTSpanElement; "tt": HTMLElement; "u": HTMLElement; - "ul": HTMLUListElement; "use": SVGUseElement; "var": HTMLElement; - "video": HTMLVideoElement; "view": SVGViewElement; "wbr": HTMLElement; - "x-ms-webview": MSHTMLWebViewElement; - "xmp": HTMLPreElement; } -interface ElementListTagNameMap { - "a": NodeListOf; - "abbr": NodeListOf; - "acronym": NodeListOf; - "address": NodeListOf; - "applet": NodeListOf; - "area": NodeListOf; - "article": NodeListOf; - "aside": NodeListOf; - "audio": NodeListOf; - "b": NodeListOf; - "base": NodeListOf; - "basefont": NodeListOf; - "bdo": NodeListOf; - "big": NodeListOf; - "blockquote": NodeListOf; - "body": NodeListOf; - "br": NodeListOf; - "button": NodeListOf; - "canvas": NodeListOf; - "caption": NodeListOf; - "center": NodeListOf; - "circle": NodeListOf; - "cite": NodeListOf; - "clippath": NodeListOf; - "code": NodeListOf; - "col": NodeListOf; - "colgroup": NodeListOf; - "data": NodeListOf; - "datalist": NodeListOf; - "dd": NodeListOf; - "defs": NodeListOf; - "del": NodeListOf; - "desc": NodeListOf; - "dfn": NodeListOf; - "dir": NodeListOf; - "div": NodeListOf; - "dl": NodeListOf; - "dt": NodeListOf; - "ellipse": NodeListOf; - "em": NodeListOf; - "embed": NodeListOf; - "feblend": NodeListOf; - "fecolormatrix": NodeListOf; - "fecomponenttransfer": NodeListOf; - "fecomposite": NodeListOf; - "feconvolvematrix": NodeListOf; - "fediffuselighting": NodeListOf; - "fedisplacementmap": NodeListOf; - "fedistantlight": NodeListOf; - "feflood": NodeListOf; - "fefunca": NodeListOf; - "fefuncb": NodeListOf; - "fefuncg": NodeListOf; - "fefuncr": NodeListOf; - "fegaussianblur": NodeListOf; - "feimage": NodeListOf; - "femerge": NodeListOf; - "femergenode": NodeListOf; - "femorphology": NodeListOf; - "feoffset": NodeListOf; - "fepointlight": NodeListOf; - "fespecularlighting": NodeListOf; - "fespotlight": NodeListOf; - "fetile": NodeListOf; - "feturbulence": NodeListOf; - "fieldset": NodeListOf; - "figcaption": NodeListOf; - "figure": NodeListOf; - "filter": NodeListOf; - "font": NodeListOf; - "footer": NodeListOf; - "foreignobject": NodeListOf; - "form": NodeListOf; - "frame": NodeListOf; - "frameset": NodeListOf; - "g": NodeListOf; - "h1": NodeListOf; - "h2": NodeListOf; - "h3": NodeListOf; - "h4": NodeListOf; - "h5": NodeListOf; - "h6": NodeListOf; - "head": NodeListOf; - "header": NodeListOf; - "hgroup": NodeListOf; - "hr": NodeListOf; - "html": NodeListOf; - "i": NodeListOf; - "iframe": NodeListOf; - "image": NodeListOf; - "img": NodeListOf; - "input": NodeListOf; - "ins": NodeListOf; - "isindex": NodeListOf; - "kbd": NodeListOf; - "keygen": NodeListOf; - "label": NodeListOf; - "legend": NodeListOf; - "li": NodeListOf; - "line": NodeListOf; - "lineargradient": NodeListOf; - "link": NodeListOf; - "listing": NodeListOf; - "map": NodeListOf; - "mark": NodeListOf; - "marker": NodeListOf; - "marquee": NodeListOf; - "mask": NodeListOf; - "menu": NodeListOf; - "meta": NodeListOf; - "metadata": NodeListOf; - "meter": NodeListOf; - "nav": NodeListOf; - "nextid": NodeListOf; - "nobr": NodeListOf; - "noframes": NodeListOf; - "noscript": NodeListOf; - "object": NodeListOf; - "ol": NodeListOf; - "optgroup": NodeListOf; - "option": NodeListOf; - "output": NodeListOf; - "p": NodeListOf; - "param": NodeListOf; - "path": NodeListOf; - "pattern": NodeListOf; - "picture": NodeListOf; - "plaintext": NodeListOf; - "polygon": NodeListOf; - "polyline": NodeListOf; - "pre": NodeListOf; - "progress": NodeListOf; - "q": NodeListOf; - "radialgradient": NodeListOf; - "rect": NodeListOf; - "rt": NodeListOf; - "ruby": NodeListOf; - "s": NodeListOf; - "samp": NodeListOf; - "script": NodeListOf; - "section": NodeListOf; - "select": NodeListOf; - "small": NodeListOf; - "source": NodeListOf; - "span": NodeListOf; - "stop": NodeListOf; - "strike": NodeListOf; - "strong": NodeListOf; - "style": NodeListOf; - "sub": NodeListOf; - "sup": NodeListOf; - "svg": NodeListOf; - "switch": NodeListOf; - "symbol": NodeListOf; - "table": NodeListOf; - "tbody": NodeListOf; - "td": NodeListOf; - "template": NodeListOf; - "text": NodeListOf; - "textpath": NodeListOf; - "textarea": NodeListOf; - "tfoot": NodeListOf; - "th": NodeListOf; - "thead": NodeListOf; - "time": NodeListOf; - "title": NodeListOf; - "tr": NodeListOf; - "track": NodeListOf; - "tspan": NodeListOf; - "tt": NodeListOf; - "u": NodeListOf; - "ul": NodeListOf; - "use": NodeListOf; - "var": NodeListOf; - "video": NodeListOf; - "view": NodeListOf; - "wbr": NodeListOf; - "x-ms-webview": NodeListOf; - "xmp": NodeListOf; -} +type ElementListTagNameMap = { + [key in keyof ElementTagNameMap]: NodeListOf +}; -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 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 applicationCache: ApplicationCache; declare var caches: CacheStorage; declare var clientInformation: Navigator; @@ -14718,8 +14464,8 @@ declare var closed: boolean; declare var crypto: Crypto; declare var defaultStatus: string; declare var devicePixelRatio: number; -declare var doNotTrack: string; declare var document: Document; +declare var doNotTrack: string; declare var event: Event | undefined; declare var external: External; declare var frameElement: Element; @@ -14842,9 +14588,9 @@ declare var screenLeft: number; declare var screenTop: number; declare var screenX: number; declare var screenY: number; +declare var scrollbars: BarProp; declare var scrollX: number; declare var scrollY: number; -declare var scrollbars: BarProp; declare var self: Window; declare var speechSynthesis: SpeechSynthesis; declare var status: string; @@ -14963,6 +14709,7 @@ type BufferSource = ArrayBuffer | ArrayBufferView; type MouseWheelEvent = WheelEvent; type ScrollRestoration = "auto" | "manual"; type FormDataEntryValue = string | File; +type InsertPosition = "beforebegin" | "afterbegin" | "beforeend" | "afterend"; type AppendMode = "segments" | "sequence"; type AudioContextState = "suspended" | "running" | "closed"; type BiquadFilterType = "lowpass" | "highpass" | "bandpass" | "lowshelf" | "highshelf" | "peaking" | "notch" | "allpass"; @@ -14976,6 +14723,12 @@ type IDBCursorDirection = "next" | "nextunique" | "prev" | "prevunique"; type IDBRequestReadyState = "pending" | "done"; type IDBTransactionMode = "readonly" | "readwrite" | "versionchange"; type ListeningState = "inactive" | "active" | "disambiguation"; +type MediaDeviceKind = "audioinput" | "audiooutput" | "videoinput"; +type MediaKeyMessageType = "license-request" | "license-renewal" | "license-release" | "individualization-request"; +type MediaKeySessionType = "temporary" | "persistent-license" | "persistent-release-message"; +type MediaKeysRequirement = "required" | "optional" | "not-allowed"; +type MediaKeyStatus = "usable" | "expired" | "output-downscaled" | "output-not-allowed" | "status-pending" | "internal-error"; +type MediaStreamTrackState = "live" | "ended"; type MSCredentialType = "FIDO_2_0"; type MSIceAddrType = "os" | "stun" | "turn" | "peer-derived"; type MSIceType = "failed" | "direct" | "relay"; @@ -14983,12 +14736,6 @@ type MSStatsType = "description" | "localclientevent" | "inbound-network" | "out type MSTransportType = "Embedded" | "USB" | "NFC" | "BT"; type MSWebViewPermissionState = "unknown" | "defer" | "allow" | "deny"; type MSWebViewPermissionType = "geolocation" | "unlimitedIndexedDBQuota" | "media" | "pointerlock" | "webnotifications"; -type MediaDeviceKind = "audioinput" | "audiooutput" | "videoinput"; -type MediaKeyMessageType = "license-request" | "license-renewal" | "license-release" | "individualization-request"; -type MediaKeySessionType = "temporary" | "persistent-license" | "persistent-release-message"; -type MediaKeyStatus = "usable" | "expired" | "output-downscaled" | "output-not-allowed" | "status-pending" | "internal-error"; -type MediaKeysRequirement = "required" | "optional" | "not-allowed"; -type MediaStreamTrackState = "live" | "ended"; type NavigationReason = "up" | "down" | "left" | "right"; type NavigationType = "navigate" | "reload" | "back_forward" | "prerender"; type NotificationDirection = "auto" | "ltr" | "rtl"; @@ -15000,6 +14747,14 @@ type PaymentComplete = "success" | "fail" | ""; type PaymentShippingType = "shipping" | "delivery" | "pickup"; type PushEncryptionKeyName = "p256dh" | "auth"; type PushPermissionState = "granted" | "denied" | "prompt"; +type ReferrerPolicy = "" | "no-referrer" | "no-referrer-when-downgrade" | "origin-only" | "origin-when-cross-origin" | "unsafe-url"; +type RequestCache = "default" | "no-store" | "reload" | "no-cache" | "force-cache"; +type RequestCredentials = "omit" | "same-origin" | "include"; +type RequestDestination = "" | "document" | "sharedworker" | "subresource" | "unknown" | "worker"; +type RequestMode = "navigate" | "same-origin" | "no-cors" | "cors"; +type RequestRedirect = "follow" | "error" | "manual"; +type RequestType = "" | "audio" | "font" | "image" | "script" | "style" | "track" | "video"; +type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect"; type RTCBundlePolicy = "balanced" | "max-compat" | "max-bundle"; type RTCDegradationPreference = "maintain-framerate" | "maintain-resolution" | "balanced"; type RTCDtlsRole = "auto" | "client" | "server"; @@ -15007,9 +14762,9 @@ type RTCDtlsTransportState = "new" | "connecting" | "connected" | "closed"; type RTCIceCandidateType = "host" | "srflx" | "prflx" | "relay"; type RTCIceComponent = "RTP" | "RTCP"; type RTCIceConnectionState = "new" | "checking" | "connected" | "completed" | "failed" | "disconnected" | "closed"; -type RTCIceGatherPolicy = "all" | "nohost" | "relay"; type RTCIceGathererState = "new" | "gathering" | "complete"; type RTCIceGatheringState = "new" | "gathering" | "complete"; +type RTCIceGatherPolicy = "all" | "nohost" | "relay"; type RTCIceProtocol = "udp" | "tcp"; type RTCIceRole = "controlling" | "controlled"; type RTCIceTcpCandidateType = "active" | "passive" | "so"; @@ -15020,14 +14775,6 @@ type RTCSignalingState = "stable" | "have-local-offer" | "have-remote-offer" | " type RTCStatsIceCandidatePairState = "frozen" | "waiting" | "inprogress" | "failed" | "succeeded" | "cancelled"; type RTCStatsIceCandidateType = "host" | "serverreflexive" | "peerreflexive" | "relayed"; type RTCStatsType = "inboundrtp" | "outboundrtp" | "session" | "datachannel" | "track" | "transport" | "candidatepair" | "localcandidate" | "remotecandidate"; -type ReferrerPolicy = "" | "no-referrer" | "no-referrer-when-downgrade" | "origin-only" | "origin-when-cross-origin" | "unsafe-url"; -type RequestCache = "default" | "no-store" | "reload" | "no-cache" | "force-cache"; -type RequestCredentials = "omit" | "same-origin" | "include"; -type RequestDestination = "" | "document" | "sharedworker" | "subresource" | "unknown" | "worker"; -type RequestMode = "navigate" | "same-origin" | "no-cors" | "cors"; -type RequestRedirect = "follow" | "error" | "manual"; -type RequestType = "" | "audio" | "font" | "image" | "script" | "style" | "track" | "video"; -type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect"; type ScopedCredentialType = "ScopedCred"; type ServiceWorkerState = "installing" | "installed" | "activating" | "activated" | "redundant"; type Transport = "usb" | "nfc" | "ble"; diff --git a/src/lib/webworker.generated.d.ts b/src/lib/webworker.generated.d.ts index 62d6d2d67a7..ba358d6402b 100644 --- a/src/lib/webworker.generated.d.ts +++ b/src/lib/webworker.generated.d.ts @@ -1,6 +1,6 @@ ///////////////////////////// -/// IE Worker APIs +/// Worker APIs ///////////////////////////// interface Algorithm { @@ -8,16 +8,16 @@ interface Algorithm { } interface CacheQueryOptions { - ignoreSearch?: boolean; - ignoreMethod?: boolean; - ignoreVary?: boolean; cacheName?: string; + ignoreMethod?: boolean; + ignoreSearch?: boolean; + ignoreVary?: boolean; } interface CloseEventInit extends EventInit { - wasClean?: boolean; code?: number; reason?: string; + wasClean?: boolean; } interface EventInit { @@ -49,16 +49,16 @@ interface MessageEventInit extends EventInit { channel?: string; data?: any; origin?: string; - source?: any; ports?: MessagePort[]; + source?: any; } interface NotificationOptions { - dir?: NotificationDirection; - lang?: string; body?: string; - tag?: string; + dir?: NotificationDirection; icon?: string; + lang?: string; + tag?: string; } interface ObjectURLOptions { @@ -66,29 +66,29 @@ interface ObjectURLOptions { } interface PushSubscriptionOptionsInit { - userVisibleOnly?: boolean; applicationServerKey?: any; + userVisibleOnly?: boolean; } interface RequestInit { - method?: string; - headers?: any; body?: any; - referrer?: string; - referrerPolicy?: ReferrerPolicy; - mode?: RequestMode; - credentials?: RequestCredentials; cache?: RequestCache; - redirect?: RequestRedirect; + credentials?: RequestCredentials; + headers?: any; integrity?: string; keepalive?: boolean; + method?: string; + mode?: RequestMode; + redirect?: RequestRedirect; + referrer?: string; + referrerPolicy?: ReferrerPolicy; window?: any; } interface ResponseInit { + headers?: any; status?: number; statusText?: string; - headers?: any; } interface ClientQueryOptions { @@ -156,7 +156,7 @@ interface AudioBuffer { declare var AudioBuffer: { prototype: AudioBuffer; new(): AudioBuffer; -} +}; interface Blob { readonly size: number; @@ -169,7 +169,7 @@ interface Blob { declare var Blob: { prototype: Blob; new (blobParts?: any[], options?: BlobPropertyBag): Blob; -} +}; interface Cache { add(request: RequestInfo): Promise; @@ -184,7 +184,7 @@ interface Cache { declare var Cache: { prototype: Cache; new(): Cache; -} +}; interface CacheStorage { delete(cacheName: string): Promise; @@ -197,7 +197,7 @@ interface CacheStorage { declare var CacheStorage: { prototype: CacheStorage; new(): CacheStorage; -} +}; interface CloseEvent extends Event { readonly code: number; @@ -209,7 +209,7 @@ interface CloseEvent extends Event { declare var CloseEvent: { prototype: CloseEvent; new(typeArg: string, eventInitDict?: CloseEventInit): CloseEvent; -} +}; interface Console { assert(test?: boolean, message?: string, ...optionalParams: any[]): void; @@ -220,8 +220,8 @@ interface Console { dirxml(value: any): void; error(message?: any, ...optionalParams: any[]): void; exception(message?: string, ...optionalParams: any[]): void; - group(groupTitle?: string): void; - groupCollapsed(groupTitle?: string): void; + group(groupTitle?: string, ...optionalParams: any[]): void; + groupCollapsed(groupTitle?: string, ...optionalParams: any[]): void; groupEnd(): void; info(message?: any, ...optionalParams: any[]): void; log(message?: any, ...optionalParams: any[]): void; @@ -239,7 +239,7 @@ interface Console { declare var Console: { prototype: Console; new(): Console; -} +}; interface Coordinates { readonly accuracy: number; @@ -254,7 +254,7 @@ interface Coordinates { declare var Coordinates: { prototype: Coordinates; new(): Coordinates; -} +}; interface CryptoKey { readonly algorithm: KeyAlgorithm; @@ -266,7 +266,7 @@ interface CryptoKey { declare var CryptoKey: { prototype: CryptoKey; new(): CryptoKey; -} +}; interface DOMError { readonly name: string; @@ -276,7 +276,7 @@ interface DOMError { declare var DOMError: { prototype: DOMError; new(): DOMError; -} +}; interface DOMException { readonly code: number; @@ -296,10 +296,10 @@ interface DOMException { 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 NOT_FOUND_ERR: number; + readonly NOT_SUPPORTED_ERR: number; readonly PARSE_ERR: number; readonly QUOTA_EXCEEDED_ERR: number; readonly SECURITY_ERR: number; @@ -328,10 +328,10 @@ declare var DOMException: { 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 NOT_FOUND_ERR: number; + readonly NOT_SUPPORTED_ERR: number; readonly PARSE_ERR: number; readonly QUOTA_EXCEEDED_ERR: number; readonly SECURITY_ERR: number; @@ -342,7 +342,7 @@ declare var DOMException: { readonly URL_MISMATCH_ERR: number; readonly VALIDATION_ERR: number; readonly WRONG_DOCUMENT_ERR: number; -} +}; interface DOMStringList { readonly length: number; @@ -354,7 +354,7 @@ interface DOMStringList { declare var DOMStringList: { prototype: DOMStringList; new(): DOMStringList; -} +}; interface ErrorEvent extends Event { readonly colno: number; @@ -368,12 +368,12 @@ interface ErrorEvent extends Event { declare var ErrorEvent: { prototype: ErrorEvent; new(type: string, errorEventInitDict?: ErrorEventInit): ErrorEvent; -} +}; interface Event { readonly bubbles: boolean; - cancelBubble: boolean; readonly cancelable: boolean; + cancelBubble: boolean; readonly currentTarget: EventTarget; readonly defaultPrevented: boolean; readonly eventPhase: number; @@ -400,7 +400,7 @@ declare var Event: { readonly AT_TARGET: number; readonly BUBBLING_PHASE: number; readonly CAPTURING_PHASE: number; -} +}; interface EventTarget { addEventListener(type: string, listener?: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; @@ -411,7 +411,7 @@ interface EventTarget { declare var EventTarget: { prototype: EventTarget; new(): EventTarget; -} +}; interface File extends Blob { readonly lastModifiedDate: any; @@ -422,7 +422,7 @@ interface File extends Blob { declare var File: { prototype: File; new (parts: (ArrayBuffer | ArrayBufferView | Blob | string)[], filename: string, properties?: FilePropertyBag): File; -} +}; interface FileList { readonly length: number; @@ -433,7 +433,7 @@ interface FileList { declare var FileList: { prototype: FileList; new(): FileList; -} +}; interface FileReader extends EventTarget, MSBaseReader { readonly error: DOMError; @@ -448,8 +448,17 @@ interface FileReader extends EventTarget, MSBaseReader { declare var FileReader: { prototype: FileReader; new(): FileReader; +}; + +interface FormData { + append(name: string, value: string | Blob, fileName?: string): void; } +declare var FormData: { + prototype: FormData; + new(): FormData; +}; + interface Headers { append(name: string, value: string): void; delete(name: string): void; @@ -462,7 +471,7 @@ interface Headers { declare var Headers: { prototype: Headers; new(init?: any): Headers; -} +}; interface IDBCursor { readonly direction: IDBCursorDirection; @@ -486,7 +495,7 @@ declare var IDBCursor: { readonly NEXT_NO_DUPLICATE: string; readonly PREV: string; readonly PREV_NO_DUPLICATE: string; -} +}; interface IDBCursorWithValue extends IDBCursor { readonly value: any; @@ -495,7 +504,7 @@ interface IDBCursorWithValue extends IDBCursor { declare var IDBCursorWithValue: { prototype: IDBCursorWithValue; new(): IDBCursorWithValue; -} +}; interface IDBDatabaseEventMap { "abort": Event; @@ -512,7 +521,7 @@ interface IDBDatabase extends EventTarget { close(): void; createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore; deleteObjectStore(name: string): void; - transaction(storeNames: string | string[], mode?: string): IDBTransaction; + transaction(storeNames: string | string[], mode?: IDBTransactionMode): IDBTransaction; addEventListener(type: "versionchange", listener: (ev: IDBVersionChangeEvent) => any, useCapture?: boolean): void; addEventListener(type: K, listener: (this: IDBDatabase, ev: IDBDatabaseEventMap[K]) => any, useCapture?: boolean): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, useCapture?: boolean): void; @@ -521,7 +530,7 @@ interface IDBDatabase extends EventTarget { declare var IDBDatabase: { prototype: IDBDatabase; new(): IDBDatabase; -} +}; interface IDBFactory { cmp(first: any, second: any): number; @@ -532,7 +541,7 @@ interface IDBFactory { declare var IDBFactory: { prototype: IDBFactory; new(): IDBFactory; -} +}; interface IDBIndex { keyPath: string | string[]; @@ -543,14 +552,14 @@ interface IDBIndex { 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; + openCursor(range?: IDBKeyRange | IDBValidKey, direction?: IDBCursorDirection): IDBRequest; + openKeyCursor(range?: IDBKeyRange | IDBValidKey, direction?: IDBCursorDirection): IDBRequest; } declare var IDBIndex: { prototype: IDBIndex; new(): IDBIndex; -} +}; interface IDBKeyRange { readonly lower: any; @@ -566,7 +575,7 @@ declare var IDBKeyRange: { lowerBound(lower: any, open?: boolean): IDBKeyRange; only(value: any): IDBKeyRange; upperBound(upper: any, open?: boolean): IDBKeyRange; -} +}; interface IDBObjectStore { readonly indexNames: DOMStringList; @@ -582,14 +591,14 @@ interface IDBObjectStore { deleteIndex(indexName: string): void; get(key: any): IDBRequest; index(name: string): IDBIndex; - openCursor(range?: IDBKeyRange | IDBValidKey, direction?: string): IDBRequest; + openCursor(range?: IDBKeyRange | IDBValidKey, direction?: IDBCursorDirection): IDBRequest; put(value: any, key?: IDBKeyRange | IDBValidKey): IDBRequest; } declare var IDBObjectStore: { prototype: IDBObjectStore; new(): IDBObjectStore; -} +}; interface IDBOpenDBRequestEventMap extends IDBRequestEventMap { "blocked": Event; @@ -606,7 +615,7 @@ interface IDBOpenDBRequest extends IDBRequest { declare var IDBOpenDBRequest: { prototype: IDBOpenDBRequest; new(): IDBOpenDBRequest; -} +}; interface IDBRequestEventMap { "error": Event; @@ -614,7 +623,7 @@ interface IDBRequestEventMap { } interface IDBRequest extends EventTarget { - readonly error: DOMError; + readonly error: DOMException; onerror: (this: IDBRequest, ev: Event) => any; onsuccess: (this: IDBRequest, ev: Event) => any; readonly readyState: IDBRequestReadyState; @@ -628,7 +637,7 @@ interface IDBRequest extends EventTarget { declare var IDBRequest: { prototype: IDBRequest; new(): IDBRequest; -} +}; interface IDBTransactionEventMap { "abort": Event; @@ -638,7 +647,7 @@ interface IDBTransactionEventMap { interface IDBTransaction extends EventTarget { readonly db: IDBDatabase; - readonly error: DOMError; + readonly error: DOMException; readonly mode: IDBTransactionMode; onabort: (this: IDBTransaction, ev: Event) => any; oncomplete: (this: IDBTransaction, ev: Event) => any; @@ -658,7 +667,7 @@ declare var IDBTransaction: { readonly READ_ONLY: string; readonly READ_WRITE: string; readonly VERSION_CHANGE: string; -} +}; interface IDBVersionChangeEvent extends Event { readonly newVersion: number | null; @@ -668,7 +677,7 @@ interface IDBVersionChangeEvent extends Event { declare var IDBVersionChangeEvent: { prototype: IDBVersionChangeEvent; new(): IDBVersionChangeEvent; -} +}; interface ImageData { data: Uint8ClampedArray; @@ -680,7 +689,7 @@ declare var ImageData: { prototype: ImageData; new(width: number, height: number): ImageData; new(array: Uint8ClampedArray, width: number, height: number): ImageData; -} +}; interface MessageChannel { readonly port1: MessagePort; @@ -690,7 +699,7 @@ interface MessageChannel { declare var MessageChannel: { prototype: MessageChannel; new(): MessageChannel; -} +}; interface MessageEvent extends Event { readonly data: any; @@ -703,7 +712,7 @@ interface MessageEvent extends Event { declare var MessageEvent: { prototype: MessageEvent; new(type: string, eventInitDict?: MessageEventInit): MessageEvent; -} +}; interface MessagePortEventMap { "message": MessageEvent; @@ -721,7 +730,7 @@ interface MessagePort extends EventTarget { declare var MessagePort: { prototype: MessagePort; new(): MessagePort; -} +}; interface NotificationEventMap { "click": Event; @@ -751,7 +760,7 @@ declare var Notification: { prototype: Notification; new(title: string, options?: NotificationOptions): Notification; requestPermission(callback?: NotificationPermissionCallback): Promise; -} +}; interface Performance { readonly navigation: PerformanceNavigation; @@ -774,7 +783,7 @@ interface Performance { declare var Performance: { prototype: Performance; new(): Performance; -} +}; interface PerformanceNavigation { readonly redirectCount: number; @@ -793,18 +802,18 @@ declare var PerformanceNavigation: { readonly TYPE_NAVIGATE: number; readonly TYPE_RELOAD: number; readonly TYPE_RESERVED: number; -} +}; interface PerformanceTiming { readonly connectEnd: number; readonly connectStart: number; + readonly domainLookupEnd: number; + readonly domainLookupStart: 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; @@ -824,7 +833,7 @@ interface PerformanceTiming { declare var PerformanceTiming: { prototype: PerformanceTiming; new(): PerformanceTiming; -} +}; interface Position { readonly coords: Coordinates; @@ -834,7 +843,7 @@ interface Position { declare var Position: { prototype: Position; new(): Position; -} +}; interface PositionError { readonly code: number; @@ -851,7 +860,7 @@ declare var PositionError: { readonly PERMISSION_DENIED: number; readonly POSITION_UNAVAILABLE: number; readonly TIMEOUT: number; -} +}; interface ProgressEvent extends Event { readonly lengthComputable: boolean; @@ -863,7 +872,7 @@ interface ProgressEvent extends Event { declare var ProgressEvent: { prototype: ProgressEvent; new(type: string, eventInitDict?: ProgressEventInit): ProgressEvent; -} +}; interface PushManager { getSubscription(): Promise; @@ -874,7 +883,7 @@ interface PushManager { declare var PushManager: { prototype: PushManager; new(): PushManager; -} +}; interface PushSubscription { readonly endpoint: USVString; @@ -887,7 +896,7 @@ interface PushSubscription { declare var PushSubscription: { prototype: PushSubscription; new(): PushSubscription; -} +}; interface PushSubscriptionOptions { readonly applicationServerKey: ArrayBuffer | null; @@ -897,7 +906,7 @@ interface PushSubscriptionOptions { declare var PushSubscriptionOptions: { prototype: PushSubscriptionOptions; new(): PushSubscriptionOptions; -} +}; interface ReadableStream { readonly locked: boolean; @@ -908,7 +917,7 @@ interface ReadableStream { declare var ReadableStream: { prototype: ReadableStream; new(): ReadableStream; -} +}; interface ReadableStreamReader { cancel(): Promise; @@ -919,7 +928,7 @@ interface ReadableStreamReader { declare var ReadableStreamReader: { prototype: ReadableStreamReader; new(): ReadableStreamReader; -} +}; interface Request extends Object, Body { readonly cache: RequestCache; @@ -941,7 +950,7 @@ interface Request extends Object, Body { declare var Request: { prototype: Request; new(input: Request | string, init?: RequestInit): Request; -} +}; interface Response extends Object, Body { readonly body: ReadableStream | null; @@ -957,7 +966,9 @@ interface Response extends Object, Body { declare var Response: { prototype: Response; new(body?: any, init?: ResponseInit): Response; -} + error: () => Response; + redirect: (url: string, status?: number) => Response; +}; interface ServiceWorkerEventMap extends AbstractWorkerEventMap { "statechange": Event; @@ -975,7 +986,7 @@ interface ServiceWorker extends EventTarget, AbstractWorker { declare var ServiceWorker: { prototype: ServiceWorker; new(): ServiceWorker; -} +}; interface ServiceWorkerRegistrationEventMap { "updatefound": Event; @@ -1000,7 +1011,7 @@ interface ServiceWorkerRegistration extends EventTarget { declare var ServiceWorkerRegistration: { prototype: ServiceWorkerRegistration; new(): ServiceWorkerRegistration; -} +}; interface SyncManager { getTags(): any; @@ -1010,7 +1021,7 @@ interface SyncManager { declare var SyncManager: { prototype: SyncManager; new(): SyncManager; -} +}; interface URL { hash: string; @@ -1033,7 +1044,7 @@ declare var URL: { new(url: string, base?: string): URL; createObjectURL(object: any, options?: ObjectURLOptions): string; revokeObjectURL(url: string): void; -} +}; interface WebSocketEventMap { "close": CloseEvent; @@ -1070,7 +1081,7 @@ declare var WebSocket: { readonly CLOSING: number; readonly CONNECTING: number; readonly OPEN: number; -} +}; interface WorkerEventMap extends AbstractWorkerEventMap { "message": MessageEvent; @@ -1087,7 +1098,7 @@ interface Worker extends EventTarget, AbstractWorker { declare var Worker: { prototype: Worker; new(stringUrl: string): Worker; -} +}; interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap { "readystatechange": Event; @@ -1133,7 +1144,7 @@ declare var XMLHttpRequest: { readonly LOADING: number; readonly OPENED: number; readonly UNSENT: number; -} +}; interface XMLHttpRequestUpload extends EventTarget, XMLHttpRequestEventTarget { addEventListener(type: K, listener: (this: XMLHttpRequestUpload, ev: XMLHttpRequestEventTargetEventMap[K]) => any, useCapture?: boolean): void; @@ -1143,7 +1154,7 @@ interface XMLHttpRequestUpload extends EventTarget, XMLHttpRequestEventTarget { declare var XMLHttpRequestUpload: { prototype: XMLHttpRequestUpload; new(): XMLHttpRequestUpload; -} +}; interface AbstractWorkerEventMap { "error": ErrorEvent; @@ -1258,7 +1269,7 @@ interface Client { declare var Client: { prototype: Client; new(): Client; -} +}; interface Clients { claim(): Promise; @@ -1270,7 +1281,7 @@ interface Clients { declare var Clients: { prototype: Clients; new(): Clients; -} +}; interface DedicatedWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap { "message": MessageEvent; @@ -1287,7 +1298,7 @@ interface DedicatedWorkerGlobalScope extends WorkerGlobalScope { declare var DedicatedWorkerGlobalScope: { prototype: DedicatedWorkerGlobalScope; new(): DedicatedWorkerGlobalScope; -} +}; interface ExtendableEvent extends Event { waitUntil(f: Promise): void; @@ -1296,7 +1307,7 @@ interface ExtendableEvent extends Event { declare var ExtendableEvent: { prototype: ExtendableEvent; new(type: string, eventInitDict?: ExtendableEventInit): ExtendableEvent; -} +}; interface ExtendableMessageEvent extends ExtendableEvent { readonly data: any; @@ -1309,7 +1320,7 @@ interface ExtendableMessageEvent extends ExtendableEvent { declare var ExtendableMessageEvent: { prototype: ExtendableMessageEvent; new(type: string, eventInitDict?: ExtendableMessageEventInit): ExtendableMessageEvent; -} +}; interface FetchEvent extends ExtendableEvent { readonly clientId: string | null; @@ -1321,7 +1332,7 @@ interface FetchEvent extends ExtendableEvent { declare var FetchEvent: { prototype: FetchEvent; new(type: string, eventInitDict: FetchEventInit): FetchEvent; -} +}; interface FileReaderSync { readAsArrayBuffer(blob: Blob): any; @@ -1333,7 +1344,7 @@ interface FileReaderSync { declare var FileReaderSync: { prototype: FileReaderSync; new(): FileReaderSync; -} +}; interface NotificationEvent extends ExtendableEvent { readonly action: string; @@ -1343,7 +1354,7 @@ interface NotificationEvent extends ExtendableEvent { declare var NotificationEvent: { prototype: NotificationEvent; new(type: string, eventInitDict: NotificationEventInit): NotificationEvent; -} +}; interface PushEvent extends ExtendableEvent { readonly data: PushMessageData | null; @@ -1352,7 +1363,7 @@ interface PushEvent extends ExtendableEvent { declare var PushEvent: { prototype: PushEvent; new(type: string, eventInitDict?: PushEventInit): PushEvent; -} +}; interface PushMessageData { arrayBuffer(): ArrayBuffer; @@ -1364,7 +1375,7 @@ interface PushMessageData { declare var PushMessageData: { prototype: PushMessageData; new(): PushMessageData; -} +}; interface ServiceWorkerGlobalScopeEventMap extends WorkerGlobalScopeEventMap { "activate": ExtendableEvent; @@ -1398,7 +1409,7 @@ interface ServiceWorkerGlobalScope extends WorkerGlobalScope { declare var ServiceWorkerGlobalScope: { prototype: ServiceWorkerGlobalScope; new(): ServiceWorkerGlobalScope; -} +}; interface SyncEvent extends ExtendableEvent { readonly lastChance: boolean; @@ -1408,7 +1419,7 @@ interface SyncEvent extends ExtendableEvent { declare var SyncEvent: { prototype: SyncEvent; new(type: string, init: SyncEventInit): SyncEvent; -} +}; interface WindowClient extends Client { readonly focused: boolean; @@ -1420,7 +1431,7 @@ interface WindowClient extends Client { declare var WindowClient: { prototype: WindowClient; new(): WindowClient; -} +}; interface WorkerGlobalScopeEventMap { "error": ErrorEvent; @@ -1443,7 +1454,7 @@ interface WorkerGlobalScope extends EventTarget, WorkerUtils, WindowConsole, Glo declare var WorkerGlobalScope: { prototype: WorkerGlobalScope; new(): WorkerGlobalScope; -} +}; interface WorkerLocation { readonly hash: string; @@ -1461,7 +1472,7 @@ interface WorkerLocation { declare var WorkerLocation: { prototype: WorkerLocation; new(): WorkerLocation; -} +}; interface WorkerNavigator extends Object, NavigatorID, NavigatorOnLine, NavigatorBeacon, NavigatorConcurrentHardware { readonly hardwareConcurrency: number; @@ -1470,7 +1481,7 @@ interface WorkerNavigator extends Object, NavigatorID, NavigatorOnLine, Navigato declare var WorkerNavigator: { prototype: WorkerNavigator; new(): WorkerNavigator; -} +}; interface WorkerUtils extends Object, WindowBase64 { readonly indexedDB: IDBFactory; @@ -1513,38 +1524,38 @@ interface ImageBitmap { interface URLSearchParams { /** - * Appends a specified key/value pair as a new search parameter. - */ + * Appends a specified key/value pair as a new search parameter. + */ append(name: string, value: string): void; /** - * Deletes the given search parameter, and its associated value, from the list of all search parameters. - */ + * Deletes the given search parameter, and its associated value, from the list of all search parameters. + */ delete(name: string): void; /** - * Returns the first value associated to the given search parameter. - */ + * Returns the first value associated to the given search parameter. + */ get(name: string): string | null; /** - * Returns all the values association with a given search parameter. - */ + * Returns all the values association with a given search parameter. + */ getAll(name: string): string[]; /** - * Returns a Boolean indicating if such a search parameter exists. - */ + * Returns a Boolean indicating if such a search parameter exists. + */ has(name: string): boolean; /** - * Sets the value associated to a given search parameter to the given value. If there were several values, delete the others. - */ + * Sets the value associated to a given search parameter to the given value. If there were several values, delete the others. + */ set(name: string, value: string): void; } declare var URLSearchParams: { prototype: URLSearchParams; /** - * Constructor returning a URLSearchParams object. - */ + * Constructor returning a URLSearchParams object. + */ new (init?: string | URLSearchParams): URLSearchParams; -} +}; interface BlobPropertyBag { type?: string; @@ -1751,8 +1762,23 @@ interface AddEventListenerOptions extends EventListenerOptions { declare type EventListenerOrEventListenerObject = EventListener | EventListenerObject; +interface DecodeErrorCallback { + (error: DOMException): void; +} +interface DecodeSuccessCallback { + (decodedData: AudioBuffer): void; +} interface ErrorEventHandler { - (message: string, filename?: string, lineno?: number, colno?: number, error?:Error): void; + (message: string, filename?: string, lineno?: number, colno?: number, error?: Error): void; +} +interface ForEachCallback { + (keyId: any, status: MediaKeyStatus): void; +} +interface FunctionStringCallback { + (data: string): void; +} +interface NotificationPermissionCallback { + (permission: NotificationPermission): void; } interface PositionCallback { (position: Position): void; @@ -1760,21 +1786,6 @@ interface PositionCallback { interface PositionErrorCallback { (error: PositionError): void; } -interface DecodeSuccessCallback { - (decodedData: AudioBuffer): void; -} -interface DecodeErrorCallback { - (error: DOMException): void; -} -interface FunctionStringCallback { - (data: string): void; -} -interface ForEachCallback { - (keyId: any, status: MediaKeyStatus): void; -} -interface NotificationPermissionCallback { - (permission: NotificationPermission): void; -} declare var onmessage: (this: DedicatedWorkerGlobalScope, ev: MessageEvent) => any; declare function close(): void; declare function postMessage(message: any, transfer?: any[]): void; diff --git a/src/services/breakpoints.ts b/src/services/breakpoints.ts index e47f6d016c7..38da43bdee8 100644 --- a/src/services/breakpoints.ts +++ b/src/services/breakpoints.ts @@ -14,7 +14,7 @@ namespace ts.BreakpointResolver { return undefined; } - let tokenAtLocation = getTokenAtPosition(sourceFile, position); + let tokenAtLocation = getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false); const lineOfPosition = sourceFile.getLineAndCharacterOfPosition(position).line; if (sourceFile.getLineAndCharacterOfPosition(tokenAtLocation.getStart(sourceFile)).line > lineOfPosition) { // Get previous token if the token is returned starts on new line diff --git a/src/services/codefixes/disableJsDiagnostics.ts b/src/services/codefixes/disableJsDiagnostics.ts index 7fa5c5bf23f..b5f9e5587a3 100644 --- a/src/services/codefixes/disableJsDiagnostics.ts +++ b/src/services/codefixes/disableJsDiagnostics.ts @@ -22,7 +22,7 @@ namespace ts.codefix { // We also want to check if the previous line holds a comment for a node on the next line // if so, we do not want to separate the node from its comment if we can. if (!isInComment(sourceFile, startPosition) && !isInString(sourceFile, startPosition) && !isInTemplateString(sourceFile, startPosition)) { - const token = getTouchingToken(sourceFile, startPosition); + const token = getTouchingToken(sourceFile, startPosition, /*includeJsDocComment*/ false); const tokenLeadingCommnets = getLeadingCommentRangesOfNode(token, sourceFile); if (!tokenLeadingCommnets || !tokenLeadingCommnets.length || tokenLeadingCommnets[0].pos >= startPosition) { return { diff --git a/src/services/codefixes/fixAddMissingMember.ts b/src/services/codefixes/fixAddMissingMember.ts index 346cdaaaf19..64e7e560094 100644 --- a/src/services/codefixes/fixAddMissingMember.ts +++ b/src/services/codefixes/fixAddMissingMember.ts @@ -13,7 +13,7 @@ namespace ts.codefix { // This is the identifier of the missing property. eg: // this.missing = 1; // ^^^^^^^ - const token = getTokenAtPosition(sourceFile, start); + const token = getTokenAtPosition(sourceFile, start, /*includeJsDocComment*/ false); if (token.kind !== SyntaxKind.Identifier) { return undefined; diff --git a/src/services/codefixes/fixClassDoesntImplementInheritedAbstractMember.ts b/src/services/codefixes/fixClassDoesntImplementInheritedAbstractMember.ts index 62f89b1a21a..768eaf752b7 100644 --- a/src/services/codefixes/fixClassDoesntImplementInheritedAbstractMember.ts +++ b/src/services/codefixes/fixClassDoesntImplementInheritedAbstractMember.ts @@ -15,7 +15,7 @@ namespace ts.codefix { const start = context.span.start; // This is the identifier in the case of a class declaration // or the class keyword token in the case of a class expression. - const token = getTokenAtPosition(sourceFile, start); + const token = getTokenAtPosition(sourceFile, start, /*includeJsDocComment*/ false); const checker = context.program.getTypeChecker(); if (isClassLike(token.parent)) { diff --git a/src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts b/src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts index 3b1b99febb0..bed9621b729 100644 --- a/src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts +++ b/src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts @@ -8,7 +8,7 @@ namespace ts.codefix { function getActionForClassLikeIncorrectImplementsInterface(context: CodeFixContext): CodeAction[] | undefined { const sourceFile = context.sourceFile; const start = context.span.start; - const token = getTokenAtPosition(sourceFile, start); + const token = getTokenAtPosition(sourceFile, start, /*includeJsDocComment*/ false); const checker = context.program.getTypeChecker(); const classDeclaration = getContainingClass(token); diff --git a/src/services/codefixes/fixClassSuperMustPrecedeThisAccess.ts b/src/services/codefixes/fixClassSuperMustPrecedeThisAccess.ts index 2217dda8b0c..56128be9d07 100644 --- a/src/services/codefixes/fixClassSuperMustPrecedeThisAccess.ts +++ b/src/services/codefixes/fixClassSuperMustPrecedeThisAccess.ts @@ -5,7 +5,7 @@ namespace ts.codefix { getCodeActions: (context: CodeFixContext) => { const sourceFile = context.sourceFile; - const token = getTokenAtPosition(sourceFile, context.span.start); + const token = getTokenAtPosition(sourceFile, context.span.start, /*includeJsDocComment*/ false); if (token.kind !== SyntaxKind.ThisKeyword) { return undefined; } diff --git a/src/services/codefixes/fixConstructorForDerivedNeedSuperCall.ts b/src/services/codefixes/fixConstructorForDerivedNeedSuperCall.ts index 822c34842fd..517a79e39bd 100644 --- a/src/services/codefixes/fixConstructorForDerivedNeedSuperCall.ts +++ b/src/services/codefixes/fixConstructorForDerivedNeedSuperCall.ts @@ -4,7 +4,7 @@ namespace ts.codefix { errorCodes: [Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call.code], getCodeActions: (context: CodeFixContext) => { const sourceFile = context.sourceFile; - const token = getTokenAtPosition(sourceFile, context.span.start); + const token = getTokenAtPosition(sourceFile, context.span.start, /*includeJsDocComment*/ false); if (token.kind !== SyntaxKind.ConstructorKeyword) { return undefined; diff --git a/src/services/codefixes/fixExtendsInterfaceBecomesImplements.ts b/src/services/codefixes/fixExtendsInterfaceBecomesImplements.ts index 80d4345a943..d23f61d0f92 100644 --- a/src/services/codefixes/fixExtendsInterfaceBecomesImplements.ts +++ b/src/services/codefixes/fixExtendsInterfaceBecomesImplements.ts @@ -5,7 +5,7 @@ namespace ts.codefix { getCodeActions: (context: CodeFixContext) => { const sourceFile = context.sourceFile; const start = context.span.start; - const token = getTokenAtPosition(sourceFile, start); + const token = getTokenAtPosition(sourceFile, start, /*includeJsDocComment*/ false); const classDeclNode = getContainingClass(token); if (!(token.kind === SyntaxKind.Identifier && isClassLike(classDeclNode))) { return undefined; diff --git a/src/services/codefixes/fixForgottenThisPropertyAccess.ts b/src/services/codefixes/fixForgottenThisPropertyAccess.ts index 711a3289a27..6925b557755 100644 --- a/src/services/codefixes/fixForgottenThisPropertyAccess.ts +++ b/src/services/codefixes/fixForgottenThisPropertyAccess.ts @@ -4,7 +4,7 @@ namespace ts.codefix { errorCodes: [Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code], getCodeActions: (context: CodeFixContext) => { const sourceFile = context.sourceFile; - const token = getTokenAtPosition(sourceFile, context.span.start); + const token = getTokenAtPosition(sourceFile, context.span.start, /*includeJsDocComment*/ false); if (token.kind !== SyntaxKind.Identifier) { return undefined; } diff --git a/src/services/codefixes/fixSpelling.ts b/src/services/codefixes/fixSpelling.ts index b58dab95002..c8f539e8d34 100644 --- a/src/services/codefixes/fixSpelling.ts +++ b/src/services/codefixes/fixSpelling.ts @@ -12,7 +12,7 @@ namespace ts.codefix { // This is the identifier of the misspelled word. eg: // this.speling = 1; // ^^^^^^^ - const node = getTokenAtPosition(sourceFile, context.span.start); + const node = getTokenAtPosition(sourceFile, context.span.start, /*includeJsDocComment*/ false); // TODO: GH#15852 const checker = context.program.getTypeChecker(); let suggestion: string; if (node.kind === SyntaxKind.Identifier && isPropertyAccessExpression(node.parent)) { diff --git a/src/services/codefixes/importFixes.ts b/src/services/codefixes/importFixes.ts index aaf7b535add..53ec99fac81 100644 --- a/src/services/codefixes/importFixes.ts +++ b/src/services/codefixes/importFixes.ts @@ -128,7 +128,7 @@ namespace ts.codefix { const allSourceFiles = context.program.getSourceFiles(); const useCaseSensitiveFileNames = context.host.useCaseSensitiveFileNames ? context.host.useCaseSensitiveFileNames() : false; - const token = getTokenAtPosition(sourceFile, context.span.start); + const token = getTokenAtPosition(sourceFile, context.span.start, /*includeJsDocComment*/ false); const name = token.getText(); const symbolIdActionMap = new ImportCodeActionMap(); @@ -523,7 +523,7 @@ namespace ts.codefix { catch (e) { } } - return relativeFileName; + return getPackageNameFromAtTypesDirectory(relativeFileName); } } diff --git a/src/services/codefixes/unusedIdentifierFixes.ts b/src/services/codefixes/unusedIdentifierFixes.ts index 422a28098a6..5d85979fcf9 100644 --- a/src/services/codefixes/unusedIdentifierFixes.ts +++ b/src/services/codefixes/unusedIdentifierFixes.ts @@ -9,11 +9,11 @@ namespace ts.codefix { const sourceFile = context.sourceFile; const start = context.span.start; - let token = getTokenAtPosition(sourceFile, start); + let token = getTokenAtPosition(sourceFile, start, /*includeJsDocComment*/ false); // this handles var ["computed"] = 12; if (token.kind === SyntaxKind.OpenBracketToken) { - token = getTokenAtPosition(sourceFile, start + 1); + token = getTokenAtPosition(sourceFile, start + 1, /*includeJsDocComment*/ false); } switch (token.kind) { @@ -48,11 +48,11 @@ namespace ts.codefix { case SyntaxKind.TypeParameter: const typeParameters = (token.parent.parent).typeParameters; if (typeParameters.length === 1) { - const previousToken = getTokenAtPosition(sourceFile, typeParameters.pos - 1); + const previousToken = getTokenAtPosition(sourceFile, typeParameters.pos - 1, /*includeJsDocComment*/ false); if (!previousToken || previousToken.kind !== SyntaxKind.LessThanToken) { return deleteRange(typeParameters); } - const nextToken = getTokenAtPosition(sourceFile, typeParameters.end); + const nextToken = getTokenAtPosition(sourceFile, typeParameters.end, /*includeJsDocComment*/ false); if (!nextToken || nextToken.kind !== SyntaxKind.GreaterThanToken) { return deleteRange(typeParameters); } @@ -99,7 +99,7 @@ namespace ts.codefix { else { // import |d,| * as ns from './file' const start = importClause.name.getStart(sourceFile); - const nextToken = getTokenAtPosition(sourceFile, importClause.name.end); + const nextToken = getTokenAtPosition(sourceFile, importClause.name.end, /*includeJsDocComment*/ false); if (nextToken && nextToken.kind === SyntaxKind.CommaToken) { // shift first non-whitespace position after comma to the start position of the node return deleteRange({ pos: start, end: skipTrivia(sourceFile.text, nextToken.end, /*stopAfterLineBreaks*/ false, /*stopAtComments*/ true) }); @@ -116,7 +116,7 @@ namespace ts.codefix { return deleteNode(importDecl); } else { - const previousToken = getTokenAtPosition(sourceFile, namespaceImport.pos - 1); + const previousToken = getTokenAtPosition(sourceFile, namespaceImport.pos - 1, /*includeJsDocComment*/ false); if (previousToken && previousToken.kind === SyntaxKind.CommaToken) { const startPosition = textChanges.getAdjustedStartPosition(sourceFile, previousToken, {}, textChanges.Position.FullStart); return deleteRange({ pos: startPosition, end: namespaceImport.end }); diff --git a/src/services/completions.ts b/src/services/completions.ts index d6772447f5f..a895be8a7da 100644 --- a/src/services/completions.ts +++ b/src/services/completions.ts @@ -354,7 +354,7 @@ namespace ts.Completions { let requestJsDocTag = false; let start = timestamp(); - const currentToken = getTokenAtPosition(sourceFile, position); + const currentToken = getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false); // TODO: GH#15853 log("getCompletionData: Get current token: " + (timestamp() - start)); start = timestamp(); @@ -449,7 +449,7 @@ namespace ts.Completions { let isRightOfOpenTag = false; let isStartingCloseTag = false; - let location = getTouchingPropertyName(sourceFile, position); + let location = getTouchingPropertyName(sourceFile, position, /*includeJsDocComment*/ false); // TODO: GH#15853 if (contextToken) { // Bail out if this is a known invalid completion location if (isCompletionListBlocker(contextToken)) { diff --git a/src/services/documentHighlights.ts b/src/services/documentHighlights.ts index f5e565d4a9e..36b72ecfa78 100644 --- a/src/services/documentHighlights.ts +++ b/src/services/documentHighlights.ts @@ -1,7 +1,7 @@ /* @internal */ namespace ts.DocumentHighlights { export function getDocumentHighlights(program: Program, cancellationToken: CancellationToken, sourceFile: SourceFile, position: number, sourceFilesToSearch: SourceFile[]): DocumentHighlights[] { - const node = getTouchingWord(sourceFile, position); + const node = getTouchingWord(sourceFile, position, /*includeJsDocComment*/ true); return node && (getSemanticDocumentHighlights(node, program, cancellationToken, sourceFilesToSearch) || getSyntacticDocumentHighlights(node, sourceFile)); } diff --git a/src/services/findAllReferences.ts b/src/services/findAllReferences.ts index 42945cb592c..fd564cac13d 100644 --- a/src/services/findAllReferences.ts +++ b/src/services/findAllReferences.ts @@ -61,13 +61,18 @@ namespace ts.FindAllReferences { } export function getImplementationsAtPosition(program: Program, cancellationToken: CancellationToken, sourceFiles: SourceFile[], sourceFile: SourceFile, position: number): ImplementationLocation[] { - const node = getTouchingPropertyName(sourceFile, position); + // A node in a JSDoc comment can't have an implementation anyway. + const node = getTouchingPropertyName(sourceFile, position, /*includeJsDocComment*/ false); const referenceEntries = getImplementationReferenceEntries(program, cancellationToken, sourceFiles, node); const checker = program.getTypeChecker(); return map(referenceEntries, entry => toImplementationLocation(entry, checker)); } function getImplementationReferenceEntries(program: Program, cancellationToken: CancellationToken, sourceFiles: SourceFile[], node: Node): Entry[] | undefined { + if (node.kind === SyntaxKind.SourceFile) { + return undefined; + } + const checker = program.getTypeChecker(); // If invoked directly on a shorthand property assignment, then return // the declaration of the symbol being assigned (not the symbol being assigned to). @@ -740,7 +745,7 @@ namespace ts.FindAllReferences.Core { const labelName = targetLabel.text; const possiblePositions = getPossibleSymbolReferencePositions(sourceFile, labelName, container); for (const position of possiblePositions) { - const node = getTouchingWord(sourceFile, position); + const node = getTouchingWord(sourceFile, position, /*includeJsDocComment*/ false); // Only pick labels that are either the target label, or have a target that is the target label if (node && (node === targetLabel || (isJumpStatementTarget(node) && getTargetLabel(node, labelName) === targetLabel))) { references.push(nodeEntry(node)); @@ -778,9 +783,10 @@ namespace ts.FindAllReferences.Core { } function addReferencesForKeywordInFile(sourceFile: SourceFile, kind: SyntaxKind, searchText: string, references: Push): void { - const possiblePositions = getPossibleSymbolReferencePositions(sourceFile, searchText); + // Want fullStart so we can find the symbol in JSDoc comments + const possiblePositions = getPossibleSymbolReferencePositions(sourceFile, searchText, sourceFile, /*fullStart*/ true); for (const position of possiblePositions) { - const referenceLocation = getTouchingPropertyName(sourceFile, position); + const referenceLocation = getTouchingPropertyName(sourceFile, position, /*includeJsDocComment*/ true); if (referenceLocation.kind === kind) { references.push(nodeEntry(referenceLocation)); } @@ -802,13 +808,13 @@ namespace ts.FindAllReferences.Core { return; } - for (const position of getPossibleSymbolReferencePositions(sourceFile, search.text, container, /*fullStart*/ state.findInComments)) { + for (const position of getPossibleSymbolReferencePositions(sourceFile, search.text, container, /*fullStart*/ state.findInComments || container.jsDoc !== undefined)) { getReferencesAtLocation(sourceFile, position, search, state); } } function getReferencesAtLocation(sourceFile: SourceFile, position: number, search: Search, state: State): void { - const referenceLocation = getTouchingPropertyName(sourceFile, position); + const referenceLocation = getTouchingPropertyName(sourceFile, position, /*includeJsDocComment*/ true); if (!isValidReferencePosition(referenceLocation, search.text)) { // This wasn't the start of a token. Check to see if it might be a @@ -1248,7 +1254,7 @@ namespace ts.FindAllReferences.Core { const sourceFile = searchSpaceNode.getSourceFile(); const possiblePositions = getPossibleSymbolReferencePositions(sourceFile, "super", searchSpaceNode); for (const position of possiblePositions) { - const node = getTouchingWord(sourceFile, position); + const node = getTouchingWord(sourceFile, position, /*includeJsDocComment*/ false); if (!node || node.kind !== SyntaxKind.SuperKeyword) { continue; @@ -1325,7 +1331,7 @@ namespace ts.FindAllReferences.Core { function getThisReferencesInFile(sourceFile: SourceFile, searchSpaceNode: Node, possiblePositions: number[], result: Entry[]): void { forEach(possiblePositions, position => { - const node = getTouchingWord(sourceFile, position); + const node = getTouchingWord(sourceFile, position, /*includeJsDocComment*/ false); if (!node || !isThis(node)) { return; } @@ -1379,7 +1385,7 @@ namespace ts.FindAllReferences.Core { function getReferencesForStringLiteralInFile(sourceFile: SourceFile, searchText: string, possiblePositions: number[], references: Push): void { for (const position of possiblePositions) { - const node = getTouchingWord(sourceFile, position); + const node = getTouchingWord(sourceFile, position, /*includeJsDocComment*/ false); if (node && node.kind === SyntaxKind.StringLiteral && (node as StringLiteral).text === searchText) { references.push(nodeEntry(node, /*isInString*/ true)); } diff --git a/src/services/formatting/formatting.ts b/src/services/formatting/formatting.ts index d5bd33e33cc..531b768f6d8 100644 --- a/src/services/formatting/formatting.ts +++ b/src/services/formatting/formatting.ts @@ -599,7 +599,7 @@ namespace ts.formatting { child => { processChildNode(child, /*inheritedIndentation*/ Constants.Unknown, node, nodeDynamicIndentation, nodeStartLine, undecoratedNodeStartLine, /*isListItem*/ false); }, - (nodes: NodeArray) => { + nodes => { processChildNodes(nodes, node, nodeStartLine, nodeDynamicIndentation); }); diff --git a/src/services/goToDefinition.ts b/src/services/goToDefinition.ts index 672b484055f..9b96f339bf6 100644 --- a/src/services/goToDefinition.ts +++ b/src/services/goToDefinition.ts @@ -19,7 +19,7 @@ namespace ts.GoToDefinition { [getDefinitionInfoForFileReference(typeReferenceDirective.fileName, referenceFile.resolvedFileName)]; } - const node = getTouchingPropertyName(sourceFile, position); + const node = getTouchingPropertyName(sourceFile, position, /*includeJsDocComment*/ true); if (node === sourceFile) { return undefined; } @@ -95,7 +95,7 @@ namespace ts.GoToDefinition { /// Goto type export function getTypeDefinitionAtPosition(typeChecker: TypeChecker, sourceFile: SourceFile, position: number): DefinitionInfo[] { - const node = getTouchingPropertyName(sourceFile, position); + const node = getTouchingPropertyName(sourceFile, position, /*includeJsDocComment*/ true); if (node === sourceFile) { return undefined; } diff --git a/src/services/importTracker.ts b/src/services/importTracker.ts index 4fd9fed346d..f20c80c14ef 100644 --- a/src/services/importTracker.ts +++ b/src/services/importTracker.ts @@ -300,7 +300,7 @@ namespace ts.FindAllReferences { }); } - type ModuleReference = + export type ModuleReference = /** "import" also includes require() calls. */ | { kind: "import", literal: StringLiteral } /** or */ diff --git a/src/services/jsDoc.ts b/src/services/jsDoc.ts index 4422aab7156..b130a7f754b 100644 --- a/src/services/jsDoc.ts +++ b/src/services/jsDoc.ts @@ -158,7 +158,7 @@ namespace ts.JsDoc { return undefined; } - const tokenAtPos = getTokenAtPosition(sourceFile, position); + const tokenAtPos = getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false); const tokenStart = tokenAtPos.getStart(); if (!tokenAtPos || tokenStart < position) { return undefined; diff --git a/src/services/pathCompletions.ts b/src/services/pathCompletions.ts index f68c8276254..3ded126ab65 100644 --- a/src/services/pathCompletions.ts +++ b/src/services/pathCompletions.ts @@ -245,18 +245,15 @@ namespace ts.Completions.PathCompletions { // Get modules that the type checker picked up const ambientModules = map(typeChecker.getAmbientModules(), sym => stripQuotes(sym.name)); - let nonRelativeModules = filter(ambientModules, moduleName => startsWith(moduleName, fragment)); + let nonRelativeModuleNames = filter(ambientModules, moduleName => startsWith(moduleName, fragment)); // Nested modules of the form "module-name/sub" need to be adjusted to only return the string // after the last '/' that appears in the fragment because that's where the replacement span // starts if (isNestedModule) { const moduleNameWithSeperator = ensureTrailingDirectorySeparator(moduleNameFragment); - nonRelativeModules = map(nonRelativeModules, moduleName => { - if (startsWith(fragment, moduleNameWithSeperator)) { - return moduleName.substr(moduleNameWithSeperator.length); - } - return moduleName; + nonRelativeModuleNames = map(nonRelativeModuleNames, nonRelativeModuleName => { + return removePrefix(nonRelativeModuleName, moduleNameWithSeperator); }); } @@ -264,7 +261,7 @@ namespace ts.Completions.PathCompletions { if (!options.moduleResolution || options.moduleResolution === ModuleResolutionKind.NodeJs) { for (const visibleModule of enumerateNodeModulesVisibleToScript(host, scriptPath)) { if (!isNestedModule) { - nonRelativeModules.push(visibleModule.moduleName); + nonRelativeModuleNames.push(visibleModule.moduleName); } else if (startsWith(visibleModule.moduleName, moduleNameFragment)) { const nestedFiles = tryReadDirectory(host, visibleModule.moduleDir, supportedTypeScriptExtensions, /*exclude*/ undefined, /*include*/ ["./*"]); @@ -272,18 +269,18 @@ namespace ts.Completions.PathCompletions { for (let f of nestedFiles) { f = normalizePath(f); const nestedModule = removeFileExtension(getBaseFileName(f)); - nonRelativeModules.push(nestedModule); + nonRelativeModuleNames.push(nestedModule); } } } } } - return deduplicate(nonRelativeModules); + return deduplicate(nonRelativeModuleNames); } export function getTripleSlashReferenceCompletion(sourceFile: SourceFile, position: number, compilerOptions: CompilerOptions, host: LanguageServiceHost): CompletionInfo { - const token = getTokenAtPosition(sourceFile, position); + const token = getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false); if (!token) { return undefined; } diff --git a/src/services/refactors/convertFunctionToEs6Class.ts b/src/services/refactors/convertFunctionToEs6Class.ts index 3f1a359c7a1..a34e0ccca2f 100644 --- a/src/services/refactors/convertFunctionToEs6Class.ts +++ b/src/services/refactors/convertFunctionToEs6Class.ts @@ -12,7 +12,7 @@ namespace ts.refactor { function isApplicable(context: RefactorContext): boolean { const start = context.startPosition; - const node = getTokenAtPosition(context.file, start); + const node = getTokenAtPosition(context.file, start, /*includeJsDocComment*/ false); const checker = context.program.getTypeChecker(); let symbol = checker.getSymbolAtLocation(node); @@ -27,7 +27,7 @@ namespace ts.refactor { const start = context.startPosition; const sourceFile = context.file; const checker = context.program.getTypeChecker(); - const token = getTokenAtPosition(sourceFile, start); + const token = getTokenAtPosition(sourceFile, start, /*includeJsDocComment*/ false); const ctorSymbol = checker.getSymbolAtLocation(token); const newLine = context.rulesProvider.getFormatOptions().newLineCharacter; diff --git a/src/services/services.ts b/src/services/services.ts index 1a1ac47847f..aca13d7469e 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -107,6 +107,7 @@ namespace ts { scanner.setTextPos(pos); while (pos < end) { const token = useJSDocScanner ? scanner.scanJSDocToken() : scanner.scan(); + Debug.assert(token !== SyntaxKind.EndOfFileToken); // Else it would infinitely loop const textPos = scanner.getTextPos(); if (textPos <= end) { nodes.push(createNode(token, pos, textPos, this)); @@ -135,10 +136,15 @@ namespace ts { } private createChildren(sourceFile?: SourceFileLike) { - let children: Node[]; - if (this.kind >= SyntaxKind.FirstNode) { + if (isJSDocTag(this)) { + /** Don't add trivia for "tokens" since this is in a comment. */ + const children: Node[] = []; + this.forEachChild(child => { children.push(child); }); + this._children = children; + } + else if (this.kind >= SyntaxKind.FirstNode) { + const children: Node[] = []; scanner.setText((sourceFile || this.getSourceFile()).text); - children = []; let pos = this.pos; const useJSDocScanner = this.kind >= SyntaxKind.FirstJSDocTagNode && this.kind <= SyntaxKind.LastJSDocTagNode; const processNode = (node: Node) => { @@ -155,7 +161,7 @@ namespace ts { if (pos < nodes.pos) { pos = this.addSyntheticNodes(children, pos, nodes.pos, useJSDocScanner); } - children.push(this.createSyntaxList(>nodes)); + children.push(this.createSyntaxList(nodes)); pos = nodes.end; }; // jsDocComments need to be the first children @@ -173,8 +179,11 @@ namespace ts { this.addSyntheticNodes(children, pos, this.end); } scanner.setText(undefined); + this._children = children; + } + else { + this._children = emptyArray; } - this._children = children || emptyArray; } public getChildCount(sourceFile?: SourceFile): number { @@ -215,7 +224,7 @@ namespace ts { return child.kind < SyntaxKind.FirstNode ? child : child.getLastToken(sourceFile); } - public forEachChild(cbNode: (node: Node) => T, cbNodeArray?: (nodes: Node[]) => T): T { + public forEachChild(cbNode: (node: Node) => T, cbNodeArray?: (nodes: NodeArray) => T): T { return forEachChild(this, cbNode, cbNodeArray); } } @@ -1356,7 +1365,7 @@ namespace ts { synchronizeHostData(); const sourceFile = getValidSourceFile(fileName); - const node = getTouchingPropertyName(sourceFile, position); + const node = getTouchingPropertyName(sourceFile, position, /*includeJsDocComment*/ true); if (node === sourceFile) { return undefined; } @@ -1543,7 +1552,7 @@ namespace ts { const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); // Get node at the location - const node = getTouchingPropertyName(sourceFile, startPos); + const node = getTouchingPropertyName(sourceFile, startPos, /*includeJsDocComment*/ false); if (node === sourceFile) { return; @@ -1654,7 +1663,7 @@ namespace ts { const sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName); const result: TextSpan[] = []; - const token = getTouchingToken(sourceFile, position); + const token = getTouchingToken(sourceFile, position, /*includeJsDocComment*/ false); if (token.getStart(sourceFile) === position) { const matchKind = getMatchingTokenKind(token); @@ -1856,7 +1865,6 @@ namespace ts { // OK, we have found a match in the file. This is only an acceptable match if // it is contained within a comment. - if (!isInComment(sourceFile, matchPosition)) { continue; } diff --git a/src/services/textChanges.ts b/src/services/textChanges.ts index 0551917b33c..5aa4ebca7d0 100644 --- a/src/services/textChanges.ts +++ b/src/services/textChanges.ts @@ -202,7 +202,7 @@ namespace ts.textChanges { return this; } if (index !== containingList.length - 1) { - const nextToken = getTokenAtPosition(sourceFile, node.end); + const nextToken = getTokenAtPosition(sourceFile, node.end, /*includeJsDocComment*/ false); if (nextToken && isSeparator(node, nextToken)) { // find first non-whitespace position in the leading trivia of the node const startPosition = skipTrivia(sourceFile.text, getAdjustedStartPosition(sourceFile, node, {}, Position.FullStart), /*stopAfterLineBreak*/ false, /*stopAtComments*/ true); @@ -214,7 +214,7 @@ namespace ts.textChanges { } } else { - const previousToken = getTokenAtPosition(sourceFile, containingList[index - 1].end); + const previousToken = getTokenAtPosition(sourceFile, containingList[index - 1].end, /*includeJsDocComment*/ false); if (previousToken && isSeparator(node, previousToken)) { this.deleteNodeRange(sourceFile, previousToken, node); } @@ -292,7 +292,7 @@ namespace ts.textChanges { if (index !== containingList.length - 1) { // any element except the last one // use next sibling as an anchor - const nextToken = getTokenAtPosition(sourceFile, after.end); + const nextToken = getTokenAtPosition(sourceFile, after.end, /*includeJsDocComment*/ false); if (nextToken && isSeparator(after, nextToken)) { // for list // a, b, c diff --git a/src/services/utilities.ts b/src/services/utilities.ts index 4a3f8769b61..2e771a73286 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -590,29 +590,29 @@ namespace ts { /* Gets the token whose text has range [start, end) and * position >= start and (position < end or (position === end && token is keyword or identifier)) */ - export function getTouchingWord(sourceFile: SourceFile, position: number, includeJsDocComment = false): Node { - return getTouchingToken(sourceFile, position, n => isWord(n.kind), includeJsDocComment); + export function getTouchingWord(sourceFile: SourceFile, position: number, includeJsDocComment: boolean): Node { + return getTouchingToken(sourceFile, position, includeJsDocComment, n => isWord(n.kind)); } /* Gets the token whose text has range [start, end) and position >= start * and (position < end or (position === end && token is keyword or identifier or numeric/string literal)) */ - export function getTouchingPropertyName(sourceFile: SourceFile, position: number, includeJsDocComment = false): Node { - return getTouchingToken(sourceFile, position, n => isPropertyName(n.kind), includeJsDocComment); + export function getTouchingPropertyName(sourceFile: SourceFile, position: number, includeJsDocComment: boolean): Node { + return getTouchingToken(sourceFile, position, includeJsDocComment, n => isPropertyName(n.kind)); } /** Returns the token if position is in [start, end) or if position === end and includeItemAtEndPosition(token) === true */ - export function getTouchingToken(sourceFile: SourceFile, position: number, includeItemAtEndPosition?: (n: Node) => boolean, includeJsDocComment = false): Node { + export function getTouchingToken(sourceFile: SourceFile, position: number, includeJsDocComment: boolean, includeItemAtEndPosition?: (n: Node) => boolean): Node { return getTokenAtPositionWorker(sourceFile, position, /*allowPositionInLeadingTrivia*/ false, includeItemAtEndPosition, includeJsDocComment); } /** Returns a token if position is in [start-of-leading-trivia, end) */ - export function getTokenAtPosition(sourceFile: SourceFile, position: number, includeJsDocComment = false): Node { + export function getTokenAtPosition(sourceFile: SourceFile, position: number, includeJsDocComment: boolean): Node { return getTokenAtPositionWorker(sourceFile, position, /*allowPositionInLeadingTrivia*/ true, /*includeItemAtEndPosition*/ undefined, includeJsDocComment); } /** Get the token whose text contains the position */ - function getTokenAtPositionWorker(sourceFile: SourceFile, position: number, allowPositionInLeadingTrivia: boolean, includeItemAtEndPosition: (n: Node) => boolean, includeJsDocComment = false): Node { + function getTokenAtPositionWorker(sourceFile: SourceFile, position: number, allowPositionInLeadingTrivia: boolean, includeItemAtEndPosition: (n: Node) => boolean, includeJsDocComment: boolean): Node { let current: Node = sourceFile; outer: while (true) { if (isToken(current)) { @@ -659,7 +659,7 @@ namespace ts { export function findTokenOnLeftOfPosition(file: SourceFile, position: number): Node { // Ideally, getTokenAtPosition should return a token. However, it is currently // broken, so we do a check to make sure the result was indeed a token. - const tokenAtPosition = getTokenAtPosition(file, position); + const tokenAtPosition = getTokenAtPosition(file, position, /*includeJsDocComment*/ false); if (isToken(tokenAtPosition) && position > tokenAtPosition.getStart(file) && position < tokenAtPosition.getEnd()) { return tokenAtPosition; } @@ -789,7 +789,7 @@ namespace ts { * returns true if the position is in between the open and close elements of an JSX expression. */ export function isInsideJsxElementOrAttribute(sourceFile: SourceFile, position: number) { - const token = getTokenAtPosition(sourceFile, position); + const token = getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false); if (!token) { return false; @@ -825,7 +825,7 @@ namespace ts { } export function isInTemplateString(sourceFile: SourceFile, position: number) { - const token = getTokenAtPosition(sourceFile, position); + const token = getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false); return isTemplateLiteralKind(token.kind) && position > token.getStart(sourceFile); } @@ -835,7 +835,11 @@ namespace ts { * @param tokenAtPosition Must equal `getTokenAtPosition(sourceFile, position) * @param predicate Additional predicate to test on the comment range. */ - export function isInComment(sourceFile: SourceFile, position: number, tokenAtPosition = getTokenAtPosition(sourceFile, position), predicate?: (c: CommentRange) => boolean): boolean { + export function isInComment( + sourceFile: SourceFile, + position: number, + tokenAtPosition = getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false), + predicate?: (c: CommentRange) => boolean): boolean { return position <= tokenAtPosition.getStart(sourceFile) && (isInCommentRange(getLeadingCommentRanges(sourceFile.text, tokenAtPosition.pos)) || isInCommentRange(getTrailingCommentRanges(sourceFile.text, tokenAtPosition.pos))); @@ -870,7 +874,7 @@ namespace ts { } export function hasDocComment(sourceFile: SourceFile, position: number) { - const token = getTokenAtPosition(sourceFile, position); + const token = getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false); // First, we have to see if this position actually landed in a comment. const commentRanges = getLeadingCommentRanges(sourceFile.text, token.pos); @@ -887,7 +891,7 @@ namespace ts { * Get the corresponding JSDocTag node if the position is in a jsDoc comment */ export function getJsDocTagAtPosition(sourceFile: SourceFile, position: number): JSDocTag { - let node = ts.getTokenAtPosition(sourceFile, position); + let node = ts.getTokenAtPosition(sourceFile, position, /*includeJsDocComment*/ false); if (isToken(node)) { switch (node.kind) { case SyntaxKind.VarKeyword: @@ -1132,7 +1136,7 @@ namespace ts { clear: resetWriter, trackSymbol: noop, reportInaccessibleThisError: noop, - reportIllegalExtends: noop + reportPrivateInBaseOfClassExpression: noop, }; function writeIndent() { @@ -1354,6 +1358,6 @@ namespace ts { } export function getOpenBraceOfClassLike(declaration: ClassLikeDeclaration, sourceFile: SourceFile) { - return getTokenAtPosition(sourceFile, declaration.members.pos - 1); + return getTokenAtPosition(sourceFile, declaration.members.pos - 1, /*includeJsDocComment*/ false); } } diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends4.errors.txt b/tests/baselines/reference/declarationEmitExpressionInExtends4.errors.txt index 54905212836..569e5aa355f 100644 --- a/tests/baselines/reference/declarationEmitExpressionInExtends4.errors.txt +++ b/tests/baselines/reference/declarationEmitExpressionInExtends4.errors.txt @@ -1,23 +1,17 @@ -tests/cases/compiler/declarationEmitExpressionInExtends4.ts(1,10): error TS4060: Return type of exported function has or is using private name 'D'. tests/cases/compiler/declarationEmitExpressionInExtends4.ts(5,17): error TS2315: Type 'D' is not generic. -tests/cases/compiler/declarationEmitExpressionInExtends4.ts(5,17): error TS4020: 'extends' clause of exported class 'C' has or is using private name 'D'. tests/cases/compiler/declarationEmitExpressionInExtends4.ts(9,18): error TS2304: Cannot find name 'SomeUndefinedFunction'. tests/cases/compiler/declarationEmitExpressionInExtends4.ts(14,18): error TS2304: Cannot find name 'SomeUndefinedFunction'. tests/cases/compiler/declarationEmitExpressionInExtends4.ts(14,18): error TS4020: 'extends' clause of exported class 'C3' has or is using private name 'SomeUndefinedFunction'. -==== tests/cases/compiler/declarationEmitExpressionInExtends4.ts (6 errors) ==== +==== tests/cases/compiler/declarationEmitExpressionInExtends4.ts (4 errors) ==== function getSomething() { - ~~~~~~~~~~~~ -!!! error TS4060: Return type of exported function has or is using private name 'D'. return class D { } } class C extends getSomething() { ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2315: Type 'D' is not generic. - ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS4020: 'extends' clause of exported class 'C' has or is using private name 'D'. } diff --git a/tests/baselines/reference/emitClassExpressionInDeclarationFile.js b/tests/baselines/reference/emitClassExpressionInDeclarationFile.js new file mode 100644 index 00000000000..ab64fe003be --- /dev/null +++ b/tests/baselines/reference/emitClassExpressionInDeclarationFile.js @@ -0,0 +1,132 @@ +//// [emitClassExpressionInDeclarationFile.ts] +export var simpleExample = class { + static getTags() { } + tags() { } +} +export var circularReference = class C { + static getTags(c: C): C { return c } + tags(c: C): C { return c } +} + +// repro from #15066 +export class FooItem { + foo(): void { } + name?: string; +} + +export type Constructor = new(...args: any[]) => T; +export function WithTags>(Base: T) { + return class extends Base { + static getTags(): void { } + tags(): void { } + } +} + +export class Test extends WithTags(FooItem) {} + +const test = new Test(); + +Test.getTags() +test.tags(); + + +//// [emitClassExpressionInDeclarationFile.js] +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +exports.__esModule = true; +exports.simpleExample = (function () { + function class_1() { + } + class_1.getTags = function () { }; + class_1.prototype.tags = function () { }; + return class_1; +}()); +exports.circularReference = (function () { + function C() { + } + C.getTags = function (c) { return c; }; + C.prototype.tags = function (c) { return c; }; + return C; +}()); +// repro from #15066 +var FooItem = (function () { + function FooItem() { + } + FooItem.prototype.foo = function () { }; + return FooItem; +}()); +exports.FooItem = FooItem; +function WithTags(Base) { + return (function (_super) { + __extends(class_2, _super); + function class_2() { + return _super !== null && _super.apply(this, arguments) || this; + } + class_2.getTags = function () { }; + class_2.prototype.tags = function () { }; + return class_2; + }(Base)); +} +exports.WithTags = WithTags; +var Test = (function (_super) { + __extends(Test, _super); + function Test() { + return _super !== null && _super.apply(this, arguments) || this; + } + return Test; +}(WithTags(FooItem))); +exports.Test = Test; +var test = new Test(); +Test.getTags(); +test.tags(); + + +//// [emitClassExpressionInDeclarationFile.d.ts] +export declare var simpleExample: { + new (): { + tags(): void; + }; + getTags(): void; +}; +export declare var circularReference: { + new (): { + tags(c: any): any; + }; + getTags(c: { + tags(c: any): any; + }): { + tags(c: any): any; + }; +}; +export declare class FooItem { + foo(): void; + name?: string; +} +export declare type Constructor = new (...args: any[]) => T; +export declare function WithTags>(Base: T): { + new (...args: any[]): { + tags(): void; + foo(): void; + name?: string; + }; + getTags(): void; +} & T; +declare const Test_base: { + new (...args: any[]): { + tags(): void; + foo(): void; + name?: string; + }; + getTags(): void; +} & typeof FooItem; +export declare class Test extends Test_base { +} diff --git a/tests/baselines/reference/emitClassExpressionInDeclarationFile.symbols b/tests/baselines/reference/emitClassExpressionInDeclarationFile.symbols new file mode 100644 index 00000000000..537838937c5 --- /dev/null +++ b/tests/baselines/reference/emitClassExpressionInDeclarationFile.symbols @@ -0,0 +1,84 @@ +=== tests/cases/compiler/emitClassExpressionInDeclarationFile.ts === +export var simpleExample = class { +>simpleExample : Symbol(simpleExample, Decl(emitClassExpressionInDeclarationFile.ts, 0, 10)) + + static getTags() { } +>getTags : Symbol(simpleExample.getTags, Decl(emitClassExpressionInDeclarationFile.ts, 0, 34)) + + tags() { } +>tags : Symbol(simpleExample.tags, Decl(emitClassExpressionInDeclarationFile.ts, 1, 24)) +} +export var circularReference = class C { +>circularReference : Symbol(circularReference, Decl(emitClassExpressionInDeclarationFile.ts, 4, 10)) +>C : Symbol(C, Decl(emitClassExpressionInDeclarationFile.ts, 4, 30)) + + static getTags(c: C): C { return c } +>getTags : Symbol(C.getTags, Decl(emitClassExpressionInDeclarationFile.ts, 4, 40)) +>c : Symbol(c, Decl(emitClassExpressionInDeclarationFile.ts, 5, 19)) +>C : Symbol(C, Decl(emitClassExpressionInDeclarationFile.ts, 4, 30)) +>C : Symbol(C, Decl(emitClassExpressionInDeclarationFile.ts, 4, 30)) +>c : Symbol(c, Decl(emitClassExpressionInDeclarationFile.ts, 5, 19)) + + tags(c: C): C { return c } +>tags : Symbol(C.tags, Decl(emitClassExpressionInDeclarationFile.ts, 5, 40)) +>c : Symbol(c, Decl(emitClassExpressionInDeclarationFile.ts, 6, 9)) +>C : Symbol(C, Decl(emitClassExpressionInDeclarationFile.ts, 4, 30)) +>C : Symbol(C, Decl(emitClassExpressionInDeclarationFile.ts, 4, 30)) +>c : Symbol(c, Decl(emitClassExpressionInDeclarationFile.ts, 6, 9)) +} + +// repro from #15066 +export class FooItem { +>FooItem : Symbol(FooItem, Decl(emitClassExpressionInDeclarationFile.ts, 7, 1)) + + foo(): void { } +>foo : Symbol(FooItem.foo, Decl(emitClassExpressionInDeclarationFile.ts, 10, 22)) + + name?: string; +>name : Symbol(FooItem.name, Decl(emitClassExpressionInDeclarationFile.ts, 11, 19)) +} + +export type Constructor = new(...args: any[]) => T; +>Constructor : Symbol(Constructor, Decl(emitClassExpressionInDeclarationFile.ts, 13, 1)) +>T : Symbol(T, Decl(emitClassExpressionInDeclarationFile.ts, 15, 24)) +>args : Symbol(args, Decl(emitClassExpressionInDeclarationFile.ts, 15, 33)) +>T : Symbol(T, Decl(emitClassExpressionInDeclarationFile.ts, 15, 24)) + +export function WithTags>(Base: T) { +>WithTags : Symbol(WithTags, Decl(emitClassExpressionInDeclarationFile.ts, 15, 54)) +>T : Symbol(T, Decl(emitClassExpressionInDeclarationFile.ts, 16, 25)) +>Constructor : Symbol(Constructor, Decl(emitClassExpressionInDeclarationFile.ts, 13, 1)) +>FooItem : Symbol(FooItem, Decl(emitClassExpressionInDeclarationFile.ts, 7, 1)) +>Base : Symbol(Base, Decl(emitClassExpressionInDeclarationFile.ts, 16, 57)) +>T : Symbol(T, Decl(emitClassExpressionInDeclarationFile.ts, 16, 25)) + + return class extends Base { +>Base : Symbol(Base, Decl(emitClassExpressionInDeclarationFile.ts, 16, 57)) + + static getTags(): void { } +>getTags : Symbol((Anonymous class).getTags, Decl(emitClassExpressionInDeclarationFile.ts, 17, 31)) + + tags(): void { } +>tags : Symbol((Anonymous class).tags, Decl(emitClassExpressionInDeclarationFile.ts, 18, 34)) + } +} + +export class Test extends WithTags(FooItem) {} +>Test : Symbol(Test, Decl(emitClassExpressionInDeclarationFile.ts, 21, 1)) +>WithTags : Symbol(WithTags, Decl(emitClassExpressionInDeclarationFile.ts, 15, 54)) +>FooItem : Symbol(FooItem, Decl(emitClassExpressionInDeclarationFile.ts, 7, 1)) + +const test = new Test(); +>test : Symbol(test, Decl(emitClassExpressionInDeclarationFile.ts, 25, 5)) +>Test : Symbol(Test, Decl(emitClassExpressionInDeclarationFile.ts, 21, 1)) + +Test.getTags() +>Test.getTags : Symbol((Anonymous class).getTags, Decl(emitClassExpressionInDeclarationFile.ts, 17, 31)) +>Test : Symbol(Test, Decl(emitClassExpressionInDeclarationFile.ts, 21, 1)) +>getTags : Symbol((Anonymous class).getTags, Decl(emitClassExpressionInDeclarationFile.ts, 17, 31)) + +test.tags(); +>test.tags : Symbol((Anonymous class).tags, Decl(emitClassExpressionInDeclarationFile.ts, 18, 34)) +>test : Symbol(test, Decl(emitClassExpressionInDeclarationFile.ts, 25, 5)) +>tags : Symbol((Anonymous class).tags, Decl(emitClassExpressionInDeclarationFile.ts, 18, 34)) + diff --git a/tests/baselines/reference/emitClassExpressionInDeclarationFile.types b/tests/baselines/reference/emitClassExpressionInDeclarationFile.types new file mode 100644 index 00000000000..3d5190262de --- /dev/null +++ b/tests/baselines/reference/emitClassExpressionInDeclarationFile.types @@ -0,0 +1,91 @@ +=== tests/cases/compiler/emitClassExpressionInDeclarationFile.ts === +export var simpleExample = class { +>simpleExample : typeof simpleExample +>class { static getTags() { } tags() { }} : typeof simpleExample + + static getTags() { } +>getTags : () => void + + tags() { } +>tags : () => void +} +export var circularReference = class C { +>circularReference : typeof C +>class C { static getTags(c: C): C { return c } tags(c: C): C { return c }} : typeof C +>C : typeof C + + static getTags(c: C): C { return c } +>getTags : (c: C) => C +>c : C +>C : C +>C : C +>c : C + + tags(c: C): C { return c } +>tags : (c: C) => C +>c : C +>C : C +>C : C +>c : C +} + +// repro from #15066 +export class FooItem { +>FooItem : FooItem + + foo(): void { } +>foo : () => void + + name?: string; +>name : string +} + +export type Constructor = new(...args: any[]) => T; +>Constructor : Constructor +>T : T +>args : any[] +>T : T + +export function WithTags>(Base: T) { +>WithTags : >(Base: T) => { new (...args: any[]): (Anonymous class); prototype: WithTags.(Anonymous class); getTags(): void; } & T +>T : T +>Constructor : Constructor +>FooItem : FooItem +>Base : T +>T : T + + return class extends Base { +>class extends Base { static getTags(): void { } tags(): void { } } : { new (...args: any[]): (Anonymous class); prototype: WithTags.(Anonymous class); getTags(): void; } & T +>Base : FooItem + + static getTags(): void { } +>getTags : () => void + + tags(): void { } +>tags : () => void + } +} + +export class Test extends WithTags(FooItem) {} +>Test : Test +>WithTags(FooItem) : WithTags.(Anonymous class) & FooItem +>WithTags : >(Base: T) => { new (...args: any[]): (Anonymous class); prototype: WithTags.(Anonymous class); getTags(): void; } & T +>FooItem : typeof FooItem + +const test = new Test(); +>test : Test +>new Test() : Test +>Test : typeof Test + +Test.getTags() +>Test.getTags() : void +>Test.getTags : () => void +>Test : typeof Test +>getTags : () => void + +test.tags(); +>test.tags() : void +>test.tags : () => void +>test : Test +>tags : () => void + diff --git a/tests/baselines/reference/emitClassExpressionInDeclarationFile2.errors.txt b/tests/baselines/reference/emitClassExpressionInDeclarationFile2.errors.txt new file mode 100644 index 00000000000..4541cf2a58a --- /dev/null +++ b/tests/baselines/reference/emitClassExpressionInDeclarationFile2.errors.txt @@ -0,0 +1,41 @@ +tests/cases/compiler/emitClassExpressionInDeclarationFile2.ts(1,12): error TS4094: Property 'p' of exported class expression may not be private or protected. +tests/cases/compiler/emitClassExpressionInDeclarationFile2.ts(1,12): error TS4094: Property 'ps' of exported class expression may not be private or protected. +tests/cases/compiler/emitClassExpressionInDeclarationFile2.ts(16,17): error TS4094: Property 'property' of exported class expression may not be private or protected. + + +==== tests/cases/compiler/emitClassExpressionInDeclarationFile2.ts (3 errors) ==== + export var noPrivates = class { + ~~~~~~~~~~ +!!! error TS4094: Property 'p' of exported class expression may not be private or protected. + ~~~~~~~~~~ +!!! error TS4094: Property 'ps' of exported class expression may not be private or protected. + static getTags() { } + tags() { } + private static ps = -1 + private p = 12 + } + + // altered repro from #15066 to add private property + export class FooItem { + foo(): void { } + name?: string; + private property = "capitalism" + } + + export type Constructor = new(...args: any[]) => T; + export function WithTags>(Base: T) { + ~~~~~~~~ +!!! error TS4094: Property 'property' of exported class expression may not be private or protected. + return class extends Base { + static getTags(): void { } + tags(): void { } + } + } + + export class Test extends WithTags(FooItem) {} + + const test = new Test(); + + Test.getTags() + test.tags(); + \ No newline at end of file diff --git a/tests/baselines/reference/emitClassExpressionInDeclarationFile2.js b/tests/baselines/reference/emitClassExpressionInDeclarationFile2.js new file mode 100644 index 00000000000..e3a0aa4cb99 --- /dev/null +++ b/tests/baselines/reference/emitClassExpressionInDeclarationFile2.js @@ -0,0 +1,87 @@ +//// [emitClassExpressionInDeclarationFile2.ts] +export var noPrivates = class { + static getTags() { } + tags() { } + private static ps = -1 + private p = 12 +} + +// altered repro from #15066 to add private property +export class FooItem { + foo(): void { } + name?: string; + private property = "capitalism" +} + +export type Constructor = new(...args: any[]) => T; +export function WithTags>(Base: T) { + return class extends Base { + static getTags(): void { } + tags(): void { } + } +} + +export class Test extends WithTags(FooItem) {} + +const test = new Test(); + +Test.getTags() +test.tags(); + + +//// [emitClassExpressionInDeclarationFile2.js] +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +exports.__esModule = true; +exports.noPrivates = (_a = (function () { + function class_1() { + this.p = 12; + } + class_1.getTags = function () { }; + class_1.prototype.tags = function () { }; + return class_1; + }()), + _a.ps = -1, + _a); +// altered repro from #15066 to add private property +var FooItem = (function () { + function FooItem() { + this.property = "capitalism"; + } + FooItem.prototype.foo = function () { }; + return FooItem; +}()); +exports.FooItem = FooItem; +function WithTags(Base) { + return (function (_super) { + __extends(class_2, _super); + function class_2() { + return _super !== null && _super.apply(this, arguments) || this; + } + class_2.getTags = function () { }; + class_2.prototype.tags = function () { }; + return class_2; + }(Base)); +} +exports.WithTags = WithTags; +var Test = (function (_super) { + __extends(Test, _super); + function Test() { + return _super !== null && _super.apply(this, arguments) || this; + } + return Test; +}(WithTags(FooItem))); +exports.Test = Test; +var test = new Test(); +Test.getTags(); +test.tags(); +var _a; diff --git a/tests/baselines/reference/importDeclTypes.errors.txt b/tests/baselines/reference/importDeclTypes.errors.txt index dfb8fcb6f48..ee2a9c86eb5 100644 --- a/tests/baselines/reference/importDeclTypes.errors.txt +++ b/tests/baselines/reference/importDeclTypes.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/a.ts(1,21): error TS6137: Cannot import type declaration files. Consider importing 'foo-bar' instead of '@types/foo-bar'. +/a.ts(1,21): error TS6137: Cannot import type declaration files. Consider importing 'foo-bar' instead of '@types/foo-bar'. ==== /node_modules/@types/foo-bar/index.d.ts (0 errors) ==== @@ -7,7 +7,7 @@ tests/cases/compiler/a.ts(1,21): error TS6137: Cannot import type declaration fi } // This should error -==== tests/cases/compiler/a.ts (1 errors) ==== +==== /a.ts (1 errors) ==== import { Foo } from "@types/foo-bar"; ~~~~~~~~~~~~~~~~ !!! error TS6137: Cannot import type declaration files. Consider importing 'foo-bar' instead of '@types/foo-bar'. diff --git a/tests/baselines/reference/jsdocInTypeScript.errors.txt b/tests/baselines/reference/jsdocInTypeScript.errors.txt new file mode 100644 index 00000000000..621aa4677b4 --- /dev/null +++ b/tests/baselines/reference/jsdocInTypeScript.errors.txt @@ -0,0 +1,49 @@ +tests/cases/compiler/jsdocInTypeScript.ts(16,23): error TS2304: Cannot find name 'MyType'. +tests/cases/compiler/jsdocInTypeScript.ts(23,33): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/compiler/jsdocInTypeScript.ts(25,3): error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'. +tests/cases/compiler/jsdocInTypeScript.ts(25,15): error TS2339: Property 'length' does not exist on type 'number'. +tests/cases/compiler/jsdocInTypeScript.ts(30,3): error TS2339: Property 'x' does not exist on type '{}'. + + +==== tests/cases/compiler/jsdocInTypeScript.ts (5 errors) ==== + // JSDoc typedef tags are not bound TypeScript files. + /** @typedef {function} T */ + declare const x: T; + + class T { + prop: number; + } + + x.prop; + + // Just to be sure that @property has no impact either. + /** + * @typedef {Object} MyType + * @property {string} yes + */ + declare const myType: MyType; // should error, no such type + ~~~~~~ +!!! error TS2304: Cannot find name 'MyType'. + + // @param type has no effect. + /** + * @param {number} x + * @returns string + */ + function f(x: boolean) { return x * 2; } // Should error + ~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + // Should fail, because it takes a boolean and returns a number + f(1); f(true).length; + ~ +!!! error TS2345: Argument of type '1' is not assignable to parameter of type 'boolean'. + ~~~~~~ +!!! error TS2339: Property 'length' does not exist on type 'number'. + + // @type has no effect either. + /** @type {{ x?: number }} */ + const z = {}; + z.x = 1; + ~ +!!! error TS2339: Property 'x' does not exist on type '{}'. + \ No newline at end of file diff --git a/tests/baselines/reference/jsdocInTypeScript.js b/tests/baselines/reference/jsdocInTypeScript.js index af4b8b6ce0a..29782e92592 100644 --- a/tests/baselines/reference/jsdocInTypeScript.js +++ b/tests/baselines/reference/jsdocInTypeScript.js @@ -8,6 +8,27 @@ class T { } x.prop; + +// Just to be sure that @property has no impact either. +/** + * @typedef {Object} MyType + * @property {string} yes + */ +declare const myType: MyType; // should error, no such type + +// @param type has no effect. +/** + * @param {number} x + * @returns string + */ +function f(x: boolean) { return x * 2; } // Should error +// Should fail, because it takes a boolean and returns a number +f(1); f(true).length; + +// @type has no effect either. +/** @type {{ x?: number }} */ +const z = {}; +z.x = 1; //// [jsdocInTypeScript.js] @@ -17,3 +38,16 @@ var T = (function () { return T; }()); x.prop; +// @param type has no effect. +/** + * @param {number} x + * @returns string + */ +function f(x) { return x * 2; } // Should error +// Should fail, because it takes a boolean and returns a number +f(1); +f(true).length; +// @type has no effect either. +/** @type {{ x?: number }} */ +var z = {}; +z.x = 1; diff --git a/tests/baselines/reference/jsdocInTypeScript.symbols b/tests/baselines/reference/jsdocInTypeScript.symbols deleted file mode 100644 index 62b6ad3c539..00000000000 --- a/tests/baselines/reference/jsdocInTypeScript.symbols +++ /dev/null @@ -1,19 +0,0 @@ -=== tests/cases/compiler/jsdocInTypeScript.ts === -// JSDoc typedef tags are not bound TypeScript files. -/** @typedef {function} T */ -declare const x: T; ->x : Symbol(x, Decl(jsdocInTypeScript.ts, 2, 13)) ->T : Symbol(T, Decl(jsdocInTypeScript.ts, 2, 19)) - -class T { ->T : Symbol(T, Decl(jsdocInTypeScript.ts, 2, 19)) - - prop: number; ->prop : Symbol(T.prop, Decl(jsdocInTypeScript.ts, 4, 9)) -} - -x.prop; ->x.prop : Symbol(T.prop, Decl(jsdocInTypeScript.ts, 4, 9)) ->x : Symbol(x, Decl(jsdocInTypeScript.ts, 2, 13)) ->prop : Symbol(T.prop, Decl(jsdocInTypeScript.ts, 4, 9)) - diff --git a/tests/baselines/reference/jsdocInTypeScript.types b/tests/baselines/reference/jsdocInTypeScript.types deleted file mode 100644 index 03ff2929e0a..00000000000 --- a/tests/baselines/reference/jsdocInTypeScript.types +++ /dev/null @@ -1,19 +0,0 @@ -=== tests/cases/compiler/jsdocInTypeScript.ts === -// JSDoc typedef tags are not bound TypeScript files. -/** @typedef {function} T */ -declare const x: T; ->x : T ->T : T - -class T { ->T : T - - prop: number; ->prop : number -} - -x.prop; ->x.prop : number ->x : T ->prop : number - diff --git a/tests/baselines/reference/modularizeLibrary_Dom.iterable.types b/tests/baselines/reference/modularizeLibrary_Dom.iterable.types index e8656beb985..b06aaa08297 100644 --- a/tests/baselines/reference/modularizeLibrary_Dom.iterable.types +++ b/tests/baselines/reference/modularizeLibrary_Dom.iterable.types @@ -2,9 +2,9 @@ for (const element of document.getElementsByTagName("a")) { >element : HTMLAnchorElement >document.getElementsByTagName("a") : NodeListOf ->document.getElementsByTagName : { (tagname: K): ElementListTagNameMap[K]; (tagname: string): NodeListOf; } +>document.getElementsByTagName : { (tagname: K): ElementListTagNameMap[K]; (tagname: string): NodeListOf; } >document : Document ->getElementsByTagName : { (tagname: K): ElementListTagNameMap[K]; (tagname: string): NodeListOf; } +>getElementsByTagName : { (tagname: K): ElementListTagNameMap[K]; (tagname: string): NodeListOf; } >"a" : "a" element.href; diff --git a/tests/cases/compiler/emitClassExpressionInDeclarationFile.ts b/tests/cases/compiler/emitClassExpressionInDeclarationFile.ts new file mode 100644 index 00000000000..f99bcbd7efd --- /dev/null +++ b/tests/cases/compiler/emitClassExpressionInDeclarationFile.ts @@ -0,0 +1,30 @@ +// @declaration: true +export var simpleExample = class { + static getTags() { } + tags() { } +} +export var circularReference = class C { + static getTags(c: C): C { return c } + tags(c: C): C { return c } +} + +// repro from #15066 +export class FooItem { + foo(): void { } + name?: string; +} + +export type Constructor = new(...args: any[]) => T; +export function WithTags>(Base: T) { + return class extends Base { + static getTags(): void { } + tags(): void { } + } +} + +export class Test extends WithTags(FooItem) {} + +const test = new Test(); + +Test.getTags() +test.tags(); diff --git a/tests/cases/compiler/emitClassExpressionInDeclarationFile2.ts b/tests/cases/compiler/emitClassExpressionInDeclarationFile2.ts new file mode 100644 index 00000000000..3175f2afce7 --- /dev/null +++ b/tests/cases/compiler/emitClassExpressionInDeclarationFile2.ts @@ -0,0 +1,29 @@ +// @declaration: true +export var noPrivates = class { + static getTags() { } + tags() { } + private static ps = -1 + private p = 12 +} + +// altered repro from #15066 to add private property +export class FooItem { + foo(): void { } + name?: string; + private property = "capitalism" +} + +export type Constructor = new(...args: any[]) => T; +export function WithTags>(Base: T) { + return class extends Base { + static getTags(): void { } + tags(): void { } + } +} + +export class Test extends WithTags(FooItem) {} + +const test = new Test(); + +Test.getTags() +test.tags(); diff --git a/tests/cases/compiler/importDeclTypes.ts b/tests/cases/compiler/importDeclTypes.ts index 01fcd0e7b6f..ab7ba50c236 100644 --- a/tests/cases/compiler/importDeclTypes.ts +++ b/tests/cases/compiler/importDeclTypes.ts @@ -5,5 +5,5 @@ export interface Foo { } // This should error -// @filename: a.ts +// @filename: /a.ts import { Foo } from "@types/foo-bar"; diff --git a/tests/cases/compiler/jsdocInTypeScript.ts b/tests/cases/compiler/jsdocInTypeScript.ts index ba9e8dbcbff..08cfb6d5af5 100644 --- a/tests/cases/compiler/jsdocInTypeScript.ts +++ b/tests/cases/compiler/jsdocInTypeScript.ts @@ -7,3 +7,24 @@ class T { } x.prop; + +// Just to be sure that @property has no impact either. +/** + * @typedef {Object} MyType + * @property {string} yes + */ +declare const myType: MyType; // should error, no such type + +// @param type has no effect. +/** + * @param {number} x + * @returns string + */ +function f(x: boolean) { return x * 2; } // Should error +// Should fail, because it takes a boolean and returns a number +f(1); f(true).length; + +// @type has no effect either. +/** @type {{ x?: number }} */ +const z = {}; +z.x = 1; diff --git a/tests/cases/fourslash/findAllRefsJsDocTypeDef.ts b/tests/cases/fourslash/findAllRefsJsDocTypeDef.ts new file mode 100644 index 00000000000..204a4748686 --- /dev/null +++ b/tests/cases/fourslash/findAllRefsJsDocTypeDef.ts @@ -0,0 +1,9 @@ +/// + +// Just testing that this doesn't cause an exception due to the @typedef contents not having '.parent' set. +// But it isn't bound to a Symbol so find-all-refs will return nothing. + +/////** @typedef {Object} [|T|] */ +////function foo() {} + +verify.referenceGroups(test.ranges()[0], undefined); diff --git a/tests/cases/fourslash/findAllRefsPrimitiveJsDoc.ts b/tests/cases/fourslash/findAllRefsPrimitiveJsDoc.ts new file mode 100644 index 00000000000..82daf720d19 --- /dev/null +++ b/tests/cases/fourslash/findAllRefsPrimitiveJsDoc.ts @@ -0,0 +1,11 @@ +// @noLib: true + +/// + +/////** +//// * @param {[|number|]} n +//// * @returns {[|number|]} +//// */ +////function f(n: [|number|]): [|number|] {} + +verify.singleReferenceGroup("number"); diff --git a/tests/cases/fourslash/importNameCodeFixNewImportFromAtTypes.ts b/tests/cases/fourslash/importNameCodeFixNewImportFromAtTypes.ts new file mode 100644 index 00000000000..bca8f716200 --- /dev/null +++ b/tests/cases/fourslash/importNameCodeFixNewImportFromAtTypes.ts @@ -0,0 +1,13 @@ +/// + +//// [|f1/*0*/();|] + +// @Filename: node_modules/@types/myLib/index.d.ts +//// export function f1() {} +//// export var v1 = 5; + +verify.importFixAtPosition([ +`import { f1 } from "myLib"; + +f1();` +]); \ No newline at end of file diff --git a/tests/cases/fourslash/importNameCodeFixNewImportFromAtTypesScopedPackage.ts b/tests/cases/fourslash/importNameCodeFixNewImportFromAtTypesScopedPackage.ts new file mode 100644 index 00000000000..3cf6cf8a32e --- /dev/null +++ b/tests/cases/fourslash/importNameCodeFixNewImportFromAtTypesScopedPackage.ts @@ -0,0 +1,13 @@ +/// + +//// [|f1/*0*/();|] + +// @Filename: node_modules/@types/myLib__scoped/index.d.ts +//// export function f1() {} +//// export var v1 = 5; + +verify.importFixAtPosition([ +`import { f1 } from "@myLib/scoped"; + +f1();` +]); \ No newline at end of file diff --git a/tests/cases/fourslash/jsDocServices.ts b/tests/cases/fourslash/jsDocServices.ts new file mode 100644 index 00000000000..df1e985f876 --- /dev/null +++ b/tests/cases/fourslash/jsDocServices.ts @@ -0,0 +1,24 @@ +/// + +// Note: We include the word "foo" in the documentation to test for a bug where +// the `.getChildren()` of the JSDocParameterTag included an identifier at that position with no '.text'. +////interface /*I*/I {} +//// +/////** +//// * @param /*use*/[|foo|] I pity the foo +//// */ +////function f([|/*def*/{| "isWriteAccess": true, "isDefinition": true |}foo|]: I) { +//// return [|foo|]; +////} + +const ranges = test.ranges(); +goTo.marker("use"); +verify.goToDefinitionIs("def"); +verify.goToType("use", "I"); + +goTo.marker("use"); +verify.quickInfoIs("(parameter) foo: I", "I pity the foo"); + +verify.singleReferenceGroup("(parameter) foo: I"); +verify.rangesAreDocumentHighlights(); +verify.rangesAreRenameLocations();