From dfe07818e674041e023938cc9f03ba6b4f266394 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Fri, 26 Mar 2021 18:47:16 +0100 Subject: [PATCH] docs: fixed various typos (#5958) --- docs/src/api/class-accessibility.md | 2 +- docs/src/api/class-browsercontext.md | 2 +- docs/src/api/class-chromiumcoverage.md | 2 +- docs/src/api/class-elementhandle.md | 6 ++-- docs/src/api/class-frame.md | 6 ++-- docs/src/api/class-keyboard.md | 2 +- docs/src/api/class-page.md | 8 ++--- docs/src/api/class-touchscreen.md | 2 +- docs/src/api/class-websocket.md | 2 +- docs/src/showcase.md | 2 +- src/install/browserFetcher.ts | 2 +- test/capabilities.spec.ts | 2 +- test/page-goto.spec.ts | 2 +- types/types.d.ts | 42 +++++++++++++------------- 14 files changed, 41 insertions(+), 41 deletions(-) diff --git a/docs/src/api/class-accessibility.md b/docs/src/api/class-accessibility.md index 7a7ac5128a..a6c0fdbc70 100644 --- a/docs/src/api/class-accessibility.md +++ b/docs/src/api/class-accessibility.md @@ -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 diff --git a/docs/src/api/class-browsercontext.md b/docs/src/api/class-browsercontext.md index ac18c62da2..39cc80ace7 100644 --- a/docs/src/api/class-browsercontext.md +++ b/docs/src/api/class-browsercontext.md @@ -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(); diff --git a/docs/src/api/class-chromiumcoverage.md b/docs/src/api/class-chromiumcoverage.md index 5d55e7047a..c1929fe691 100644 --- a/docs/src/api/class-chromiumcoverage.md +++ b/docs/src/api/class-chromiumcoverage.md @@ -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'); diff --git a/docs/src/api/class-elementhandle.md b/docs/src/api/class-elementhandle.md index 3a39f591ac..807a4f49ab 100644 --- a/docs/src/api/class-elementhandle.md +++ b/docs/src/api/class-elementhandle.md @@ -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 diff --git a/docs/src/api/class-frame.md b/docs/src/api/class-frame.md index 92378fcece..7645b8b362 100644 --- a/docs/src/api/class-frame.md +++ b/docs/src/api/class-frame.md @@ -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-%% diff --git a/docs/src/api/class-keyboard.md b/docs/src/api/class-keyboard.md index 47bec79ada..be49dc8cd1 100644 --- a/docs/src/api/class-keyboard.md +++ b/docs/src/api/class-keyboard.md @@ -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 diff --git a/docs/src/api/class-page.md b/docs/src/api/class-page.md index 2f42461bd6..6c0c8d1d0e 100644 --- a/docs/src/api/class-page.md +++ b/docs/src/api/class-page.md @@ -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(); diff --git a/docs/src/api/class-touchscreen.md b/docs/src/api/class-touchscreen.md index 59e7bf08ef..fca94302ff 100644 --- a/docs/src/api/class-touchscreen.md +++ b/docs/src/api/class-touchscreen.md @@ -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 diff --git a/docs/src/api/class-websocket.md b/docs/src/api/class-websocket.md index fd258d80a8..95fce28ac7 100644 --- a/docs/src/api/class-websocket.md +++ b/docs/src/api/class-websocket.md @@ -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 diff --git a/docs/src/showcase.md b/docs/src/showcase.md index b870fd81e0..9829c09b0f 100644 --- a/docs/src/showcase.md +++ b/docs/src/showcase.md @@ -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 diff --git a/src/install/browserFetcher.ts b/src/install/browserFetcher.ts index 84dd279265..696cf9a0ba 100644 --- a/src/install/browserFetcher.ts +++ b/src/install/browserFetcher.ts @@ -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. // diff --git a/test/capabilities.spec.ts b/test/capabilities.spec.ts index 0236bfc71f..4c331b89a5 100644 --- a/test/capabilities.spec.ts +++ b/test/capabilities.spec.ts @@ -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}) => { diff --git a/test/page-goto.spec.ts b/test/page-goto.spec.ts index 385b55b64d..55d115a80d 100644 --- a/test/page-goto.spec.ts +++ b/test/page-goto.spec.ts @@ -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(); diff --git a/types/types.d.ts b/types/types.d.ts index dd39343c5c..9f11067810 100644 --- a/types/types.d.ts +++ b/types/types.d.ts @@ -1559,8 +1559,8 @@ export interface Page { }): Promise; /** - * 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; /** - * 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 extends JSHandle { }): Promise; /** - * 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 extends JSHandle { * 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; /** - * Fired when the websocket recieves a frame. + * Fired when the websocket receives a frame. */ waitForEvent(event: 'framereceived', optionsOrPredicate?: { predicate?: (data: { /**