docs: fixed various typos (#5958)

This commit is contained in:
Max Schmitt 2021-03-26 18:47:16 +01:00 committed by GitHub
parent 475a6fe391
commit dfe07818e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 41 additions and 41 deletions

View file

@ -8,7 +8,7 @@ assistive technology such as [screen readers](https://en.wikipedia.org/wiki/Scre
Accessibility is a very platform-specific thing. On different platforms, there are different screen readers that might
have wildly different output.
Rendering engines of Chromium, Firefox and Webkit have a concept of "accessibility tree", which is then translated into different
Rendering engines of Chromium, Firefox and WebKit have a concept of "accessibility tree", which is then translated into different
platform-specific APIs. Accessibility namespace gives access to this Accessibility Tree.
Most of the accessibility tree gets filtered out when converting from internal browser AX Tree to Platform-specific AX-Tree or by

View file

@ -645,7 +645,7 @@ Returns all open pages in the context.
Routing provides the capability to modify network requests that are made by any page in the browser context. Once route
is enabled, every request matching the url pattern will stall unless it's continued, fulfilled or aborted.
An example of a naïve handler that aborts all image requests:
An example of a naive handler that aborts all image requests:
```js
const context = await browser.newContext();

View file

@ -3,7 +3,7 @@
Coverage gathers information about parts of JavaScript and CSS that were used by the page.
An example of using JavaScript coverage to produce Istambul report for page load:
An example of using JavaScript coverage to produce Istanbul report for page load:
```js
const { chromium } = require('playwright');

View file

@ -204,8 +204,8 @@ When all steps combined have not finished during the specified [`option: timeout
## async method: ElementHandle.dispatchEvent
The snippet below dispatches the `click` event on the element. Regardless of the visibility state of the elment, `click`
is dispatched. This is equivalend to calling
The snippet below dispatches the `click` event on the element. Regardless of the visibility state of the element, `click`
is dispatched. This is equivalent to calling
[element.click()](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/click).
```js
@ -494,7 +494,7 @@ Holding down `Shift` will type the text that corresponds to the [`param: key`] i
If [`param: key`] is a single character, it is case-sensitive, so the values `a` and `A` will generate different
respective texts.
Shortcuts such as `key: "Control+o"` or `key: "Control+Shift+T"` are supported as well. When speficied with the
Shortcuts such as `key: "Control+o"` or `key: "Control+Shift+T"` are supported as well. When specified with the
modifier, modifier is pressed and being held while the subsequent key is being pressed.
### param: ElementHandle.press.key

View file

@ -252,8 +252,8 @@ When all steps combined have not finished during the specified [`option: timeout
## async method: Frame.dispatchEvent
The snippet below dispatches the `click` event on the element. Regardless of the visibility state of the elment, `click`
is dispatched. This is equivalend to calling
The snippet below dispatches the `click` event on the element. Regardless of the visibility state of the element, `click`
is dispatched. This is equivalent to calling
[element.click()](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/click).
```js
@ -858,7 +858,7 @@ Holding down `Shift` will type the text that corresponds to the [`param: key`] i
If [`param: key`] is a single character, it is case-sensitive, so the values `a` and `A` will generate different
respective texts.
Shortcuts such as `key: "Control+o"` or `key: "Control+Shift+T"` are supported as well. When speficied with the
Shortcuts such as `key: "Control+o"` or `key: "Control+Shift+T"` are supported as well. When specified with the
modifier, modifier is pressed and being held while the subsequent key is being pressed.
### param: Frame.press.selector = %%-input-selector-%%

View file

@ -191,7 +191,7 @@ Holding down `Shift` will type the text that corresponds to the [`param: key`] i
If [`param: key`] is a single character, it is case-sensitive, so the values `a` and `A` will generate different
respective texts.
Shortcuts such as `key: "Control+o"` or `key: "Control+Shift+T"` are supported as well. When speficied with the
Shortcuts such as `key: "Control+o"` or `key: "Control+Shift+T"` are supported as well. When specified with the
modifier, modifier is pressed and being held while the subsequent key is being pressed.
```js

View file

@ -641,8 +641,8 @@ Shortcut for main frame's [`method: Frame.dblclick`].
## async method: Page.dispatchEvent
The snippet below dispatches the `click` event on the element. Regardless of the visibility state of the elment, `click`
is dispatched. This is equivalend to calling
The snippet below dispatches the `click` event on the element. Regardless of the visibility state of the element, `click`
is dispatched. This is equivalent to calling
[element.click()](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/click).
```js
@ -1957,7 +1957,7 @@ Holding down `Shift` will type the text that corresponds to the [`param: key`] i
If [`param: key`] is a single character, it is case-sensitive, so the values `a` and `A` will generate different
respective texts.
Shortcuts such as `key: "Control+o"` or `key: "Control+Shift+T"` are supported as well. When speficied with the
Shortcuts such as `key: "Control+o"` or `key: "Control+Shift+T"` are supported as well. When specified with the
modifier, modifier is pressed and being held while the subsequent key is being pressed.
```js
@ -2069,7 +2069,7 @@ Once routing is enabled, every request matching the url pattern will stall unles
The handler will only be called for the first url if the response is a redirect.
:::
An example of a naïve handler that aborts all image requests:
An example of a naive handler that aborts all image requests:
```js
const page = await browser.newPage();

View file

@ -1,7 +1,7 @@
# class: Touchscreen
The Touchscreen class operates in main-frame CSS pixels relative to the top-left corner of the viewport. Methods on the
touchscreen can only be used in browser contexts that have been intialized with `hasTouch` set to true.
touchscreen can only be used in browser contexts that have been initialized with `hasTouch` set to true.
## async method: Touchscreen.tap

View file

@ -11,7 +11,7 @@ Fired when the websocket closes.
- argument: <[Object]>
- `payload` <[string]|[Buffer]> frame payload
Fired when the websocket recieves a frame.
Fired when the websocket receives a frame.
## event: WebSocket.frameReceived
* langs: csharp, java

View file

@ -52,7 +52,7 @@ title: "Community Showcase"
* [e2e Boilerplates](https://github.com/e2e-boilerplate?utf8=%E2%9C%93&q=playwright): Project boilerplates for using Playwright with TypeScript, Cucumber, Jest, and other libraries
* [react-app-playwright](https://github.com/KyleADay/react-app-playwright): Using Playwright with a create-react-app project
* [playwright-react-typescript-jest-example](https://github.com/azemetre/playwright-react-typescript-jest-example): Using Playwright + Jest with a custom webpack configuration for React + Typescript project
* [playwright-react-typescript-jest-example](https://github.com/azemetre/playwright-react-typescript-jest-example): Using Playwright + Jest with a custom webpack configuration for React + TypeScript project
* [playwright-mocha](https://github.com/roggerfe/playwright-mocha): Using Playwright with Mocha and Chai
* [playwright-cljs](https://github.com/apeckham/playwright-cljs): Playwright examples in ClojureScript
* [playwright-azure-functions](https://github.com/arjun27/playwright-azure-functions): Playwright setup on Azure Functions

View file

@ -25,7 +25,7 @@ import * as URL from 'url';
import * as util from 'util';
import { BrowserName, Registry, hostPlatform } from '../utils/registry';
// `https-proxy-agent` v5 is written in Typescript and exposes generated types.
// `https-proxy-agent` v5 is written in TypeScript and exposes generated types.
// However, as of June 2020, its types are generated with tsconfig that enables
// `esModuleInterop` option.
//

View file

@ -81,7 +81,7 @@ it('should support webgl', (test, {browserName, headful}) => {
});
it('should support webgl 2', (test, {browserName, headful}) => {
test.skip(browserName === 'webkit', 'Webkit doesn\'t have webgl2 enabled yet upstream.');
test.skip(browserName === 'webkit', 'WebKit doesn\'t have webgl2 enabled yet upstream.');
test.fixme(browserName === 'firefox' && !headful);
test.fixme(browserName === 'chromium' && headful, 'chromium doesn\'t like webgl2 when running under xvfb');
}, async ({page}) => {

View file

@ -134,7 +134,7 @@ it('should work with subframes return 204 with domcontentloaded', async ({page,
});
it('should fail when server returns 204', async ({page, server, isChromium, isWebKit}) => {
// Webkit just loads an empty page.
// WebKit just loads an empty page.
server.setRoute('/empty.html', (req, res) => {
res.statusCode = 204;
res.end();

42
types/types.d.ts vendored
View file

@ -1559,8 +1559,8 @@ export interface Page {
}): Promise<void>;
/**
* The snippet below dispatches the `click` event on the element. Regardless of the visibility state of the elment, `click`
* is dispatched. This is equivalend to calling
* The snippet below dispatches the `click` event on the element. Regardless of the visibility state of the element,
* `click` is dispatched. This is equivalent to calling
* [element.click()](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/click).
*
* ```js
@ -2256,7 +2256,7 @@ export interface Page {
* If `key` is a single character, it is case-sensitive, so the values `a` and `A` will generate different respective
* texts.
*
* Shortcuts such as `key: "Control+o"` or `key: "Control+Shift+T"` are supported as well. When speficied with the
* Shortcuts such as `key: "Control+o"` or `key: "Control+Shift+T"` are supported as well. When specified with the
* modifier, modifier is pressed and being held while the subsequent key is being pressed.
*
* ```js
@ -2329,7 +2329,7 @@ export interface Page {
*
* > NOTE: The handler will only be called for the first url if the response is a redirect.
*
* An example of a naïve handler that aborts all image requests:
* An example of a naive handler that aborts all image requests:
*
* ```js
* const page = await browser.newPage();
@ -3680,8 +3680,8 @@ export interface Frame {
}): Promise<void>;
/**
* The snippet below dispatches the `click` event on the element. Regardless of the visibility state of the elment, `click`
* is dispatched. This is equivalend to calling
* The snippet below dispatches the `click` event on the element. Regardless of the visibility state of the element,
* `click` is dispatched. This is equivalent to calling
* [element.click()](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/click).
*
* ```js
@ -4058,7 +4058,7 @@ export interface Frame {
* If `key` is a single character, it is case-sensitive, so the values `a` and `A` will generate different respective
* texts.
*
* Shortcuts such as `key: "Control+o"` or `key: "Control+Shift+T"` are supported as well. When speficied with the
* Shortcuts such as `key: "Control+o"` or `key: "Control+Shift+T"` are supported as well. When specified with the
* modifier, modifier is pressed and being held while the subsequent key is being pressed.
* @param selector A selector to search for element. If there are multiple elements satisfying the selector, the first will be used. See [working with selectors](https://playwright.dev/docs/selectors) for more details.
* @param key Name of the key to press or a character to generate, such as `ArrowLeft` or `a`.
@ -4924,7 +4924,7 @@ export interface BrowserContext {
* Routing provides the capability to modify network requests that are made by any page in the browser context. Once route
* is enabled, every request matching the url pattern will stall unless it's continued, fulfilled or aborted.
*
* An example of a naïve handler that aborts all image requests:
* An example of a naive handler that aborts all image requests:
*
* ```js
* const context = await browser.newContext();
@ -5660,8 +5660,8 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
}): Promise<void>;
/**
* The snippet below dispatches the `click` event on the element. Regardless of the visibility state of the elment, `click`
* is dispatched. This is equivalend to calling
* The snippet below dispatches the `click` event on the element. Regardless of the visibility state of the element,
* `click` is dispatched. This is equivalent to calling
* [element.click()](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/click).
*
* ```js
@ -5838,7 +5838,7 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
* If `key` is a single character, it is case-sensitive, so the values `a` and `A` will generate different respective
* texts.
*
* Shortcuts such as `key: "Control+o"` or `key: "Control+Shift+T"` are supported as well. When speficied with the
* Shortcuts such as `key: "Control+o"` or `key: "Control+Shift+T"` are supported as well. When specified with the
* modifier, modifier is pressed and being held while the subsequent key is being pressed.
* @param key Name of the key to press or a character to generate, such as `ArrowLeft` or `a`.
* @param options
@ -6959,7 +6959,7 @@ class TimeoutError extends Error {}
* Accessibility is a very platform-specific thing. On different platforms, there are different screen readers that might
* have wildly different output.
*
* Rendering engines of Chromium, Firefox and Webkit have a concept of "accessibility tree", which is then translated into
* Rendering engines of Chromium, Firefox and WebKit have a concept of "accessibility tree", which is then translated into
* different platform-specific APIs. Accessibility namespace gives access to this Accessibility Tree.
*
* Most of the accessibility tree gets filtered out when converting from internal browser AX Tree to Platform-specific
@ -8880,7 +8880,7 @@ export interface ChromiumBrowserContext extends BrowserContext {
/**
* Coverage gathers information about parts of JavaScript and CSS that were used by the page.
*
* An example of using JavaScript coverage to produce Istambul report for page load:
* An example of using JavaScript coverage to produce Istanbul report for page load:
*
* ```js
* const { chromium } = require('playwright');
@ -9429,7 +9429,7 @@ export interface Keyboard {
* If `key` is a single character, it is case-sensitive, so the values `a` and `A` will generate different respective
* texts.
*
* Shortcuts such as `key: "Control+o"` or `key: "Control+Shift+T"` are supported as well. When speficied with the
* Shortcuts such as `key: "Control+o"` or `key: "Control+Shift+T"` are supported as well. When specified with the
* modifier, modifier is pressed and being held while the subsequent key is being pressed.
*
* ```js
@ -10094,7 +10094,7 @@ export interface Selectors {
/**
* The Touchscreen class operates in main-frame CSS pixels relative to the top-left corner of the viewport. Methods on the
* touchscreen can only be used in browser contexts that have been intialized with `hasTouch` set to true.
* touchscreen can only be used in browser contexts that have been initialized with `hasTouch` set to true.
*/
export interface Touchscreen {
/**
@ -10140,7 +10140,7 @@ export interface WebSocket {
on(event: 'close', listener: (webSocket: WebSocket) => void): this;
/**
* Fired when the websocket recieves a frame.
* Fired when the websocket receives a frame.
*/
on(event: 'framereceived', listener: (data: {
/**
@ -10170,7 +10170,7 @@ export interface WebSocket {
once(event: 'close', listener: (webSocket: WebSocket) => void): this;
/**
* Fired when the websocket recieves a frame.
* Fired when the websocket receives a frame.
*/
once(event: 'framereceived', listener: (data: {
/**
@ -10200,7 +10200,7 @@ export interface WebSocket {
addListener(event: 'close', listener: (webSocket: WebSocket) => void): this;
/**
* Fired when the websocket recieves a frame.
* Fired when the websocket receives a frame.
*/
addListener(event: 'framereceived', listener: (data: {
/**
@ -10230,7 +10230,7 @@ export interface WebSocket {
removeListener(event: 'close', listener: (webSocket: WebSocket) => void): this;
/**
* Fired when the websocket recieves a frame.
* Fired when the websocket receives a frame.
*/
removeListener(event: 'framereceived', listener: (data: {
/**
@ -10260,7 +10260,7 @@ export interface WebSocket {
off(event: 'close', listener: (webSocket: WebSocket) => void): this;
/**
* Fired when the websocket recieves a frame.
* Fired when the websocket receives a frame.
*/
off(event: 'framereceived', listener: (data: {
/**
@ -10300,7 +10300,7 @@ export interface WebSocket {
waitForEvent(event: 'close', optionsOrPredicate?: { predicate?: (webSocket: WebSocket) => boolean, timeout?: number } | ((webSocket: WebSocket) => boolean)): Promise<WebSocket>;
/**
* Fired when the websocket recieves a frame.
* Fired when the websocket receives a frame.
*/
waitForEvent(event: 'framereceived', optionsOrPredicate?: { predicate?: (data: {
/**