Skip to content

Commit

Permalink
chore: generate versioned docs
Browse files Browse the repository at this point in the history
  • Loading branch information
release-please[bot] committed Aug 2, 2022
1 parent 5b2e107 commit ed04213
Show file tree
Hide file tree
Showing 717 changed files with 18,454 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/generated/version.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
* @internal
*/
export const packageVersion = '15.5.0';
export const packageVersion = '16.0.0';
167 changes: 167 additions & 0 deletions website/versioned_docs/version-16.0.0/api/index.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
sidebar_label: Accessibility
---

# Accessibility class

The Accessibility class provides methods for inspecting Chromium's accessibility tree. The accessibility tree is used by assistive technology such as [screen readers](https://en.wikipedia.org/wiki/Screen_reader) or [switches](https://en.wikipedia.org/wiki/Switch_access).

**Signature:**

```typescript
export declare class Accessibility
```

## Remarks

Accessibility is a very platform-specific thing. On different platforms, there are different screen readers that might have wildly different output.

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.

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.

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.

## Methods

| Method | Modifiers | Description |
| ---------------------------------------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------- |
| [snapshot(options)](./puppeteer.accessibility.snapshot.md) | | Captures the current state of the accessibility tree. The returned object represents the root accessible node of the page. |
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
sidebar_label: Accessibility.snapshot
---

# Accessibility.snapshot() method

Captures the current state of the accessibility tree. The returned object represents the root accessible node of the page.

**Signature:**

```typescript
class Accessibility {
snapshot(options?: SnapshotOptions): Promise<SerializedAXNode | null>;
}
```

## Parameters

| Parameter | Type | Description |
| --------- | ------------------------------------------------- | ----------------- |
| options | [SnapshotOptions](./puppeteer.snapshotoptions.md) | <i>(Optional)</i> |

**Returns:**

Promise&lt;[SerializedAXNode](./puppeteer.serializedaxnode.md) \| null&gt;

An AXNode object representing the snapshot.

## Remarks

\*\*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`.

## Example 1

An example of dumping the entire accessibility tree:

```ts
const snapshot = await page.accessibility.snapshot();
console.log(snapshot);
```

## Example 2

An example of logging the focused node's name:

```ts
const snapshot = await page.accessibility.snapshot();
const node = findFocusedNode(snapshot);
console.log(node && node.name);

