fix: added comments for browsercontext, startCSSCoverage, and startJSCoverage. (#7264)
* fix: modified comment for method product, platform and newPage * fix: added comment for browsercontext, StartCSSCoverage, StartJSCoverage
This commit is contained in:
parent
159d283545
commit
b75039746a
@ -123,8 +123,8 @@ export class Coverage {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param options - defaults to
|
||||
* `{ resetOnNavigation : true, reportAnonymousScripts : false }`
|
||||
* @param options - Set of configurable options for coverage defaults to `{
|
||||
* resetOnNavigation : true, reportAnonymousScripts : false }`
|
||||
* @returns Promise that resolves when coverage is started.
|
||||
*
|
||||
* @remarks
|
||||
@ -150,7 +150,8 @@ export class Coverage {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param options - defaults to `{ resetOnNavigation : true }`
|
||||
* @param options - Set of configurable options for coverage, defaults to `{
|
||||
* resetOnNavigation : true }`
|
||||
* @returns Promise that resolves when coverage is started.
|
||||
*/
|
||||
async startCSSCoverage(options: CSSCoverageOptions = {}): Promise<void> {
|
||||
|
@ -55,7 +55,7 @@ export class EventEmitter implements CommonEventEmitter {
|
||||
* Bind an event listener to fire when an event occurs.
|
||||
* @param event - the event type you'd like to listen to. Can be a string or symbol.
|
||||
* @param handler - the function to be called when the event occurs.
|
||||
* @returns `this` to enable you to chain calls.
|
||||
* @returns `this` to enable you to chain method calls.
|
||||
*/
|
||||
on(event: EventType, handler: Handler): EventEmitter {
|
||||
this.emitter.on(event, handler);
|
||||
@ -66,7 +66,7 @@ export class EventEmitter implements CommonEventEmitter {
|
||||
* Remove an event listener from firing.
|
||||
* @param event - the event type you'd like to stop listening to.
|
||||
* @param handler - the function that should be removed.
|
||||
* @returns `this` to enable you to chain calls.
|
||||
* @returns `this` to enable you to chain method calls.
|
||||
*/
|
||||
off(event: EventType, handler: Handler): EventEmitter {
|
||||
this.emitter.off(event, handler);
|
||||
@ -107,7 +107,7 @@ export class EventEmitter implements CommonEventEmitter {
|
||||
* Like `on` but the listener will only be fired once and then it will be removed.
|
||||
* @param event - the event you'd like to listen to
|
||||
* @param handler - the handler function to run when the event occurs
|
||||
* @returns `this` to enable you to chain calls.
|
||||
* @returns `this` to enable you to chain method calls.
|
||||
*/
|
||||
once(event: EventType, handler: Handler): EventEmitter {
|
||||
const onceHandler: Handler = (eventData) => {
|
||||
@ -132,7 +132,7 @@ export class EventEmitter implements CommonEventEmitter {
|
||||
* Removes all listeners. If given an event argument, it will remove only
|
||||
* listeners for that event.
|
||||
* @param event - the event to remove listeners for.
|
||||
* @returns `this` to enable you to chain calls.
|
||||
* @returns `this` to enable you to chain method calls.
|
||||
*/
|
||||
removeAllListeners(event?: EventType): EventEmitter {
|
||||
if (event) {
|
||||
|
@ -191,6 +191,9 @@ export class Target {
|
||||
return this._browserContext.browser();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the browser context the target belongs to.
|
||||
*/
|
||||
browserContext(): BrowserContext {
|
||||
return this._browserContext;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user