Skip to content

Commit

Permalink
Tweaks the WebWorker tsdoc annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
martinsplitt committed Jun 17, 2020
1 parent b2aed9c commit 92925a9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/WebWorker.ts
Expand Up @@ -31,9 +31,11 @@ type ExceptionThrownCallback = (
type JSHandleFactory = (obj: Protocol.Runtime.RemoteObject) => JSHandle;

/**
* The WebWorker class represents a [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API).
* The WebWorker class represents a {@link https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API | WebWorker}.
* The events `workercreated` and `workerdestroyed` are emitted on the page object to signal the worker lifecycle.
*
* @remarks
*
* @example
* ```js
* page.on('workercreated', worker => console.log('Worker created: ' + worker.url()));
Expand All @@ -44,7 +46,7 @@ type JSHandleFactory = (obj: Protocol.Runtime.RemoteObject) => JSHandle;
* console.log(' ' + worker.url());
* }
* ```
*
*
* @public
*/
export class WebWorker extends EventEmitter {
Expand All @@ -54,7 +56,7 @@ export class WebWorker extends EventEmitter {
_executionContextCallback: (value: ExecutionContext) => void;

/**
*
*
* @internal
*/
constructor(
Expand Down Expand Up @@ -98,7 +100,6 @@ export class WebWorker extends EventEmitter {
}

/**
* Returns the URL for the script this web worker is running.
* @returns The URL of this web worker.
*/
url(): string {
Expand Down

0 comments on commit 92925a9

Please sign in to comment.