docs(new): migrate Page.ts to TSDoc (part 0 / 2) (#6104)

* docs(new): migrate Page.ts to TSDoc (part 0 / 2)

Co-authored-by: Changhao Han <changhaohan@chromium.org>
This commit is contained in:
Changhao Han
2020-06-26 09:24:56 +02:00
committed by GitHub
parent df96f16921
commit adeffbaac1
34 changed files with 394 additions and 37 deletions

View File

@@ -4,23 +4,33 @@
## Page.setGeolocation() method
Sets the page's geolocation.
<b>Signature:</b>
```typescript
setGeolocation(options: {
longitude: number;
latitude: number;
accuracy?: number;
}): Promise<void>;
setGeolocation(options: GeolocationOptions): Promise<void>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| options | { longitude: number; latitude: number; accuracy?: number; } | |
| options | [GeolocationOptions](./puppeteer.geolocationoptions.md) | |
<b>Returns:</b>
Promise&lt;void&gt;
## Remarks
Consider using [BrowserContext.overridePermissions()](./puppeteer.browsercontext.overridepermissions.md) to grant permissions for the page to read its geolocation.
## Example
```js
await page.setGeolocation({latitude: 59.95, longitude: 30.31667});
```