function findFocusedNode(node) {
if (node.focused) return node;
for (const child of node.children || []) {
const foundNode = findFocusedNode(child);
return foundNode;
}
return null;
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
sidebar_label: ActionResult
---

# ActionResult type

**Signature:**

```typescript
export declare type ActionResult = 'continue' | 'abort' | 'respond';
```
11 changes: 11 additions & 0 deletions website/versioned_docs/version-16.0.0/api/puppeteer.awaitable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
sidebar_label: Awaitable
---

# Awaitable type

**Signature:**

```typescript
export declare type Awaitable<T> = T | PromiseLike<T>;
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
sidebar_label: BoundingBox.height
---

# BoundingBox.height property

the height of the element in pixels.

**Signature:**

```typescript
interface BoundingBox {
height: number;
}
```
20 changes: 20 additions & 0 deletions website/versioned_docs/version-16.0.0/api/puppeteer.boundingbox.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
sidebar_label: BoundingBox
---

# BoundingBox interface

**Signature:**

```typescript
export interface BoundingBox extends Point
```
**Extends:** [Point](./puppeteer.point.md)
## Properties
| Property | Modifiers | Type | Description |
| ------------------------------------------- | --------- | ------ | ------------------------------------ |
| [height](./puppeteer.boundingbox.height.md) | | number | the height of the element in pixels. |
| [width](./puppeteer.boundingbox.width.md) | | number | the width of the element in pixels. |
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
sidebar_label: BoundingBox.width
---

# BoundingBox.width property

the width of the element in pixels.

**Signature:**

```typescript
interface BoundingBox {
width: number;
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
sidebar_label: BoxModel.border
---

# BoxModel.border property

**Signature:**

```typescript
interface BoxModel {
border: Point[];
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
sidebar_label: BoxModel.content
---

# BoxModel.content property

**Signature:**

```typescript
interface BoxModel {
content: Point[];
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
sidebar_label: BoxModel.height
---

# BoxModel.height property

**Signature:**

```typescript
interface BoxModel {
height: number;
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
sidebar_label: BoxModel.margin
---

# BoxModel.margin property

**Signature:**

```typescript
interface BoxModel {
margin: Point[];
}
```
22 changes: 22 additions & 0 deletions website/versioned_docs/version-16.0.0/api/puppeteer.boxmodel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
sidebar_label: BoxModel
---

# BoxModel interface

**Signature:**

```typescript
export interface BoxModel
```

## Properties

| Property | Modifiers | Type | Description |
| ------------------------------------------ | --------- | --------------------------------- | ----------- |
| [border](./puppeteer.boxmodel.border.md) | | [Point](./puppeteer.point.md)\[\] | |
| [content](./puppeteer.boxmodel.content.md) | | [Point](./puppeteer.point.md)\[\] | |
| [height](./puppeteer.boxmodel.height.md) | | number | |
| [margin](./puppeteer.boxmodel.margin.md) | | [Point](./puppeteer.point.md)\[\] | |
| [padding](./puppeteer.boxmodel.padding.md) | | [Point](./puppeteer.point.md)\[\] | |
| [width](./puppeteer.boxmodel.width.md) | | number | |
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
sidebar_label: BoxModel.padding
---

# BoxModel.padding property

**Signature:**

```typescript
interface BoxModel {
padding: Point[];
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
sidebar_label: BoxModel.width
---

# BoxModel.width property

**Signature:**

```typescript
interface BoxModel {
width: number;
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
sidebar_label: Browser.browserContexts
---

# Browser.browserContexts() method

Returns an array of all open browser contexts. In a newly created browser, this will return a single instance of [BrowserContext](./puppeteer.browsercontext.md).

**Signature:**

```typescript
class Browser {
browserContexts(): BrowserContext[];
}
```

**Returns:**

[BrowserContext](./puppeteer.browsercontext.md)\[\]
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
sidebar_label: Browser.close
---

# Browser.close() method

Closes Chromium and all of its pages (if any were opened). The [Browser](./puppeteer.browser.md) object itself is considered to be disposed and cannot be used anymore.

**Signature:**

```typescript
class Browser {
close(): Promise<void>;
}
```

**Returns:**

Promise&lt;void&gt;
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
sidebar_label: Browser.createIncognitoBrowserContext
---

# Browser.createIncognitoBrowserContext() method

Creates a new incognito browser context. This won't share cookies/cache with other browser contexts.

**Signature:**

```typescript
class Browser {
createIncognitoBrowserContext(
options?: BrowserContextOptions
): Promise<BrowserContext>;
}
```

## Parameters

| Parameter | Type | Description |
| --------- | ------------------------------------------------------------- | ----------------- |
| options | [BrowserContextOptions](./puppeteer.browsercontextoptions.md) | <i>(Optional)</i> |

**Returns:**

Promise&lt;[BrowserContext](./puppeteer.browsercontext.md)&gt;

## Example

```ts
(async () => {
const browser = await puppeteer.launch();
// Create a new incognito browser context.
const context = await browser.createIncognitoBrowserContext();
// Create a new page in a pristine context.
const page = await context.newPage();
// Do stuff
await page.goto('https://example.com');
})();
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
sidebar_label: Browser.defaultBrowserContext
---

# Browser.defaultBrowserContext() method

Returns the default browser context. The default browser context cannot be closed.

**Signature:**

```typescript
class Browser {
defaultBrowserContext(): BrowserContext;
}
```

**Returns:**

[BrowserContext](./puppeteer.browsercontext.md)

0 comments on commit ed04213

Please sign in to comment.