mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
chore: use existing types (#11851)
Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
This commit is contained in:
parent
6c5b9ad3b9
commit
dfdd1aab38
@ -12,22 +12,17 @@ Navigates the frame to the given `url`.
|
|||||||
class Frame {
|
class Frame {
|
||||||
abstract goto(
|
abstract goto(
|
||||||
url: string,
|
url: string,
|
||||||
options?: {
|
options?: GoToOptions
|
||||||
referer?: string;
|
|
||||||
referrerPolicy?: string;
|
|
||||||
timeout?: number;
|
|
||||||
waitUntil?: PuppeteerLifeCycleEvent | PuppeteerLifeCycleEvent[];
|
|
||||||
}
|
|
||||||
): Promise<HTTPResponse | null>;
|
): Promise<HTTPResponse | null>;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
|
| --------- | ----------------------------------------- | --------------------------------------------------------------------------------------- |
|
||||||
| url | string | URL to navigate the frame to. The URL should include scheme, e.g. <code>https://</code> |
|
| url | string | URL to navigate the frame to. The URL should include scheme, e.g. <code>https://</code> |
|
||||||
| options | { referer?: string; referrerPolicy?: string; timeout?: number; waitUntil?: [PuppeteerLifeCycleEvent](./puppeteer.puppeteerlifecycleevent.md) \| [PuppeteerLifeCycleEvent](./puppeteer.puppeteerlifecycleevent.md)\[\]; } | _(Optional)_ Options to configure waiting behavior. |
|
| options | [GoToOptions](./puppeteer.gotooptions.md) | _(Optional)_ Options to configure waiting behavior. |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -10,22 +10,16 @@ Set the content of the frame.
|
|||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
class Frame {
|
class Frame {
|
||||||
abstract setContent(
|
abstract setContent(html: string, options?: WaitForOptions): Promise<void>;
|
||||||
html: string,
|
|
||||||
options?: {
|
|
||||||
timeout?: number;
|
|
||||||
waitUntil?: PuppeteerLifeCycleEvent | PuppeteerLifeCycleEvent[];
|
|
||||||
}
|
|
||||||
): Promise<void>;
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Parameters
|
## Parameters
|
||||||
|
|
||||||
| Parameter | Type | Description |
|
| Parameter | Type | Description |
|
||||||
| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
| --------- | ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| html | string | HTML markup to assign to the page. |
|
| html | string | HTML markup to assign to the page. |
|
||||||
| options | { timeout?: number; waitUntil?: [PuppeteerLifeCycleEvent](./puppeteer.puppeteerlifecycleevent.md) \| [PuppeteerLifeCycleEvent](./puppeteer.puppeteerlifecycleevent.md)\[\]; } | _(Optional)_ Options to configure how long before timing out and at what point to consider the content setting successful. |
|
| options | [WaitForOptions](./puppeteer.waitforoptions.md) | _(Optional)_ Options to configure how long before timing out and at what point to consider the content setting successful. |
|
||||||
|
|
||||||
**Returns:**
|
**Returns:**
|
||||||
|
|
||||||
|
@ -339,12 +339,7 @@ export abstract class Frame extends EventEmitter<FrameEvents> {
|
|||||||
*/
|
*/
|
||||||
abstract goto(
|
abstract goto(
|
||||||
url: string,
|
url: string,
|
||||||
options?: {
|
options?: GoToOptions
|
||||||
referer?: string;
|
|
||||||
referrerPolicy?: string;
|
|
||||||
timeout?: number;
|
|
||||||
waitUntil?: PuppeteerLifeCycleEvent | PuppeteerLifeCycleEvent[];
|
|
||||||
}
|
|
||||||
): Promise<HTTPResponse | null>;
|
): Promise<HTTPResponse | null>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -749,13 +744,7 @@ export abstract class Frame extends EventEmitter<FrameEvents> {
|
|||||||
* @param options - Options to configure how long before timing out and at
|
* @param options - Options to configure how long before timing out and at
|
||||||
* what point to consider the content setting successful.
|
* what point to consider the content setting successful.
|
||||||
*/
|
*/
|
||||||
abstract setContent(
|
abstract setContent(html: string, options?: WaitForOptions): Promise<void>;
|
||||||
html: string,
|
|
||||||
options?: {
|
|
||||||
timeout?: number;
|
|
||||||
waitUntil?: PuppeteerLifeCycleEvent | PuppeteerLifeCycleEvent[];
|
|
||||||
}
|
|
||||||
): Promise<void>;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
|
Loading…
Reference in New Issue
Block a user