Skip to content

Commit

Permalink
fix: added comments for browsercontext, startCSSCoverage, and startJS…
Browse files Browse the repository at this point in the history
…Coverage. (#7264)

* fix: modified comment for method product, platform and newPage

* fix: added comment for browsercontext, StartCSSCoverage, StartJSCoverage
  • Loading branch information
tasneemkoushar committed May 25, 2021
1 parent 159d283 commit b750397
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
7 changes: 4 additions & 3 deletions src/common/Coverage.ts
Expand Up @@ -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
Expand All @@ -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> {
Expand Down
8 changes: 4 additions & 4 deletions src/common/EventEmitter.ts
Expand Up @@ -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);
Expand All @@ -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);
Expand Down Expand Up @@ -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) => {
Expand All @@ -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) {
Expand Down
3 changes: 3 additions & 0 deletions src/common/Target.ts
Expand Up @@ -191,6 +191,9 @@ export class Target {
return this._browserContext.browser();
}

/**
* Get the browser context the target belongs to.
*/
browserContext(): BrowserContext {
return this._browserContext;
}
Expand Down

0 comments on commit b750397

Please sign in to comment.