diff --git a/src/common/Coverage.ts b/src/common/Coverage.ts index c4cf5124d87..06354a3da0a 100644 --- a/src/common/Coverage.ts +++ b/src/common/Coverage.ts @@ -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 { diff --git a/src/common/EventEmitter.ts b/src/common/EventEmitter.ts index 88d97762df1..0cc5e67fb13 100644 --- a/src/common/EventEmitter.ts +++ b/src/common/EventEmitter.ts @@ -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) { diff --git a/src/common/Target.ts b/src/common/Target.ts index 0e8296a633a..42506f1b1fa 100644 --- a/src/common/Target.ts +++ b/src/common/Target.ts @@ -191,6 +191,9 @@ export class Target { return this._browserContext.browser(); } + /** + * Get the browser context the target belongs to. + */ browserContext(): BrowserContext { return this._browserContext; }