mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
docs: update website deps and fix some broken links (#11631)
This commit is contained in:
parent
6e87444471
commit
e8b501de6f
@ -6,7 +6,7 @@ sidebar_label: Browser.isConnected
|
|||||||
|
|
||||||
> Warning: This API is now obsolete.
|
> Warning: This API is now obsolete.
|
||||||
>
|
>
|
||||||
> Use [Browser.connected](./puppeteer.browser.connected.md).
|
> Use [Browser.connected](./puppeteer.browser.md).
|
||||||
|
|
||||||
Whether Puppeteer is connected to this [browser](./puppeteer.browser.md).
|
Whether Puppeteer is connected to this [browser](./puppeteer.browser.md).
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ sidebar_label: Page.isDragInterceptionEnabled
|
|||||||
|
|
||||||
> Warning: This API is now obsolete.
|
> Warning: This API is now obsolete.
|
||||||
>
|
>
|
||||||
> We no longer support intercepting drag payloads. Use the new drag APIs found on [ElementHandle](./puppeteer.elementhandle.md) to drag (or just use the [Page.mouse](./puppeteer.page.mouse.md)).
|
> We no longer support intercepting drag payloads. Use the new drag APIs found on [ElementHandle](./puppeteer.elementhandle.md) to drag (or just use the [Page.mouse](./puppeteer.page.md)).
|
||||||
|
|
||||||
`true` if drag events are being intercepted, `false` otherwise.
|
`true` if drag events are being intercepted, `false` otherwise.
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ page.off('request', logRequest);
|
|||||||
| [title()](./puppeteer.page.title.md) | | The page's title |
|
| [title()](./puppeteer.page.title.md) | | The page's title |
|
||||||
| [type(selector, text, options)](./puppeteer.page.type.md) | | <p>Sends a <code>keydown</code>, <code>keypress/input</code>, and <code>keyup</code> event for each character in the text.</p><p>To press a special key, like <code>Control</code> or <code>ArrowDown</code>, use [Keyboard.press()](./puppeteer.keyboard.press.md).</p> |
|
| [type(selector, text, options)](./puppeteer.page.type.md) | | <p>Sends a <code>keydown</code>, <code>keypress/input</code>, and <code>keyup</code> event for each character in the text.</p><p>To press a special key, like <code>Control</code> or <code>ArrowDown</code>, use [Keyboard.press()](./puppeteer.keyboard.press.md).</p> |
|
||||||
| [url()](./puppeteer.page.url.md) | | The page's URL. |
|
| [url()](./puppeteer.page.url.md) | | The page's URL. |
|
||||||
| [viewport()](./puppeteer.page.viewport.md) | | <p>Returns the current page viewport settings without checking the actual page viewport.</p><p>This is either the viewport set with the previous [Page.setViewport()](./puppeteer.page.setviewport.md) call or the default viewport set via [BrowserConnectOptions.defaultViewport](./puppeteer.browserconnectoptions.defaultviewport.md).</p> |
|
| [viewport()](./puppeteer.page.viewport.md) | | <p>Returns the current page viewport settings without checking the actual page viewport.</p><p>This is either the viewport set with the previous [Page.setViewport()](./puppeteer.page.setviewport.md) call or the default viewport set via [BrowserConnectOptions.defaultViewport](./puppeteer.browserconnectoptions.md).</p> |
|
||||||
| [waitForDevicePrompt(options)](./puppeteer.page.waitfordeviceprompt.md) | | <p>This method is typically coupled with an action that triggers a device request from an api such as WebBluetooth.</p><p>:::caution</p><p>This must be called before the device request is made. It will not return a currently active device prompt.</p><p>:::</p> |
|
| [waitForDevicePrompt(options)](./puppeteer.page.waitfordeviceprompt.md) | | <p>This method is typically coupled with an action that triggers a device request from an api such as WebBluetooth.</p><p>:::caution</p><p>This must be called before the device request is made. It will not return a currently active device prompt.</p><p>:::</p> |
|
||||||
| [waitForFileChooser(options)](./puppeteer.page.waitforfilechooser.md) | | <p>This method is typically coupled with an action that triggers file choosing.</p><p>:::caution</p><p>This must be called before the file chooser is launched. It will not return a currently active file chooser.</p><p>:::</p> |
|
| [waitForFileChooser(options)](./puppeteer.page.waitforfilechooser.md) | | <p>This method is typically coupled with an action that triggers file choosing.</p><p>:::caution</p><p>This must be called before the file chooser is launched. It will not return a currently active file chooser.</p><p>:::</p> |
|
||||||
| [waitForFrame(urlOrPredicate, options)](./puppeteer.page.waitforframe.md) | | Waits for a frame matching the given conditions to appear. |
|
| [waitForFrame(urlOrPredicate, options)](./puppeteer.page.waitforframe.md) | | Waits for a frame matching the given conditions to appear. |
|
||||||
|
@ -6,7 +6,7 @@ sidebar_label: Page.setDragInterception
|
|||||||
|
|
||||||
> Warning: This API is now obsolete.
|
> Warning: This API is now obsolete.
|
||||||
>
|
>
|
||||||
> We no longer support intercepting drag payloads. Use the new drag APIs found on [ElementHandle](./puppeteer.elementhandle.md) to drag (or just use the [Page.mouse](./puppeteer.page.mouse.md)).
|
> We no longer support intercepting drag payloads. Use the new drag APIs found on [ElementHandle](./puppeteer.elementhandle.md) to drag (or just use the [Page.mouse](./puppeteer.page.md)).
|
||||||
|
|
||||||
#### Signature:
|
#### Signature:
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@ sidebar_label: Page.viewport
|
|||||||
|
|
||||||
Returns the current page viewport settings without checking the actual page viewport.
|
Returns the current page viewport settings without checking the actual page viewport.
|
||||||
|
|
||||||
This is either the viewport set with the previous [Page.setViewport()](./puppeteer.page.setviewport.md) call or the default viewport set via [BrowserConnectOptions.defaultViewport](./puppeteer.browserconnectoptions.defaultviewport.md).
|
This is either the viewport set with the previous [Page.setViewport()](./puppeteer.page.setviewport.md) call or the default viewport set via [BrowserConnectOptions.defaultViewport](./puppeteer.browserconnectoptions.md).
|
||||||
|
|
||||||
#### Signature:
|
#### Signature:
|
||||||
|
|
||||||
|
@ -54,8 +54,8 @@ const browser = await puppeteer.launch({
|
|||||||
### Capture `console.*` output
|
### Capture `console.*` output
|
||||||
|
|
||||||
Since client code runs in the browser, doing `console.*` in client code will not
|
Since client code runs in the browser, doing `console.*` in client code will not
|
||||||
directly log to Node.js. However, you can [listen](../api/puppeteer.page.on) for
|
directly log to Node.js. However, you can [listen (page.on)](../api/puppeteer.page) for
|
||||||
the [`console`](../api/puppeteer.pageeventobject) event which returns a
|
the [`console`](../api/puppeteer.pageevents) event which returns a
|
||||||
payload with the logged text.
|
payload with the logged text.
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
|
@ -409,7 +409,7 @@ export abstract class Browser extends EventEmitter<BrowserEvents> {
|
|||||||
/**
|
/**
|
||||||
* Whether Puppeteer is connected to this {@link Browser | browser}.
|
* Whether Puppeteer is connected to this {@link Browser | browser}.
|
||||||
*
|
*
|
||||||
* @deprecated Use {@link Browser.connected}.
|
* @deprecated Use {@link Browser | Browser.connected}.
|
||||||
*/
|
*/
|
||||||
isConnected(): boolean {
|
isConnected(): boolean {
|
||||||
return this.connected;
|
return this.connected;
|
||||||
|
@ -609,7 +609,7 @@ export abstract class Page extends EventEmitter<PageEvents> {
|
|||||||
*
|
*
|
||||||
* @deprecated We no longer support intercepting drag payloads. Use the new
|
* @deprecated We no longer support intercepting drag payloads. Use the new
|
||||||
* drag APIs found on {@link ElementHandle} to drag (or just use the
|
* drag APIs found on {@link ElementHandle} to drag (or just use the
|
||||||
* {@link Page.mouse}).
|
* {@link Page | Page.mouse}).
|
||||||
*/
|
*/
|
||||||
abstract isDragInterceptionEnabled(): boolean;
|
abstract isDragInterceptionEnabled(): boolean;
|
||||||
|
|
||||||
@ -838,7 +838,7 @@ export abstract class Page extends EventEmitter<PageEvents> {
|
|||||||
*
|
*
|
||||||
* @deprecated We no longer support intercepting drag payloads. Use the new
|
* @deprecated We no longer support intercepting drag payloads. Use the new
|
||||||
* drag APIs found on {@link ElementHandle} to drag (or just use the
|
* drag APIs found on {@link ElementHandle} to drag (or just use the
|
||||||
* {@link Page.mouse}).
|
* {@link Page | Page.mouse}).
|
||||||
*/
|
*/
|
||||||
abstract setDragInterception(enabled: boolean): Promise<void>;
|
abstract setDragInterception(enabled: boolean): Promise<void>;
|
||||||
|
|
||||||
@ -2057,7 +2057,7 @@ export abstract class Page extends EventEmitter<PageEvents> {
|
|||||||
*
|
*
|
||||||
* This is either the viewport set with the previous {@link Page.setViewport}
|
* This is either the viewport set with the previous {@link Page.setViewport}
|
||||||
* call or the default viewport set via
|
* call or the default viewport set via
|
||||||
* {@link BrowserConnectOptions.defaultViewport}.
|
* {@link BrowserConnectOptions | BrowserConnectOptions.defaultViewport}.
|
||||||
*/
|
*/
|
||||||
abstract viewport(): Viewport | null;
|
abstract viewport(): Viewport | null;
|
||||||
|
|
||||||
|
@ -16,17 +16,19 @@
|
|||||||
* necessary.
|
* necessary.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
async function importInstaller() {
|
||||||
|
try {
|
||||||
|
return await import('puppeteer/internal/node/install.js');
|
||||||
|
} catch {
|
||||||
|
console.warn(
|
||||||
|
'Skipping browser installation because the Puppeteer build is not available. Run `npm install` again after you have re-built Puppeteer.'
|
||||||
|
);
|
||||||
|
process.exit(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const {downloadBrowser} = await (async () => {
|
const {downloadBrowser} = await importInstaller();
|
||||||
try {
|
|
||||||
return await import('puppeteer/internal/node/install.js');
|
|
||||||
} catch {
|
|
||||||
console.warn(
|
|
||||||
'Skipping browser installation because the Puppeteer build is not available. Run `npm install` again after you have re-built Puppeteer.'
|
|
||||||
);
|
|
||||||
process.exit(0);
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
downloadBrowser();
|
downloadBrowser();
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.warn('Browser download failed', error);
|
console.warn('Browser download failed', error);
|
||||||
|
1009
website/package-lock.json
generated
1009
website/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -15,18 +15,20 @@
|
|||||||
"archive": "node archive.js"
|
"archive": "node archive.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@docusaurus/core": "3.0.0",
|
"@docusaurus/core": "3.0.1",
|
||||||
"@docusaurus/plugin-client-redirects": "3.0.0",
|
"@docusaurus/plugin-client-redirects": "3.0.1",
|
||||||
"@docusaurus/preset-classic": "3.0.0",
|
"@docusaurus/preset-classic": "3.0.1",
|
||||||
"@mdx-js/react": "3.0.0",
|
"@mdx-js/react": "3.0.0",
|
||||||
"clsx": "1.2.1",
|
"clsx": "2.1.0",
|
||||||
"prism-react-renderer": "2.1.0",
|
"prism-react-renderer": "2.3.1",
|
||||||
"semver": "7.5.4",
|
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-dom": "18.2.0"
|
"react-dom": "18.2.0",
|
||||||
|
"semver": "7.5.4"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@docusaurus/module-type-aliases": "3.0.0",
|
"@docusaurus/module-type-aliases": "3.0.1",
|
||||||
|
"@docusaurus/types": "3.0.1",
|
||||||
|
"@swc/core": "1.3.102",
|
||||||
"swc-loader": "0.2.3"
|
"swc-loader": "0.2.3"
|
||||||
},
|
},
|
||||||
"browserslist": {
|
"browserslist": {
|
||||||
|
@ -14,7 +14,7 @@ import translations from '@theme/SearchTranslations';
|
|||||||
import React, {useState, useRef, useCallback, useMemo} from 'react';
|
import React, {useState, useRef, useCallback, useMemo} from 'react';
|
||||||
import {createPortal} from 'react-dom';
|
import {createPortal} from 'react-dom';
|
||||||
|
|
||||||
// eslint-disable-next-line import/extensions
|
// eslint-disable-next-line rulesdir/extensions
|
||||||
import {tagToCounter} from '../SearchMetadata';
|
import {tagToCounter} from '../SearchMetadata';
|
||||||
let DocSearchModal = null;
|
let DocSearchModal = null;
|
||||||
function Hit({hit, children}) {
|
function Hit({hit, children}) {
|
||||||
|
@ -18,7 +18,7 @@ import algoliaSearchHelper from 'algoliasearch-helper';
|
|||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import React, {useEffect, useState, useReducer, useRef} from 'react';
|
import React, {useEffect, useState, useReducer, useRef} from 'react';
|
||||||
|
|
||||||
// eslint-disable-next-line import/extensions
|
// eslint-disable-next-line rulesdir/extensions
|
||||||
import {tagToCounter} from '../SearchMetadata';
|
import {tagToCounter} from '../SearchMetadata';
|
||||||
|
|
||||||
import styles from './styles.module.css';
|
import styles from './styles.module.css';
|
||||||
|
Loading…
Reference in New Issue
Block a user