fix(docs): API types do not extend EventEmitter (#32124)

Fixes https://github.com/microsoft/playwright/issues/32097
This commit is contained in:
Yury Semikhatsky 2024-08-12 11:22:48 -07:00 committed by GitHub
parent edd1894ac6
commit 2ae196f708
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 1 additions and 13 deletions

View file

@ -1,6 +1,5 @@
# class: Browser
* since: v1.8
* extends: [EventEmitter]
A Browser is created via [`method: BrowserType.launch`]. An example of using a [Browser] to create a [Page]:

View file

@ -1,6 +1,5 @@
# class: BrowserContext
* since: v1.8
* extends: [EventEmitter]
BrowserContexts provide a way to operate multiple independent browser sessions.

View file

@ -1,6 +1,5 @@
# class: CDPSession
* since: v1.8
* extends: [EventEmitter]
The `CDPSession` instances are used to talk raw Chrome Devtools Protocol:
* protocol methods can be called with `session.send` method.

View file

@ -1,6 +1,5 @@
# class: Page
* since: v1.8
* extends: [EventEmitter]
Page provides methods to interact with a single tab in a [Browser], or an
[extension background page](https://developer.chrome.com/extensions/background_pages) in Chromium. One [Browser]

View file

@ -29,8 +29,6 @@ type ElementHandleWaitForSelectorOptionsNotHidden = ElementHandleWaitForSelector
};
/**
* - extends: [EventEmitter]
*
* Page provides methods to interact with a single tab in a {@link Browser}, or an
* [extension background page](https://developer.chrome.com/extensions/background_pages) in Chromium. One {@link
* Browser} instance might have multiple {@link Page} instances.
@ -7535,8 +7533,6 @@ export interface Frame {
}
/**
* - extends: [EventEmitter]
*
* BrowserContexts provide a way to operate multiple independent browser sessions.
*
* If a page opens another page, e.g. with a `window.open` call, the popup will belong to the parent page's browser
@ -8942,8 +8938,6 @@ export interface BrowserContext {
}
/**
* - extends: [EventEmitter]
*
* A Browser is created via
* [browserType.launch([options])](https://playwright.dev/docs/api/class-browsertype#browser-type-launch). An example
* of using a {@link Browser} to create a {@link Page}:
@ -14450,8 +14444,6 @@ export interface BrowserType<Unused = {}> {
}
/**
* - extends: [EventEmitter]
*
* The `CDPSession` instances are used to talk raw Chrome Devtools Protocol:
* - protocol methods can be called with `session.send` method.
* - protocol events can be subscribed to with `session.on` method.

View file

@ -98,7 +98,7 @@ class Documentation {
for (const [name, clazz] of this.classes.entries()) {
clazz.sortMembers();
if (!clazz.extends || ['EventEmitter', 'Error', 'Exception', 'RuntimeException'].includes(clazz.extends))
if (!clazz.extends || ['Error', 'Exception', 'RuntimeException'].includes(clazz.extends))
continue;
const superClass = this.classes.get(clazz.extends);
if (!superClass) {