Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(docs): mark JSHandle properties as internal #6126

Merged
merged 1 commit into from Jun 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 0 additions & 11 deletions new-docs/puppeteer.jshandle._client.md

This file was deleted.

22 changes: 0 additions & 22 deletions new-docs/puppeteer.jshandle._constructor_.md

This file was deleted.

11 changes: 0 additions & 11 deletions new-docs/puppeteer.jshandle._context.md

This file was deleted.

11 changes: 0 additions & 11 deletions new-docs/puppeteer.jshandle._disposed.md

This file was deleted.

11 changes: 0 additions & 11 deletions new-docs/puppeteer.jshandle._remoteobject.md

This file was deleted.

19 changes: 4 additions & 15 deletions new-docs/puppeteer.jshandle.md
Expand Up @@ -12,6 +12,10 @@ Represents an in-page JavaScript object. JSHandles can be created with the [page
export declare class JSHandle
```

## Remarks

The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `JSHandle` class.

## Example


Expand All @@ -23,21 +27,6 @@ JSHandle prevents the referenced JavaScript object from being garbage-collected

JSHandle instances can be used as arguments for [Page.$eval()](./puppeteer.page._eval.md)<!-- -->, [Page.evaluate()](./puppeteer.page.evaluate.md)<!-- -->, and [Page.evaluateHandle()](./puppeteer.page.evaluatehandle.md)<!-- -->.

## Constructors

| Constructor | Modifiers | Description |
| --- | --- | --- |
| [(constructor)(context, client, remoteObject)](./puppeteer.jshandle._constructor_.md) | | Constructs a new instance of the <code>JSHandle</code> class |

## Properties

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [\_client](./puppeteer.jshandle._client.md) | | [CDPSession](./puppeteer.cdpsession.md) | |
| [\_context](./puppeteer.jshandle._context.md) | | [ExecutionContext](./puppeteer.executioncontext.md) | |
| [\_disposed](./puppeteer.jshandle._disposed.md) | | boolean | |
| [\_remoteObject](./puppeteer.jshandle._remoteobject.md) | | Protocol.Runtime.RemoteObject | |

## Methods

| Method | Modifiers | Description |
Expand Down
15 changes: 15 additions & 0 deletions src/common/JSHandle.ts
Expand Up @@ -100,11 +100,26 @@ export function createJSHandle(
* @public
*/
export class JSHandle {
/**
* @internal
*/
_context: ExecutionContext;
/**
* @internal
*/
_client: CDPSession;
/**
* @internal
*/
_remoteObject: Protocol.Runtime.RemoteObject;
/**
* @internal
*/
_disposed = false;

/**
* @internal
*/
constructor(
context: ExecutionContext,
client: CDPSession,
Expand Down