diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index e6cfe03..8f3dd79 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -7,11 +7,29 @@ jobs: name: documents updated runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: ruby/setup-ruby@v1 with: ruby-version: 3.1 bundler-cache: true - - run: | + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + path: puppeteer + repository: puppeteer/puppeteer + - uses: actions/setup-node@v3 + with: + node-version: 16 + - name: Check puppeteer.api.json is updated + run: | + cd puppeteer + git checkout v$(cat ../development/DOCS_VERSION) + npm install && npm run build + cd ../ + cp puppeteer/docs/puppeteer.api.json development/puppeteer.api.json + rm -rf puppeteer + git diff --exit-code + - name: Check api_coverage doc is updated + run: | bundle exec ruby development/generate_api_coverage.rb git diff --exit-code diff --git a/development/DOCS_VERSION b/development/DOCS_VERSION new file mode 100644 index 0000000..bb3dda5 --- /dev/null +++ b/development/DOCS_VERSION @@ -0,0 +1 @@ +15.3.2 diff --git a/development/generate_api_coverage.rb b/development/generate_api_coverage.rb index be08f75..6996ef1 100644 --- a/development/generate_api_coverage.rb +++ b/development/generate_api_coverage.rb @@ -1,131 +1,85 @@ require 'bundler/setup' +require 'json' -# fetch raw api.md text from github.com/puppeteer/puppeteer -class RawApiMdReader - def initialize(git_tag) - @url = "https://raw.githubusercontent.com/puppeteer/puppeteer/#{git_tag}/docs/api.md" +class Member + def initialize(json) + @kind = json['kind'] + @name = json['name'] + @canonical_reference = json['canonicalReference'] + @members = json['members'] end - # @returns [String] - def read - require 'net/http' - require 'uri' + attr_reader :kind, :name, :canonical_reference - uri = URI.parse(@url) - Net::HTTP.get_response(uri).tap(&:value).body + INSPECT_ALLOW_LIST = ['kind', 'canonicalReference', 'name'] + def inspect + { + kind: @kind, + name: @name, + canonical_reference: @canonical_reference, + members: @members&.map { |member| member.select { |key, _| INSPECT_ALLOW_LIST.include?(key) } }, + }.compact.inspect end -end -class ApiMdParser - def initialize(raw_doc) - @raw = raw_doc.split("\n") + def class? + @kind == 'Class' end - def parse - skip_until_class_docs - class_doc_chunks.map do |chunk| - ClassDocParser.new(chunk).parse - end + def method? + @kind == 'Method' || @kind == 'Function' end - private def skip_until_class_docs - @raw.shift until @raw.first =~ /^### class:/ + def property? + @kind == 'Variable' && @name =~ /^[a-z]/ end - private def class_doc_chunks - Enumerator.new do |docs| - loop do - buf = [] - buf << @raw.shift - buf << @raw.shift until @raw.first =~ /^### / - - docs << buf - break unless @raw.first.start_with?('### class:') - end + def members + @__members ||= @members.map do |json| + Member.new(json) end end end -class ClassDoc - def initialize(name, methods, events) - @name = name - @methods = methods - @events = events - end - attr_reader :name, :methods, :events -end - -class MethodDoc - def initialize(name) - @name = name - end - attr_reader :name -end - -class EventDoc - def initialize(name) - @name = name +class ApiDocJsonParser + def initialize(raw_doc) + json = JSON.parse(raw_doc) + @root = Member.new(json) end - attr_reader :name -end -class ClassDocParser - def initialize(md_lines) - @raw = md_lines + def puppeteer_doc + ClassDoc.new('Puppeteer', method_docs_for(puppeteer_entrypoint)) end - def parse - title = @raw.shift[11..-1] - skip_until_method_or_event_docs - methods = [] - events = [] - method_or_event_doc_chunks.each do |chunk| - if chunk.first.include?('event:') - events << EventDocParser.new(chunk).parse - elsif chunk.first.match(/#### [a-zA-Z]+\.([^(]+)/) - methods << MethodDocParser.new(chunk).parse - end + def class_docs + puppeteer_entrypoint.members.filter_map do |member| + ClassDoc.new(member.name, method_docs_for(member)) if member.class? end - - ClassDoc.new(title, methods, events) end - private def skip_until_method_or_event_docs - @raw.shift until @raw.first.nil? || @raw.first =~ /^#### [a-zA-Z]/ + private def puppeteer_entrypoint + @root.members.first end - private def method_or_event_doc_chunks - Enumerator.new do |docs| - loop do - break if @raw.first.nil? - buf = [] - buf << @raw.shift - buf << @raw.shift until @raw.first.nil? || @raw.first =~ /^#### / - - docs << buf - end + private def method_docs_for(member) + member.members.filter_map do |m| + MethodDoc.new(m.name) if m.method? || m.property? end end end -class MethodDocParser - def initialize(md_lines) - @raw = md_lines - end - - def parse - MethodDoc.new(@raw.first.match(/#### [a-zA-Z]+\.([^(]+)/)[1]) +class ClassDoc + def initialize(name, methods) + @name = name + @methods = methods end + attr_reader :name, :methods end -class EventDocParser - def initialize(md_lines) - @raw = md_lines - end - - def parse - EventDoc.new(@raw.first[13...-1]) +class MethodDoc + def initialize(name) + @name = name end + attr_reader :name end require 'dry/inflector' @@ -269,9 +223,11 @@ def api_coverages end end -raw_md = RawApiMdReader.new('v15.2.0').read -class_docs = ApiMdParser.new(raw_md).parse - +apidoc_content = File.read(File.join(__dir__, 'puppeteer.api.json')) +parser = ApiDocJsonParser.new(apidoc_content) +class_docs = parser.class_docs +class_docs.delete_if { |doc| doc.name.start_with?('Puppeteer') } +class_docs.unshift(parser.puppeteer_doc) File.open(File.join('.', 'docs', 'api_coverage.md'), 'w') do |f| f.write("# API coverages\n") diff --git a/development/puppeteer.api.json b/development/puppeteer.api.json new file mode 100644 index 0000000..cc1ab5b --- /dev/null +++ b/development/puppeteer.api.json @@ -0,0 +1,30001 @@ +{ + "metadata": { + "toolPackage": "@microsoft/api-extractor", + "toolVersion": "7.24.2", + "schemaVersion": 1005, + "oldestForwardsCompatibleVersion": 1001, + "tsdocConfig": { + "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", + "noStandardTags": true, + "tagDefinitions": [ + { + "tagName": "@alpha", + "syntaxKind": "modifier" + }, + { + "tagName": "@beta", + "syntaxKind": "modifier" + }, + { + "tagName": "@defaultValue", + "syntaxKind": "block" + }, + { + "tagName": "@decorator", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@deprecated", + "syntaxKind": "block" + }, + { + "tagName": "@eventProperty", + "syntaxKind": "modifier" + }, + { + "tagName": "@example", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@experimental", + "syntaxKind": "modifier" + }, + { + "tagName": "@inheritDoc", + "syntaxKind": "inline" + }, + { + "tagName": "@internal", + "syntaxKind": "modifier" + }, + { + "tagName": "@label", + "syntaxKind": "inline" + }, + { + "tagName": "@link", + "syntaxKind": "inline", + "allowMultiple": true + }, + { + "tagName": "@override", + "syntaxKind": "modifier" + }, + { + "tagName": "@packageDocumentation", + "syntaxKind": "modifier" + }, + { + "tagName": "@param", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@privateRemarks", + "syntaxKind": "block" + }, + { + "tagName": "@public", + "syntaxKind": "modifier" + }, + { + "tagName": "@readonly", + "syntaxKind": "modifier" + }, + { + "tagName": "@remarks", + "syntaxKind": "block" + }, + { + "tagName": "@returns", + "syntaxKind": "block" + }, + { + "tagName": "@sealed", + "syntaxKind": "modifier" + }, + { + "tagName": "@see", + "syntaxKind": "block" + }, + { + "tagName": "@throws", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@typeParam", + "syntaxKind": "block", + "allowMultiple": true + }, + { + "tagName": "@virtual", + "syntaxKind": "modifier" + }, + { + "tagName": "@betaDocumentation", + "syntaxKind": "modifier" + }, + { + "tagName": "@internalRemarks", + "syntaxKind": "block" + }, + { + "tagName": "@preapproved", + "syntaxKind": "modifier" + } + ], + "supportForTags": { + "@alpha": true, + "@beta": true, + "@defaultValue": true, + "@decorator": true, + "@deprecated": true, + "@eventProperty": true, + "@example": true, + "@experimental": true, + "@inheritDoc": true, + "@internal": true, + "@label": true, + "@link": true, + "@override": true, + "@packageDocumentation": true, + "@param": true, + "@privateRemarks": true, + "@public": true, + "@readonly": true, + "@remarks": true, + "@returns": true, + "@sealed": true, + "@see": true, + "@throws": true, + "@typeParam": true, + "@virtual": true, + "@betaDocumentation": true, + "@internalRemarks": true, + "@preapproved": true + }, + "reportUnsupportedHtmlElements": false + } + }, + "kind": "Package", + "canonicalReference": "puppeteer!", + "docComment": "", + "name": "puppeteer", + "members": [ + { + "kind": "EntryPoint", + "canonicalReference": "puppeteer!", + "name": "", + "members": [ + { + "kind": "Class", + "canonicalReference": "puppeteer!Accessibility:class", + "docComment": "/**\n * The Accessibility class provides methods for inspecting Chromium's accessibility tree. The accessibility tree is used by assistive technology such as {@link https://en.wikipedia.org/wiki/Screen_reader | screen readers} or {@link https://en.wikipedia.org/wiki/Switch_access | switches}.\n *\n * @remarks\n *\n * Accessibility is a very platform-specific thing. On different platforms, there are different screen readers that might have wildly different output.\n *\n * Blink - Chrome's rendering engine - has a concept of \"accessibility tree\", which is then translated into different platform-specific APIs. Accessibility namespace gives users access to the Blink Accessibility Tree.\n *\n * Most of the accessibility tree gets filtered out when converting from Blink AX Tree to Platform-specific AX-Tree or by assistive technologies themselves. By default, Puppeteer tries to approximate this filtering, exposing only the \"interesting\" nodes of the tree.\n *\n * The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `Accessibility` class.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Accessibility " + } + ], + "releaseTag": "Public", + "name": "Accessibility", + "members": [ + { + "kind": "Method", + "canonicalReference": "puppeteer!Accessibility#snapshot:member(1)", + "docComment": "/**\n * Captures the current state of the accessibility tree. The returned object represents the root accessible node of the page.\n *\n * @remarks\n *\n * **NOTE** The Chromium accessibility tree contains nodes that go unused on most platforms and by most screen readers. Puppeteer will discard them as well for an easier to process tree, unless `interestingOnly` is set to `false`.\n *\n * @returns An AXNode object representing the snapshot.\n *\n * @example\n *\n * An example of dumping the entire accessibility tree:\n * ```ts\n * const snapshot = await page.accessibility.snapshot();\n * console.log(snapshot);\n * ```\n *\n * @example\n *\n * An example of logging the focused node's name:\n * ```ts\n * const snapshot = await page.accessibility.snapshot();\n * const node = findFocusedNode(snapshot);\n * console.log(node && node.name);\n *\n * function findFocusedNode(node) {\n * if (node.focused)\n * return node;\n * for (const child of node.children || []) {\n * const foundNode = findFocusedNode(child);\n * return foundNode;\n * }\n * return null;\n * }\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "snapshot(options?: " + }, + { + "kind": "Reference", + "text": "SnapshotOptions", + "canonicalReference": "puppeteer!SnapshotOptions:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "SerializedAXNode", + "canonicalReference": "puppeteer!SerializedAXNode:interface" + }, + { + "kind": "Content", + "text": " | null>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 7 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + } + ], + "name": "snapshot" + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "puppeteer!ActionResult:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare type ActionResult = " + }, + { + "kind": "Content", + "text": "'continue' | 'abort' | 'respond'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "ActionResult", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "puppeteer!Awaitable:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare type Awaitable = " + }, + { + "kind": "Content", + "text": "T | " + }, + { + "kind": "Reference", + "text": "PromiseLike", + "canonicalReference": "!PromiseLike:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "Awaitable", + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 0, + "endIndex": 0 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer!BoundingBox:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface BoundingBox extends " + }, + { + "kind": "Reference", + "text": "Point", + "canonicalReference": "puppeteer!Point:interface" + }, + { + "kind": "Content", + "text": " " + } + ], + "releaseTag": "Public", + "name": "BoundingBox", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!BoundingBox#height:member", + "docComment": "/**\n * the height of the element in pixels.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "height: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "height", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!BoundingBox#width:member", + "docComment": "/**\n * the width of the element in pixels.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "width: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "width", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 2 + } + ] + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer!BoxModel:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface BoxModel " + } + ], + "releaseTag": "Public", + "name": "BoxModel", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!BoxModel#border:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "border: " + }, + { + "kind": "Reference", + "text": "Point", + "canonicalReference": "puppeteer!Point:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "border", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!BoxModel#content:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "content: " + }, + { + "kind": "Reference", + "text": "Point", + "canonicalReference": "puppeteer!Point:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "content", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!BoxModel#height:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "height: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "height", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!BoxModel#margin:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "margin: " + }, + { + "kind": "Reference", + "text": "Point", + "canonicalReference": "puppeteer!Point:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "margin", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!BoxModel#padding:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "padding: " + }, + { + "kind": "Reference", + "text": "Point", + "canonicalReference": "puppeteer!Point:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "padding", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!BoxModel#width:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "width: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "width", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "puppeteer!Browser:class", + "docComment": "/**\n * A Browser is created when Puppeteer connects to a Chromium instance, either through {@link PuppeteerNode.launch} or {@link Puppeteer.connect}.\n *\n * @remarks\n *\n * The Browser class extends from Puppeteer's {@link EventEmitter} class and will emit various events which are documented in the {@link BrowserEmittedEvents} enum.\n *\n * The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `Browser` class.\n *\n * @example\n *\n * An example of using a {@link Browser} to create a {@link Page}:\n * ```ts\n * const puppeteer = require('puppeteer');\n *\n * (async () => {\n * const browser = await puppeteer.launch();\n * const page = await browser.newPage();\n * await page.goto('https://example.com');\n * await browser.close();\n * })();\n * ```\n *\n * @example\n *\n * An example of disconnecting from and reconnecting to a {@link Browser}:\n * ```ts\n * const puppeteer = require('puppeteer');\n *\n * (async () => {\n * const browser = await puppeteer.launch();\n * // Store the endpoint to be able to reconnect to Chromium\n * const browserWSEndpoint = browser.wsEndpoint();\n * // Disconnect puppeteer from Chromium\n * browser.disconnect();\n *\n * // Use the endpoint to reestablish a connection\n * const browser2 = await puppeteer.connect({browserWSEndpoint});\n * // Close Chromium\n * await browser2.close();\n * })();\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Browser extends " + }, + { + "kind": "Reference", + "text": "EventEmitter", + "canonicalReference": "puppeteer!EventEmitter:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "releaseTag": "Public", + "name": "Browser", + "members": [ + { + "kind": "Method", + "canonicalReference": "puppeteer!Browser#browserContexts:member(1)", + "docComment": "/**\n * Returns an array of all open browser contexts. In a newly created browser, this will return a single instance of {@link BrowserContext}.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "browserContexts(): " + }, + { + "kind": "Reference", + "text": "BrowserContext", + "canonicalReference": "puppeteer!BrowserContext:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "browserContexts" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!Browser#close:member(1)", + "docComment": "/**\n * Closes Chromium and all of its pages (if any were opened). The {@link Browser} object itself is considered to be disposed and cannot be used anymore.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "close(): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "close" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!Browser#createIncognitoBrowserContext:member(1)", + "docComment": "/**\n * Creates a new incognito browser context. This won't share cookies/cache with other browser contexts.\n *\n * @example\n * ```ts\n * (async () => {\n * const browser = await puppeteer.launch();\n * // Create a new incognito browser context.\n * const context = await browser.createIncognitoBrowserContext();\n * // Create a new page in a pristine context.\n * const page = await context.newPage();\n * // Do stuff\n * await page.goto('https://example.com');\n * })();\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "createIncognitoBrowserContext(options?: " + }, + { + "kind": "Reference", + "text": "BrowserContextOptions", + "canonicalReference": "puppeteer!BrowserContextOptions:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "BrowserContext", + "canonicalReference": "puppeteer!BrowserContext:class" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 7 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + } + ], + "name": "createIncognitoBrowserContext" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!Browser#defaultBrowserContext:member(1)", + "docComment": "/**\n * Returns the default browser context. The default browser context cannot be closed.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "defaultBrowserContext(): " + }, + { + "kind": "Reference", + "text": "BrowserContext", + "canonicalReference": "puppeteer!BrowserContext:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "defaultBrowserContext" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!Browser#disconnect:member(1)", + "docComment": "/**\n * Disconnects Puppeteer from the browser, but leaves the Chromium process running. After calling `disconnect`, the {@link Browser} object is considered disposed and cannot be used anymore.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "disconnect(): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "disconnect" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!Browser#isConnected:member(1)", + "docComment": "/**\n * Indicates that the browser is connected.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "isConnected(): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "isConnected" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!Browser#newPage:member(1)", + "docComment": "/**\n * Promise which resolves to a new {@link Page} object. The Page is created in a default browser context.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "newPage(): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Page", + "canonicalReference": "puppeteer!Page:class" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "newPage" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!Browser#pages:member(1)", + "docComment": "/**\n * An array of all open pages inside the Browser.\n *\n * @remarks\n *\n * In case of multiple browser contexts, returns an array with all the pages in all browser contexts. Non-visible pages, such as `\"background_page\"`, will not be listed here. You can find them using {@link Target.page}.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "pages(): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Page", + "canonicalReference": "puppeteer!Page:class" + }, + { + "kind": "Content", + "text": "[]>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "pages" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!Browser#process:member(1)", + "docComment": "/**\n * The spawned browser process. Returns `null` if the browser instance was created with {@link Puppeteer.connect}.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "process(): " + }, + { + "kind": "Reference", + "text": "ChildProcess", + "canonicalReference": "!\"\\\"child_process\\\"\".ChildProcess:class" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "process" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!Browser#target:member(1)", + "docComment": "/**\n * The target associated with the browser.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "target(): " + }, + { + "kind": "Reference", + "text": "Target", + "canonicalReference": "puppeteer!Target:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "target" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!Browser#targets:member(1)", + "docComment": "/**\n * All active targets inside the Browser. In case of multiple browser contexts, returns an array with all the targets in all browser contexts.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "targets(): " + }, + { + "kind": "Reference", + "text": "Target", + "canonicalReference": "puppeteer!Target:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "targets" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!Browser#userAgent:member(1)", + "docComment": "/**\n * The browser's original user agent. Pages can override the browser user agent with {@link Page.setUserAgent}.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "userAgent(): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "userAgent" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!Browser#version:member(1)", + "docComment": "/**\n * A string representing the browser name and version.\n *\n * @remarks\n *\n * For headless Chromium, this is similar to `HeadlessChrome/61.0.3153.0`. For non-headless, this is similar to `Chrome/61.0.3153.0`.\n *\n * The format of browser.version() might change with future releases of Chromium.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "version(): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "version" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!Browser#waitForTarget:member(1)", + "docComment": "/**\n * Searches for a target in all browser contexts.\n *\n * @param predicate - A function to be run for every target.\n *\n * @returns The first target found that matches the `predicate` function.\n *\n * @example\n *\n * An example of finding a target for a page opened via `window.open`:\n * ```ts\n * await page.evaluate(() => window.open('https://www.example.com/'));\n * const newWindowTarget = await browser.waitForTarget(target => target.url() === 'https://www.example.com/');\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "waitForTarget(predicate: " + }, + { + "kind": "Content", + "text": "(x: " + }, + { + "kind": "Reference", + "text": "Target", + "canonicalReference": "puppeteer!Target:class" + }, + { + "kind": "Content", + "text": ") => boolean | " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ", options?: " + }, + { + "kind": "Reference", + "text": "WaitForTargetOptions", + "canonicalReference": "puppeteer!WaitForTargetOptions:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Target", + "canonicalReference": "puppeteer!Target:class" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 13 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "predicate", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": true + } + ], + "name": "waitForTarget" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!Browser#wsEndpoint:member(1)", + "docComment": "/**\n * The browser websocket endpoint which can be used as an argument to {@link Puppeteer.connect}.\n *\n * @remarks\n *\n * The format is `ws://${host}:${port}/devtools/browser/`.\n *\n * You can find the `webSocketDebuggerUrl` from `http://${host}:${port}/json/version`. Learn more about the {@link https://chromedevtools.github.io/devtools-protocol | devtools protocol} and the {@link https://chromedevtools.github.io/devtools-protocol/#how-do-i-access-the-browser-target | browser endpoint}.\n *\n * @returns The Browser websocket url.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "wsEndpoint(): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "wsEndpoint" + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer!BrowserConnectOptions:interface", + "docComment": "/**\n * Generic browser options that can be passed when launching any browser or when connecting to an existing browser instance.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface BrowserConnectOptions " + } + ], + "releaseTag": "Public", + "name": "BrowserConnectOptions", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!BrowserConnectOptions#defaultViewport:member", + "docComment": "/**\n * Sets the viewport for each page.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "defaultViewport?: " + }, + { + "kind": "Reference", + "text": "Viewport", + "canonicalReference": "puppeteer!Viewport:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "defaultViewport", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!BrowserConnectOptions#ignoreHTTPSErrors:member", + "docComment": "/**\n * Whether to ignore HTTPS errors during navigation.\n *\n * @defaultValue\n *\n * false\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "ignoreHTTPSErrors?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "ignoreHTTPSErrors", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!BrowserConnectOptions#slowMo:member", + "docComment": "/**\n * Slows down Puppeteer operations by the specified amount of milliseconds to aid debugging.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "slowMo?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "slowMo", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!BrowserConnectOptions#targetFilter:member", + "docComment": "/**\n * Callback to decide if Puppeteer should connect to a given target or not.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "targetFilter?: " + }, + { + "kind": "Reference", + "text": "TargetFilterCallback", + "canonicalReference": "puppeteer!TargetFilterCallback:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "targetFilter", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "puppeteer!BrowserContext:class", + "docComment": "/**\n * BrowserContexts provide a way to operate multiple independent browser sessions. When a browser is launched, it has a single BrowserContext used by default. The method {@link Browser.newPage | Browser.newPage} creates a page in the default browser context.\n *\n * @remarks\n *\n * The Browser class extends from Puppeteer's {@link EventEmitter} class and will emit various events which are documented in the {@link BrowserContextEmittedEvents} enum.\n *\n * If a page opens another page, e.g. with a `window.open` call, the popup will belong to the parent page's browser context.\n *\n * Puppeteer allows creation of \"incognito\" browser contexts with {@link Browser.createIncognitoBrowserContext | Browser.createIncognitoBrowserContext} method. \"Incognito\" browser contexts don't write any browsing data to disk.\n *\n * The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `BrowserContext` class.\n *\n * @example\n * ```ts\n * // Create a new incognito browser context\n * const context = await browser.createIncognitoBrowserContext();\n * // Create a new page inside context.\n * const page = await context.newPage();\n * // ... do stuff with page ...\n * await page.goto('https://example.com');\n * // Dispose context once it's no longer needed.\n * await context.close();\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class BrowserContext extends " + }, + { + "kind": "Reference", + "text": "EventEmitter", + "canonicalReference": "puppeteer!EventEmitter:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "releaseTag": "Public", + "name": "BrowserContext", + "members": [ + { + "kind": "Method", + "canonicalReference": "puppeteer!BrowserContext#browser:member(1)", + "docComment": "/**\n * The browser this browser context belongs to.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "browser(): " + }, + { + "kind": "Reference", + "text": "Browser", + "canonicalReference": "puppeteer!Browser:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "browser" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!BrowserContext#clearPermissionOverrides:member(1)", + "docComment": "/**\n * Clears all permission overrides for the browser context.\n *\n * @example\n * ```ts\n * const context = browser.defaultBrowserContext();\n * context.overridePermissions('https://example.com', ['clipboard-read']);\n * // do stuff ..\n * context.clearPermissionOverrides();\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "clearPermissionOverrides(): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "clearPermissionOverrides" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!BrowserContext#close:member(1)", + "docComment": "/**\n * Closes the browser context. All the targets that belong to the browser context will be closed.\n *\n * @remarks\n *\n * Only incognito browser contexts can be closed.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "close(): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "close" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!BrowserContext#isIncognito:member(1)", + "docComment": "/**\n * Returns whether BrowserContext is incognito. The default browser context is the only non-incognito browser context.\n *\n * @remarks\n *\n * The default browser context cannot be closed.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "isIncognito(): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "isIncognito" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!BrowserContext#newPage:member(1)", + "docComment": "/**\n * Creates a new page in the browser context.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "newPage(): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Page", + "canonicalReference": "puppeteer!Page:class" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "newPage" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!BrowserContext#overridePermissions:member(1)", + "docComment": "/**\n * @param origin - The origin to grant permissions to, e.g. \"https://example.com\".\n *\n * @param permissions - An array of permissions to grant. All permissions that are not listed here will be automatically denied.\n *\n * @example\n * ```ts\n * const context = browser.defaultBrowserContext();\n * await context.overridePermissions('https://html5demos.com', ['geolocation']);\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "overridePermissions(origin: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", permissions: " + }, + { + "kind": "Reference", + "text": "Permission", + "canonicalReference": "puppeteer!Permission:type" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 6, + "endIndex": 8 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "origin", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "permissions", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "isOptional": false + } + ], + "name": "overridePermissions" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!BrowserContext#pages:member(1)", + "docComment": "/**\n * An array of all pages inside the browser context.\n *\n * @returns Promise which resolves to an array of all open pages. Non visible pages, such as `\"background_page\"`, will not be listed here. You can find them using {@link Target.page | the target page}.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "pages(): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Page", + "canonicalReference": "puppeteer!Page:class" + }, + { + "kind": "Content", + "text": "[]>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "pages" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!BrowserContext#targets:member(1)", + "docComment": "/**\n * An array of all active targets inside the browser context.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "targets(): " + }, + { + "kind": "Reference", + "text": "Target", + "canonicalReference": "puppeteer!Target:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "targets" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!BrowserContext#waitForTarget:member(1)", + "docComment": "/**\n * This searches for a target in this specific browser context.\n *\n * @param predicate - A function to be run for every target\n *\n * @param options - An object of options. Accepts a timout, which is the maximum wait time in milliseconds. Pass `0` to disable the timeout. Defaults to 30 seconds.\n *\n * @returns Promise which resolves to the first target found that matches the `predicate` function.\n *\n * @example\n *\n * An example of finding a target for a page opened via `window.open`:\n * ```ts\n * await page.evaluate(() => window.open('https://www.example.com/'));\n * const newWindowTarget = await browserContext.waitForTarget(target => target.url() === 'https://www.example.com/');\n * ```\n *\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "waitForTarget(predicate: " + }, + { + "kind": "Content", + "text": "(x: " + }, + { + "kind": "Reference", + "text": "Target", + "canonicalReference": "puppeteer!Target:class" + }, + { + "kind": "Content", + "text": ") => boolean | " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ", options?: " + }, + { + "kind": "Content", + "text": "{\n timeout?: number;\n }" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "Target", + "canonicalReference": "puppeteer!Target:class" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 13 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "predicate", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + }, + "isOptional": false + }, + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + }, + "isOptional": true + } + ], + "name": "waitForTarget" + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Enum", + "canonicalReference": "puppeteer!BrowserContextEmittedEvents:enum", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare const enum BrowserContextEmittedEvents " + } + ], + "releaseTag": "Public", + "name": "BrowserContextEmittedEvents", + "members": [ + { + "kind": "EnumMember", + "canonicalReference": "puppeteer!BrowserContextEmittedEvents.TargetChanged:member", + "docComment": "/**\n * Emitted when the url of a target inside the browser context changes. Contains a {@link Target} instance.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "TargetChanged = " + }, + { + "kind": "Content", + "text": "\"targetchanged\"" + } + ], + "releaseTag": "Public", + "name": "TargetChanged", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "EnumMember", + "canonicalReference": "puppeteer!BrowserContextEmittedEvents.TargetCreated:member", + "docComment": "/**\n * Emitted when a target is created within the browser context, for example when a new page is opened by {@link https://developer.mozilla.org/en-US/docs/Web/API/Window/open | window.open} or by {@link BrowserContext.newPage | browserContext.newPage}\n *\n * Contains a {@link Target} instance.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "TargetCreated = " + }, + { + "kind": "Content", + "text": "\"targetcreated\"" + } + ], + "releaseTag": "Public", + "name": "TargetCreated", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "EnumMember", + "canonicalReference": "puppeteer!BrowserContextEmittedEvents.TargetDestroyed:member", + "docComment": "/**\n * Emitted when a target is destroyed within the browser context, for example when a page is closed. Contains a {@link Target} instance.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "TargetDestroyed = " + }, + { + "kind": "Content", + "text": "\"targetdestroyed\"" + } + ], + "releaseTag": "Public", + "name": "TargetDestroyed", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ] + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer!BrowserContextOptions:interface", + "docComment": "/**\n * BrowserContext options.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface BrowserContextOptions " + } + ], + "releaseTag": "Public", + "name": "BrowserContextOptions", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!BrowserContextOptions#proxyBypassList:member", + "docComment": "/**\n * Bypass the proxy for the given semi-colon-separated list of hosts.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "proxyBypassList?: " + }, + { + "kind": "Content", + "text": "string[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "proxyBypassList", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!BrowserContextOptions#proxyServer:member", + "docComment": "/**\n * Proxy server with optional port to use for all requests. Username and password can be set in `Page.authenticate`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "proxyServer?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "proxyServer", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Enum", + "canonicalReference": "puppeteer!BrowserEmittedEvents:enum", + "docComment": "/**\n * All the events a {@link Browser | browser instance} may emit.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare const enum BrowserEmittedEvents " + } + ], + "releaseTag": "Public", + "name": "BrowserEmittedEvents", + "members": [ + { + "kind": "EnumMember", + "canonicalReference": "puppeteer!BrowserEmittedEvents.Disconnected:member", + "docComment": "/**\n * Emitted when Puppeteer gets disconnected from the Chromium instance. This might happen because of one of the following:\n *\n * - Chromium is closed or crashed\n *\n * - The {@link Browser.disconnect | browser.disconnect} method was called.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "Disconnected = " + }, + { + "kind": "Content", + "text": "\"disconnected\"" + } + ], + "releaseTag": "Public", + "name": "Disconnected", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "EnumMember", + "canonicalReference": "puppeteer!BrowserEmittedEvents.TargetChanged:member", + "docComment": "/**\n * Emitted when the url of a target changes. Contains a {@link Target} instance.\n *\n * @remarks\n *\n * Note that this includes target changes in incognito browser contexts.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "TargetChanged = " + }, + { + "kind": "Content", + "text": "\"targetchanged\"" + } + ], + "releaseTag": "Public", + "name": "TargetChanged", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "EnumMember", + "canonicalReference": "puppeteer!BrowserEmittedEvents.TargetCreated:member", + "docComment": "/**\n * Emitted when a target is created, for example when a new page is opened by {@link https://developer.mozilla.org/en-US/docs/Web/API/Window/open | window.open} or by {@link Browser.newPage | browser.newPage}\n *\n * Contains a {@link Target} instance.\n *\n * @remarks\n *\n * Note that this includes target creations in incognito browser contexts.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "TargetCreated = " + }, + { + "kind": "Content", + "text": "\"targetcreated\"" + } + ], + "releaseTag": "Public", + "name": "TargetCreated", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "EnumMember", + "canonicalReference": "puppeteer!BrowserEmittedEvents.TargetDestroyed:member", + "docComment": "/**\n * Emitted when a target is destroyed, for example when a page is closed. Contains a {@link Target} instance.\n *\n * @remarks\n *\n * Note that this includes target destructions in incognito browser contexts.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "TargetDestroyed = " + }, + { + "kind": "Content", + "text": "\"targetdestroyed\"" + } + ], + "releaseTag": "Public", + "name": "TargetDestroyed", + "initializerTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ] + }, + { + "kind": "Class", + "canonicalReference": "puppeteer!BrowserFetcher:class", + "docComment": "/**\n * BrowserFetcher can download and manage different versions of Chromium and Firefox.\n *\n * @remarks\n *\n * BrowserFetcher operates on revision strings that specify a precise version of Chromium, e.g. `\"533271\"`. Revision strings can be obtained from {@link http://omahaproxy.appspot.com/ | omahaproxy.appspot.com}. In the Firefox case, BrowserFetcher downloads Firefox Nightly and operates on version numbers such as `\"75\"`.\n *\n * The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `BrowserFetcher` class.\n *\n * @example\n *\n * An example of using BrowserFetcher to download a specific version of Chromium and running Puppeteer against it:\n * ```ts\n * const browserFetcher = puppeteer.createBrowserFetcher();\n * const revisionInfo = await browserFetcher.download('533271');\n * const browser = await puppeteer.launch({executablePath: revisionInfo.executablePath})\n * ```\n *\n * **NOTE** BrowserFetcher is not designed to work concurrently with other instances of BrowserFetcher that share the same downloads directory.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class BrowserFetcher " + } + ], + "releaseTag": "Public", + "name": "BrowserFetcher", + "members": [ + { + "kind": "Method", + "canonicalReference": "puppeteer!BrowserFetcher#canDownload:member(1)", + "docComment": "/**\n * Initiates a HEAD request to check if the revision is available.\n *\n * @remarks\n *\n * This method is affected by the current `product`.\n *\n * @param revision - The revision to check availability for.\n *\n * @returns A promise that resolves to `true` if the revision could be downloaded from the host.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "canDownload(revision: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "revision", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "canDownload" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!BrowserFetcher#download:member(1)", + "docComment": "/**\n * Initiates a GET request to download the revision from the host.\n *\n * @remarks\n *\n * This method is affected by the current `product`.\n *\n * @param revision - The revision to download.\n *\n * @param progressCallback - A function that will be called with two arguments: How many bytes have been downloaded and the total number of bytes of the download.\n *\n * @returns A promise with revision information when the revision is downloaded and extracted.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "download(revision: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", progressCallback?: " + }, + { + "kind": "Content", + "text": "(x: number, y: number) => void" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "BrowserFetcherRevisionInfo", + "canonicalReference": "puppeteer!BrowserFetcherRevisionInfo:interface" + }, + { + "kind": "Content", + "text": " | undefined>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 9 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "revision", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "progressCallback", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "name": "download" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!BrowserFetcher#host:member(1)", + "docComment": "/**\n * @returns The download host being used.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "host(): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "host" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!BrowserFetcher#localRevisions:member(1)", + "docComment": "/**\n * @remarks\n *\n * This method is affected by the current `product`.\n *\n * @returns A promise with a list of all revision strings (for the current `product`) available locally on disk.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "localRevisions(): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "localRevisions" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!BrowserFetcher#platform:member(1)", + "docComment": "/**\n * @returns Returns the current `Platform`, which is one of `mac`, `linux`, `win32` or `win64`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "platform(): " + }, + { + "kind": "Reference", + "text": "Platform", + "canonicalReference": "puppeteer!Platform:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "platform" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!BrowserFetcher#product:member(1)", + "docComment": "/**\n * @returns Returns the current `Product`, which is one of `chrome` or `firefox`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "product(): " + }, + { + "kind": "Reference", + "text": "Product", + "canonicalReference": "puppeteer!Product:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "product" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!BrowserFetcher#remove:member(1)", + "docComment": "/**\n * @remarks\n *\n * This method is affected by the current `product`.\n *\n * @param revision - A revision to remove for the current `product`.\n *\n * @returns A promise that resolves when the revision has been removes or throws if the revision has not been downloaded.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "remove(revision: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "revision", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "remove" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!BrowserFetcher#revisionInfo:member(1)", + "docComment": "/**\n * @param revision - The revision to get info for.\n *\n * @returns The revision info for the given revision.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "revisionInfo(revision: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "BrowserFetcherRevisionInfo", + "canonicalReference": "puppeteer!BrowserFetcherRevisionInfo:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "revision", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "revisionInfo" + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer!BrowserFetcherOptions:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface BrowserFetcherOptions " + } + ], + "releaseTag": "Public", + "name": "BrowserFetcherOptions", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!BrowserFetcherOptions#host:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "host?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "host", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!BrowserFetcherOptions#path:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "path?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "path", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!BrowserFetcherOptions#platform:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "platform?: " + }, + { + "kind": "Reference", + "text": "Platform", + "canonicalReference": "puppeteer!Platform:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "platform", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!BrowserFetcherOptions#product:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "product?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "product", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer!BrowserFetcherRevisionInfo:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface BrowserFetcherRevisionInfo " + } + ], + "releaseTag": "Public", + "name": "BrowserFetcherRevisionInfo", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!BrowserFetcherRevisionInfo#executablePath:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "executablePath: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "executablePath", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!BrowserFetcherRevisionInfo#folderPath:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "folderPath: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "folderPath", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!BrowserFetcherRevisionInfo#local:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "local: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "local", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!BrowserFetcherRevisionInfo#product:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "product: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "product", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!BrowserFetcherRevisionInfo#revision:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "revision: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "revision", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!BrowserFetcherRevisionInfo#url:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "url: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "url", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer!BrowserLaunchArgumentOptions:interface", + "docComment": "/**\n * Launcher options that only apply to Chrome.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface BrowserLaunchArgumentOptions " + } + ], + "releaseTag": "Public", + "name": "BrowserLaunchArgumentOptions", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!BrowserLaunchArgumentOptions#args:member", + "docComment": "/**\n * Additional command line arguments to pass to the browser instance.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "args?: " + }, + { + "kind": "Content", + "text": "string[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "args", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!BrowserLaunchArgumentOptions#debuggingPort:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "debuggingPort?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "debuggingPort", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!BrowserLaunchArgumentOptions#devtools:member", + "docComment": "/**\n * Whether to auto-open a DevTools panel for each tab. If this is set to `true`, then `headless` will be forced to `false`.\n *\n * @defaultValue\n *\n * `false`\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "devtools?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "devtools", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!BrowserLaunchArgumentOptions#headless:member", + "docComment": "/**\n * Whether to run the browser in headless mode.\n *\n * @defaultValue\n *\n * true\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "headless?: " + }, + { + "kind": "Content", + "text": "boolean | 'chrome'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "headless", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!BrowserLaunchArgumentOptions#userDataDir:member", + "docComment": "/**\n * Path to a user data directory. {@link https://chromium.googlesource.com/chromium/src/+/refs/heads/main/docs/user_data_dir.md | see the Chromium docs} for more info.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "userDataDir?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "userDataDir", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "puppeteer!CDPSession:class", + "docComment": "/**\n * The `CDPSession` instances are used to talk raw Chrome Devtools Protocol.\n *\n * @remarks\n *\n * Protocol methods can be called with {@link CDPSession.send} method and protocol events can be subscribed to with `CDPSession.on` method.\n *\n * Useful links: {@link https://chromedevtools.github.io/devtools-protocol/ | DevTools Protocol Viewer} and {@link https://github.com/aslushnikov/getting-started-with-cdp/blob/HEAD/README.md | Getting Started with DevTools Protocol}.\n *\n * The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `CDPSession` class.\n *\n * @example\n * ```ts\n * const client = await page.target().createCDPSession();\n * await client.send('Animation.enable');\n * client.on('Animation.animationCreated', () => console.log('Animation created!'));\n * const response = await client.send('Animation.getPlaybackRate');\n * console.log('playback rate is ' + response.playbackRate);\n * await client.send('Animation.setPlaybackRate', {\n * playbackRate: response.playbackRate / 2\n * });\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class CDPSession extends " + }, + { + "kind": "Reference", + "text": "EventEmitter", + "canonicalReference": "puppeteer!EventEmitter:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "releaseTag": "Public", + "name": "CDPSession", + "members": [ + { + "kind": "Method", + "canonicalReference": "puppeteer!CDPSession#connection:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "connection(): " + }, + { + "kind": "Reference", + "text": "Connection", + "canonicalReference": "puppeteer!Connection:class" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "connection" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!CDPSession#detach:member(1)", + "docComment": "/**\n * Detaches the cdpSession from the target. Once detached, the cdpSession object won't emit any events and can't be used to send messages.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "detach(): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "detach" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!CDPSession#id:member(1)", + "docComment": "/**\n * Returns the session's id.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "id(): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "id" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!CDPSession#send:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "send(method: " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": ", ...paramArgs: " + }, + { + "kind": "Reference", + "text": "ProtocolMapping.Commands", + "canonicalReference": "devtools-protocol!ProtocolMapping.Commands:interface" + }, + { + "kind": "Content", + "text": "[T]['paramsType']" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "ProtocolMapping.Commands", + "canonicalReference": "devtools-protocol!ProtocolMapping.Commands:interface" + }, + { + "kind": "Content", + "text": "[T]['returnType']>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 13 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "method", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "paramArgs", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 8 + }, + "isOptional": false + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "send" + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer!CDPSessionOnMessageObject:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface CDPSessionOnMessageObject " + } + ], + "releaseTag": "Public", + "name": "CDPSessionOnMessageObject", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!CDPSessionOnMessageObject#error:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "error: " + }, + { + "kind": "Content", + "text": "{\n message: string;\n data: any;\n code: number;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "error", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!CDPSessionOnMessageObject#id:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "id?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "id", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!CDPSessionOnMessageObject#method:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "method: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "method", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!CDPSessionOnMessageObject#params:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "params: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "params", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!CDPSessionOnMessageObject#result:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "result?: " + }, + { + "kind": "Content", + "text": "any" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "result", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "puppeteer!ChromeReleaseChannel:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare type ChromeReleaseChannel = " + }, + { + "kind": "Content", + "text": "'chrome' | 'chrome-beta' | 'chrome-canary' | 'chrome-dev'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "ChromeReleaseChannel", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Function", + "canonicalReference": "puppeteer!clearCustomQueryHandlers:function(1)", + "docComment": "/**\n * Clears all registered handlers.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function clearCustomQueryHandlers(): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "clearCustomQueryHandlers" + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer!ClickOptions:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface ClickOptions " + } + ], + "releaseTag": "Public", + "name": "ClickOptions", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!ClickOptions#button:member", + "docComment": "/**\n * @defaultValue\n *\n * 'left'\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "button?: " + }, + { + "kind": "Reference", + "text": "MouseButton", + "canonicalReference": "puppeteer!MouseButton:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "button", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!ClickOptions#clickCount:member", + "docComment": "/**\n * @defaultValue\n *\n * 1\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "clickCount?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "clickCount", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!ClickOptions#delay:member", + "docComment": "/**\n * Time to wait between `mousedown` and `mouseup` in milliseconds.\n *\n * @defaultValue\n *\n * 0\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "delay?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "delay", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!ClickOptions#offset:member", + "docComment": "/**\n * Offset for the clickable point relative to the top-left corder of the border box.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "offset?: " + }, + { + "kind": "Reference", + "text": "Offset", + "canonicalReference": "puppeteer!Offset:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "offset", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer!CommonEventEmitter:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface CommonEventEmitter " + } + ], + "releaseTag": "Public", + "name": "CommonEventEmitter", + "members": [ + { + "kind": "MethodSignature", + "canonicalReference": "puppeteer!CommonEventEmitter#addListener:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "addListener(event: " + }, + { + "kind": "Reference", + "text": "EventType", + "canonicalReference": "puppeteer!EventType:type" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Reference", + "text": "Handler", + "canonicalReference": "puppeteer!Handler:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "CommonEventEmitter", + "canonicalReference": "puppeteer!CommonEventEmitter:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "event", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "addListener" + }, + { + "kind": "MethodSignature", + "canonicalReference": "puppeteer!CommonEventEmitter#emit:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "emit(event: " + }, + { + "kind": "Reference", + "text": "EventType", + "canonicalReference": "puppeteer!EventType:type" + }, + { + "kind": "Content", + "text": ", eventData?: " + }, + { + "kind": "Content", + "text": "unknown" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "event", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "eventData", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": true + } + ], + "name": "emit" + }, + { + "kind": "MethodSignature", + "canonicalReference": "puppeteer!CommonEventEmitter#listenerCount:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "listenerCount(event: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "event", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "listenerCount" + }, + { + "kind": "MethodSignature", + "canonicalReference": "puppeteer!CommonEventEmitter#off:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "off(event: " + }, + { + "kind": "Reference", + "text": "EventType", + "canonicalReference": "puppeteer!EventType:type" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Reference", + "text": "Handler", + "canonicalReference": "puppeteer!Handler:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "CommonEventEmitter", + "canonicalReference": "puppeteer!CommonEventEmitter:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "event", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "off" + }, + { + "kind": "MethodSignature", + "canonicalReference": "puppeteer!CommonEventEmitter#on:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "on(event: " + }, + { + "kind": "Reference", + "text": "EventType", + "canonicalReference": "puppeteer!EventType:type" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Reference", + "text": "Handler", + "canonicalReference": "puppeteer!Handler:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "CommonEventEmitter", + "canonicalReference": "puppeteer!CommonEventEmitter:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "event", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "on" + }, + { + "kind": "MethodSignature", + "canonicalReference": "puppeteer!CommonEventEmitter#once:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "once(event: " + }, + { + "kind": "Reference", + "text": "EventType", + "canonicalReference": "puppeteer!EventType:type" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Reference", + "text": "Handler", + "canonicalReference": "puppeteer!Handler:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "CommonEventEmitter", + "canonicalReference": "puppeteer!CommonEventEmitter:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "event", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "once" + }, + { + "kind": "MethodSignature", + "canonicalReference": "puppeteer!CommonEventEmitter#removeAllListeners:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "removeAllListeners(event?: " + }, + { + "kind": "Reference", + "text": "EventType", + "canonicalReference": "puppeteer!EventType:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "CommonEventEmitter", + "canonicalReference": "puppeteer!CommonEventEmitter:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "event", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + } + ], + "name": "removeAllListeners" + }, + { + "kind": "MethodSignature", + "canonicalReference": "puppeteer!CommonEventEmitter#removeListener:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "removeListener(event: " + }, + { + "kind": "Reference", + "text": "EventType", + "canonicalReference": "puppeteer!EventType:type" + }, + { + "kind": "Content", + "text": ", handler: " + }, + { + "kind": "Reference", + "text": "Handler", + "canonicalReference": "puppeteer!Handler:type" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "CommonEventEmitter", + "canonicalReference": "puppeteer!CommonEventEmitter:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "event", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "handler", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + } + ], + "name": "removeListener" + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Variable", + "canonicalReference": "puppeteer!connect:var", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "connect: " + }, + { + "kind": "Content", + "text": "(options: import(\"./types.js\")." + }, + { + "kind": "Reference", + "text": "ConnectOptions", + "canonicalReference": "puppeteer!ConnectOptions:interface" + }, + { + "kind": "Content", + "text": ") => " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + } + ], + "releaseTag": "Public", + "name": "connect", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 8 + } + }, + { + "kind": "Class", + "canonicalReference": "puppeteer!Connection:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Connection extends " + }, + { + "kind": "Reference", + "text": "EventEmitter", + "canonicalReference": "puppeteer!EventEmitter:class" + }, + { + "kind": "Content", + "text": " " + } + ], + "releaseTag": "Public", + "name": "Connection", + "members": [ + { + "kind": "Constructor", + "canonicalReference": "puppeteer!Connection:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `Connection` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(url: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", transport: " + }, + { + "kind": "Reference", + "text": "ConnectionTransport", + "canonicalReference": "puppeteer!ConnectionTransport:interface" + }, + { + "kind": "Content", + "text": ", delay?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "url", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "transport", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "delay", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + }, + "isOptional": true + } + ] + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!Connection#createSession:member(1)", + "docComment": "/**\n * @param targetInfo - The target info\n *\n * @returns The CDP session that is created\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "createSession(targetInfo: " + }, + { + "kind": "Reference", + "text": "Protocol.Target.TargetInfo", + "canonicalReference": "devtools-protocol!Protocol.Target.TargetInfo:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "CDPSession", + "canonicalReference": "puppeteer!CDPSession:class" + }, + { + "kind": "Content", + "text": ">" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 7 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "targetInfo", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "createSession" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!Connection#dispose:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "dispose(): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "dispose" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!Connection.fromSession:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "static fromSession(session: " + }, + { + "kind": "Reference", + "text": "CDPSession", + "canonicalReference": "puppeteer!CDPSession:class" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Connection", + "canonicalReference": "puppeteer!Connection:class" + }, + { + "kind": "Content", + "text": " | undefined" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": true, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "session", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "fromSession" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!Connection#send:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "send(method: " + }, + { + "kind": "Content", + "text": "T" + }, + { + "kind": "Content", + "text": ", ...paramArgs: " + }, + { + "kind": "Reference", + "text": "ProtocolMapping.Commands", + "canonicalReference": "devtools-protocol!ProtocolMapping.Commands:interface" + }, + { + "kind": "Content", + "text": "[T]['paramsType']" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "ProtocolMapping.Commands", + "canonicalReference": "devtools-protocol!ProtocolMapping.Commands:interface" + }, + { + "kind": "Content", + "text": "[T]['returnType']>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 13 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "method", + "parameterTypeTokenRange": { + "startIndex": 4, + "endIndex": 5 + }, + "isOptional": false + }, + { + "parameterName": "paramArgs", + "parameterTypeTokenRange": { + "startIndex": 6, + "endIndex": 8 + }, + "isOptional": false + } + ], + "typeParameters": [ + { + "typeParameterName": "T", + "constraintTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "defaultTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + } + ], + "name": "send" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!Connection#session:member(1)", + "docComment": "/**\n * @param sessionId - The session id\n *\n * @returns The current CDP session if it exists\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "session(sessionId: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "CDPSession", + "canonicalReference": "puppeteer!CDPSession:class" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "sessionId", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "session" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!Connection#url:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "url(): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "url" + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer!ConnectionCallback:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface ConnectionCallback " + } + ], + "releaseTag": "Public", + "name": "ConnectionCallback", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!ConnectionCallback#error:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "error: " + }, + { + "kind": "Reference", + "text": "ProtocolError", + "canonicalReference": "puppeteer!ProtocolError:class" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "error", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!ConnectionCallback#method:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "method: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "method", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "MethodSignature", + "canonicalReference": "puppeteer!ConnectionCallback#reject:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "reject(args: " + }, + { + "kind": "Content", + "text": "unknown" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "args", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "reject" + }, + { + "kind": "MethodSignature", + "canonicalReference": "puppeteer!ConnectionCallback#resolve:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "resolve(args: " + }, + { + "kind": "Content", + "text": "unknown" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "args", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "resolve" + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer!ConnectionTransport:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface ConnectionTransport " + } + ], + "releaseTag": "Public", + "name": "ConnectionTransport", + "members": [ + { + "kind": "MethodSignature", + "canonicalReference": "puppeteer!ConnectionTransport#close:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "close(): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "close" + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!ConnectionTransport#onclose:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onclose?: " + }, + { + "kind": "Content", + "text": "() => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "onclose", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!ConnectionTransport#onmessage:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "onmessage?: " + }, + { + "kind": "Content", + "text": "(message: string) => void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "onmessage", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "MethodSignature", + "canonicalReference": "puppeteer!ConnectionTransport#send:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "send(message: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "message", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ], + "name": "send" + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer!ConnectOptions:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface ConnectOptions extends " + }, + { + "kind": "Reference", + "text": "BrowserConnectOptions", + "canonicalReference": "puppeteer!BrowserConnectOptions:interface" + }, + { + "kind": "Content", + "text": " " + } + ], + "releaseTag": "Public", + "name": "ConnectOptions", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!ConnectOptions#browserURL:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "browserURL?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "browserURL", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!ConnectOptions#browserWSEndpoint:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "browserWSEndpoint?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "browserWSEndpoint", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!ConnectOptions#product:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "product?: " + }, + { + "kind": "Reference", + "text": "Product", + "canonicalReference": "puppeteer!Product:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "product", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!ConnectOptions#transport:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "transport?: " + }, + { + "kind": "Reference", + "text": "ConnectionTransport", + "canonicalReference": "puppeteer!ConnectionTransport:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "transport", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [ + { + "startIndex": 1, + "endIndex": 2 + } + ] + }, + { + "kind": "Class", + "canonicalReference": "puppeteer!ConsoleMessage:class", + "docComment": "/**\n * ConsoleMessage objects are dispatched by page via the 'console' event.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class ConsoleMessage " + } + ], + "releaseTag": "Public", + "name": "ConsoleMessage", + "members": [ + { + "kind": "Constructor", + "canonicalReference": "puppeteer!ConsoleMessage:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `ConsoleMessage` class\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(type: " + }, + { + "kind": "Reference", + "text": "ConsoleMessageType", + "canonicalReference": "puppeteer!ConsoleMessageType:type" + }, + { + "kind": "Content", + "text": ", text: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", args: " + }, + { + "kind": "Reference", + "text": "JSHandle", + "canonicalReference": "puppeteer!JSHandle:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ", stackTraceLocations: " + }, + { + "kind": "Reference", + "text": "ConsoleMessageLocation", + "canonicalReference": "puppeteer!ConsoleMessageLocation:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "type", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + }, + { + "parameterName": "text", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "isOptional": false + }, + { + "parameterName": "args", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 7 + }, + "isOptional": false + }, + { + "parameterName": "stackTraceLocations", + "parameterTypeTokenRange": { + "startIndex": 8, + "endIndex": 10 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!ConsoleMessage#args:member(1)", + "docComment": "/**\n * @returns An array of arguments passed to the console.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "args(): " + }, + { + "kind": "Reference", + "text": "JSHandle", + "canonicalReference": "puppeteer!JSHandle:class" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "args" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!ConsoleMessage#location:member(1)", + "docComment": "/**\n * @returns The location of the console message.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "location(): " + }, + { + "kind": "Reference", + "text": "ConsoleMessageLocation", + "canonicalReference": "puppeteer!ConsoleMessageLocation:interface" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "location" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!ConsoleMessage#stackTrace:member(1)", + "docComment": "/**\n * @returns The array of locations on the stack of the console message.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "stackTrace(): " + }, + { + "kind": "Reference", + "text": "ConsoleMessageLocation", + "canonicalReference": "puppeteer!ConsoleMessageLocation:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "stackTrace" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!ConsoleMessage#text:member(1)", + "docComment": "/**\n * @returns The text of the console message.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "text(): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "text" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!ConsoleMessage#type:member(1)", + "docComment": "/**\n * @returns The type of the console message.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "type(): " + }, + { + "kind": "Reference", + "text": "ConsoleMessageType", + "canonicalReference": "puppeteer!ConsoleMessageType:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "type" + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer!ConsoleMessageLocation:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface ConsoleMessageLocation " + } + ], + "releaseTag": "Public", + "name": "ConsoleMessageLocation", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!ConsoleMessageLocation#columnNumber:member", + "docComment": "/**\n * 0-based column number in the resource if known or `undefined` otherwise.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "columnNumber?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "columnNumber", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!ConsoleMessageLocation#lineNumber:member", + "docComment": "/**\n * 0-based line number in the resource if known or `undefined` otherwise.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "lineNumber?: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "lineNumber", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!ConsoleMessageLocation#url:member", + "docComment": "/**\n * URL of the resource if known or `undefined` otherwise.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "url?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "url", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "TypeAlias", + "canonicalReference": "puppeteer!ConsoleMessageType:type", + "docComment": "/**\n * The supported types for console messages.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare type ConsoleMessageType = " + }, + { + "kind": "Content", + "text": "'log' | 'debug' | 'info' | 'error' | 'warning' | 'dir' | 'dirxml' | 'table' | 'trace' | 'clear' | 'startGroup' | 'startGroupCollapsed' | 'endGroup' | 'assert' | 'profile' | 'profileEnd' | 'count' | 'timeEnd' | 'verbose'" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "ConsoleMessageType", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer!ContinueRequestOverrides:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface ContinueRequestOverrides " + } + ], + "releaseTag": "Public", + "name": "ContinueRequestOverrides", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!ContinueRequestOverrides#headers:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "headers?: " + }, + { + "kind": "Reference", + "text": "Record", + "canonicalReference": "!Record:type" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "headers", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!ContinueRequestOverrides#method:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "method?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "method", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!ContinueRequestOverrides#postData:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "postData?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "postData", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!ContinueRequestOverrides#url:member", + "docComment": "/**\n * If set, the request URL will change. This is not a redirect.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "url?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "url", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "puppeteer!Coverage:class", + "docComment": "/**\n * The Coverage class provides methods to gathers information about parts of JavaScript and CSS that were used by the page.\n *\n * @remarks\n *\n * To output coverage in a form consumable by {@link https://github.com/istanbuljs | Istanbul}, see {@link https://github.com/istanbuljs/puppeteer-to-istanbul | puppeteer-to-istanbul}.\n *\n * @example\n *\n * An example of using JavaScript and CSS coverage to get percentage of initially executed code:\n * ```ts\n * // Enable both JavaScript and CSS coverage\n * await Promise.all([\n * page.coverage.startJSCoverage(),\n * page.coverage.startCSSCoverage()\n * ]);\n * // Navigate to page\n * await page.goto('https://example.com');\n * // Disable both JavaScript and CSS coverage\n * const [jsCoverage, cssCoverage] = await Promise.all([\n * page.coverage.stopJSCoverage(),\n * page.coverage.stopCSSCoverage(),\n * ]);\n * let totalBytes = 0;\n * let usedBytes = 0;\n * const coverage = [...jsCoverage, ...cssCoverage];\n * for (const entry of coverage) {\n * totalBytes += entry.text.length;\n * for (const range of entry.ranges)\n * usedBytes += range.end - range.start - 1;\n * }\n * console.log(`Bytes used: ${usedBytes / totalBytes * 100}%`);\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Coverage " + } + ], + "releaseTag": "Public", + "name": "Coverage", + "members": [ + { + "kind": "Constructor", + "canonicalReference": "puppeteer!Coverage:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `Coverage` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(client: " + }, + { + "kind": "Reference", + "text": "CDPSession", + "canonicalReference": "puppeteer!CDPSession:class" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "client", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!Coverage#startCSSCoverage:member(1)", + "docComment": "/**\n * @param options - Set of configurable options for coverage, defaults to `resetOnNavigation : true`\n *\n * @returns Promise that resolves when coverage is started.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "startCSSCoverage(options?: " + }, + { + "kind": "Reference", + "text": "CSSCoverageOptions", + "canonicalReference": "puppeteer!CSSCoverageOptions:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + } + ], + "name": "startCSSCoverage" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!Coverage#startJSCoverage:member(1)", + "docComment": "/**\n * @remarks\n *\n * Anonymous scripts are ones that don't have an associated url. These are scripts that are dynamically created on the page using `eval` or `new Function`. If `reportAnonymousScripts` is set to `true`, anonymous scripts will have `pptr://__puppeteer_evaluation_script__` as their URL.\n *\n * @param options - Set of configurable options for coverage defaults to `resetOnNavigation : true, reportAnonymousScripts : false`\n *\n * @returns Promise that resolves when coverage is started.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "startJSCoverage(options?: " + }, + { + "kind": "Reference", + "text": "JSCoverageOptions", + "canonicalReference": "puppeteer!JSCoverageOptions:interface" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + } + ], + "name": "startJSCoverage" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!Coverage#stopCSSCoverage:member(1)", + "docComment": "/**\n * @remarks\n *\n * CSS Coverage doesn't include dynamically injected style tags without sourceURLs.\n *\n * @returns Promise that resolves to the array of coverage reports for all stylesheets.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "stopCSSCoverage(): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "CoverageEntry", + "canonicalReference": "puppeteer!CoverageEntry:interface" + }, + { + "kind": "Content", + "text": "[]>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "stopCSSCoverage" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!Coverage#stopJSCoverage:member(1)", + "docComment": "/**\n * @remarks\n *\n * JavaScript Coverage doesn't include anonymous scripts by default. However, scripts with sourceURLs are reported.\n *\n * @returns Promise that resolves to the array of coverage reports for all scripts.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "stopJSCoverage(): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "JSCoverageEntry", + "canonicalReference": "puppeteer!JSCoverageEntry:interface" + }, + { + "kind": "Content", + "text": "[]>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "stopJSCoverage" + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer!CoverageEntry:interface", + "docComment": "/**\n * The CoverageEntry class represents one entry of the coverage report.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface CoverageEntry " + } + ], + "releaseTag": "Public", + "name": "CoverageEntry", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!CoverageEntry#ranges:member", + "docComment": "/**\n * The covered range as start and end positions.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "ranges: " + }, + { + "kind": "Reference", + "text": "Array", + "canonicalReference": "!Array:interface" + }, + { + "kind": "Content", + "text": "<{\n start: number;\n end: number;\n }>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "ranges", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!CoverageEntry#text:member", + "docComment": "/**\n * The content of the style sheet or script.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "text: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "text", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!CoverageEntry#url:member", + "docComment": "/**\n * The URL of the style sheet or script.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "url: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "url", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Variable", + "canonicalReference": "puppeteer!createBrowserFetcher:var", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "createBrowserFetcher: " + }, + { + "kind": "Content", + "text": "(options: import(\"./types.js\")." + }, + { + "kind": "Reference", + "text": "BrowserFetcherOptions", + "canonicalReference": "puppeteer!BrowserFetcherOptions:interface" + }, + { + "kind": "Content", + "text": ") => import(\"./types.js\")." + }, + { + "kind": "Reference", + "text": "BrowserFetcher", + "canonicalReference": "puppeteer!BrowserFetcher:class" + } + ], + "releaseTag": "Public", + "name": "createBrowserFetcher", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + } + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer!Credentials:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface Credentials " + } + ], + "releaseTag": "Public", + "name": "Credentials", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!Credentials#password:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "password: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "password", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!Credentials#username:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "username: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "username", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "puppeteer!CSSCoverage:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class CSSCoverage " + } + ], + "releaseTag": "Public", + "name": "CSSCoverage", + "members": [ + { + "kind": "Constructor", + "canonicalReference": "puppeteer!CSSCoverage:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `CSSCoverage` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(client: " + }, + { + "kind": "Reference", + "text": "CDPSession", + "canonicalReference": "puppeteer!CDPSession:class" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "client", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": false + } + ] + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!CSSCoverage#start:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "start(options?: " + }, + { + "kind": "Content", + "text": "{\n resetOnNavigation?: boolean;\n }" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "options", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + } + ], + "name": "start" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!CSSCoverage#stop:member(1)", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "stop(): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "<" + }, + { + "kind": "Reference", + "text": "CoverageEntry", + "canonicalReference": "puppeteer!CoverageEntry:interface" + }, + { + "kind": "Content", + "text": "[]>" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "stop" + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer!CSSCoverageOptions:interface", + "docComment": "/**\n * Set of configurable options for CSS coverage.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface CSSCoverageOptions " + } + ], + "releaseTag": "Public", + "name": "CSSCoverageOptions", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!CSSCoverageOptions#resetOnNavigation:member", + "docComment": "/**\n * Whether to reset coverage on every navigation.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "resetOnNavigation?: " + }, + { + "kind": "Content", + "text": "boolean" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "resetOnNavigation", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "puppeteer!CustomError:class", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class CustomError extends " + }, + { + "kind": "Reference", + "text": "Error", + "canonicalReference": "!Error:interface" + }, + { + "kind": "Content", + "text": " " + } + ], + "releaseTag": "Public", + "name": "CustomError", + "members": [ + { + "kind": "Constructor", + "canonicalReference": "puppeteer!CustomError:constructor(1)", + "docComment": "/**\n * Constructs a new instance of the `CustomError` class\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "constructor(message?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ");" + } + ], + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "message", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + } + ] + } + ], + "extendsTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "implementsTokenRanges": [] + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer!CustomQueryHandler:interface", + "docComment": "/**\n * Contains two functions `queryOne` and `queryAll` that can be {@link registerCustomQueryHandler | registered} as alternative querying strategies. The functions `queryOne` and `queryAll` are executed in the page context. `queryOne` should take an `Element` and a selector string as argument and return a single `Element` or `null` if no element is found. `queryAll` takes the same arguments but should instead return a `NodeListOf` or `Array` with all the elements that match the given query selector.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface CustomQueryHandler " + } + ], + "releaseTag": "Public", + "name": "CustomQueryHandler", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!CustomQueryHandler#queryAll:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "queryAll?: " + }, + { + "kind": "Content", + "text": "(element: " + }, + { + "kind": "Reference", + "text": "Node", + "canonicalReference": "!Node:interface" + }, + { + "kind": "Content", + "text": ", selector: string) => " + }, + { + "kind": "Reference", + "text": "Node", + "canonicalReference": "!Node:interface" + }, + { + "kind": "Content", + "text": "[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "queryAll", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!CustomQueryHandler#queryOne:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "queryOne?: " + }, + { + "kind": "Content", + "text": "(element: " + }, + { + "kind": "Reference", + "text": "Node", + "canonicalReference": "!Node:interface" + }, + { + "kind": "Content", + "text": ", selector: string) => " + }, + { + "kind": "Reference", + "text": "Node", + "canonicalReference": "!Node:interface" + }, + { + "kind": "Content", + "text": " | null" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": true, + "releaseTag": "Public", + "name": "queryOne", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 6 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Function", + "canonicalReference": "puppeteer!customQueryHandlerNames:function(1)", + "docComment": "/**\n * @returns a list with the names of all registered custom query handlers.\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare function customQueryHandlerNames(): " + }, + { + "kind": "Content", + "text": "string[]" + }, + { + "kind": "Content", + "text": ";" + } + ], + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "customQueryHandlerNames" + }, + { + "kind": "Variable", + "canonicalReference": "puppeteer!DEFAULT_INTERCEPT_RESOLUTION_PRIORITY:var", + "docComment": "/**\n * The default cooperative request interception resolution priority\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "DEFAULT_INTERCEPT_RESOLUTION_PRIORITY = 0" + } + ], + "releaseTag": "Public", + "name": "DEFAULT_INTERCEPT_RESOLUTION_PRIORITY", + "variableTypeTokenRange": { + "startIndex": 0, + "endIndex": 0 + } + }, + { + "kind": "Variable", + "canonicalReference": "puppeteer!defaultArgs:var", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "defaultArgs: " + }, + { + "kind": "Content", + "text": "(options?: import(\"./types.js\")." + }, + { + "kind": "Reference", + "text": "BrowserLaunchArgumentOptions", + "canonicalReference": "puppeteer!BrowserLaunchArgumentOptions:interface" + }, + { + "kind": "Content", + "text": ") => string[]" + } + ], + "releaseTag": "Public", + "name": "defaultArgs", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Interface", + "canonicalReference": "puppeteer!Device:interface", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export interface Device " + } + ], + "releaseTag": "Public", + "name": "Device", + "members": [ + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!Device#name:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "name: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "name", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!Device#userAgent:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "userAgent: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "userAgent", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "PropertySignature", + "canonicalReference": "puppeteer!Device#viewport:member", + "docComment": "", + "excerptTokens": [ + { + "kind": "Content", + "text": "viewport: " + }, + { + "kind": "Content", + "text": "{\n width: number;\n height: number;\n deviceScaleFactor: number;\n isMobile: boolean;\n hasTouch: boolean;\n isLandscape: boolean;\n }" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "releaseTag": "Public", + "name": "viewport", + "propertyTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "extendsTokenRanges": [] + }, + { + "kind": "Variable", + "canonicalReference": "puppeteer!devices:var", + "docComment": "/**\n * A list of devices to be used with `page.emulate(options)`. Actual list of devices can be found in {@link https://github.com/puppeteer/puppeteer/blob/main/src/common/DeviceDescriptors.ts | src/common/DeviceDescriptors.ts}.\n *\n * @example\n * ```ts\n * const puppeteer = require('puppeteer');\n * const iPhone = puppeteer.devices['iPhone 6'];\n *\n * (async () => {\n * const browser = await puppeteer.launch();\n * const page = await browser.newPage();\n * await page.emulate(iPhone);\n * await page.goto('https://www.google.com');\n * // other actions...\n * await browser.close();\n * })();\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "devices: " + }, + { + "kind": "Reference", + "text": "DevicesMap", + "canonicalReference": "puppeteer!DevicesMap:type" + } + ], + "releaseTag": "Public", + "name": "devices", + "variableTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "kind": "TypeAlias", + "canonicalReference": "puppeteer!DevicesMap:type", + "docComment": "/**\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare type DevicesMap = " + }, + { + "kind": "Content", + "text": "{\n [name: string]: " + }, + { + "kind": "Reference", + "text": "Device", + "canonicalReference": "puppeteer!Device:interface" + }, + { + "kind": "Content", + "text": ";\n}" + }, + { + "kind": "Content", + "text": ";" + } + ], + "releaseTag": "Public", + "name": "DevicesMap", + "typeTokenRange": { + "startIndex": 1, + "endIndex": 4 + } + }, + { + "kind": "Class", + "canonicalReference": "puppeteer!Dialog:class", + "docComment": "/**\n * Dialog instances are dispatched by the {@link Page} via the `dialog` event.\n *\n * @remarks\n *\n * The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `Dialog` class.\n *\n * @example\n * ```ts\n * const puppeteer = require('puppeteer');\n *\n * (async () => {\n * const browser = await puppeteer.launch();\n * const page = await browser.newPage();\n * page.on('dialog', async dialog => {\n * console.log(dialog.message());\n * await dialog.dismiss();\n * await browser.close();\n * });\n * page.evaluate(() => alert('1'));\n * })();\n * ```\n *\n * @public\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "export declare class Dialog " + } + ], + "releaseTag": "Public", + "name": "Dialog", + "members": [ + { + "kind": "Method", + "canonicalReference": "puppeteer!Dialog#accept:member(1)", + "docComment": "/**\n * @param promptText - optional text that will be entered in the dialog prompt. Has no effect if the dialog's type is not `prompt`.\n *\n * @returns A promise that resolves when the dialog has been accepted.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "accept(promptText?: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 5 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "promptText", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "isOptional": true + } + ], + "name": "accept" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!Dialog#defaultValue:member(1)", + "docComment": "/**\n * @returns The default value of the prompt, or an empty string if the dialog is not a `prompt`.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "defaultValue(): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "defaultValue" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!Dialog#dismiss:member(1)", + "docComment": "/**\n * @returns A promise which will resolve once the dialog has been dismissed\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "dismiss(): " + }, + { + "kind": "Reference", + "text": "Promise", + "canonicalReference": "!Promise:interface" + }, + { + "kind": "Content", + "text": "" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 3 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "dismiss" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!Dialog#message:member(1)", + "docComment": "/**\n * @returns The message displayed in the dialog.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "message(): " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "message" + }, + { + "kind": "Method", + "canonicalReference": "puppeteer!Dialog#type:member(1)", + "docComment": "/**\n * @returns The type of the dialog.\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "type(): " + }, + { + "kind": "Reference", + "text": "Protocol.Page.DialogType", + "canonicalReference": "devtools-protocol!Protocol.Page.DialogType:type" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "isStatic": false, + "returnTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [], + "name": "type" + } + ], + "implementsTokenRanges": [] + }, + { + "kind": "Class", + "canonicalReference": "puppeteer!ElementHandle:class", + "docComment": "/**\n * ElementHandle represents an in-page DOM element.\n *\n * @remarks\n *\n * ElementHandles can be created with the {@link Page.$} method.\n * ```ts\n * const puppeteer = require('puppeteer');\n *\n * (async () => {\n * const browser = await puppeteer.launch();\n * const page = await browser.newPage();\n * await page.goto('https://example.com');\n * const hrefElement = await page.$('a');\n * await hrefElement.click();\n * // ...\n * })();\n * ```\n *\n * ElementHandle prevents the DOM element from being garbage-collected unless the handle is {@link JSHandle.dispose | disposed}. ElementHandles are auto-disposed when their origin frame gets navigated.\n *\n * ElementHandle instances can be used as arguments in {@link Page.$eval} and {@link Page.evaluate} methods.\n *\n * If you're using TypeScript, ElementHandle takes a generic argument that denotes the type of element the handle is holding within. For example, if you have a handle to a `` element matching `selector`, the method throws an error.\n *\n * @param values - Values of options to select. If the `