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,12 +12,7 @@ Navigates the frame to the given `url`.
|
||||
class Frame {
|
||||
abstract goto(
|
||||
url: string,
|
||||
options?: {
|
||||
referer?: string;
|
||||
referrerPolicy?: string;
|
||||
timeout?: number;
|
||||
waitUntil?: PuppeteerLifeCycleEvent | PuppeteerLifeCycleEvent[];
|
||||
}
|
||||
options?: GoToOptions
|
||||
): Promise<HTTPResponse | null>;
|
||||
}
|
||||
```
|
||||
@ -25,9 +20,9 @@ class Frame {
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
|
||||
| --------- | ----------------------------------------- | --------------------------------------------------------------------------------------- |
|
||||
| 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:**
|
||||
|
||||
|
@ -10,22 +10,16 @@ Set the content of the frame.
|
||||
|
||||
```typescript
|
||||
class Frame {
|
||||
abstract setContent(
|
||||
html: string,
|
||||
options?: {
|
||||
timeout?: number;
|
||||
waitUntil?: PuppeteerLifeCycleEvent | PuppeteerLifeCycleEvent[];
|
||||
}
|
||||
): Promise<void>;
|
||||
abstract setContent(html: string, options?: WaitForOptions): Promise<void>;
|
||||
}
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| --------- | ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
|
||||
| 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:**
|
||||
|
||||
|
@ -339,12 +339,7 @@ export abstract class Frame extends EventEmitter<FrameEvents> {
|
||||
*/
|
||||
abstract goto(
|
||||
url: string,
|
||||
options?: {
|
||||
referer?: string;
|
||||
referrerPolicy?: string;
|
||||
timeout?: number;
|
||||
waitUntil?: PuppeteerLifeCycleEvent | PuppeteerLifeCycleEvent[];
|
||||
}
|
||||
options?: GoToOptions
|
||||
): 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
|
||||
* what point to consider the content setting successful.
|
||||
*/
|
||||
abstract setContent(
|
||||
html: string,
|
||||
options?: {
|
||||
timeout?: number;
|
||||
waitUntil?: PuppeteerLifeCycleEvent | PuppeteerLifeCycleEvent[];
|
||||
}
|
||||
): Promise<void>;
|
||||
abstract setContent(html: string, options?: WaitForOptions): Promise<void>;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
|
Loading…
Reference in New Issue
Block a user