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

This commit is contained in:
Jack Franklin 2020-06-30 15:56:37 +01:00 committed by GitHub
parent 8026ca9514
commit 9f198626f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 19 additions and 81 deletions

View File

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [JSHandle](./puppeteer.jshandle.md) &gt; [\_client](./puppeteer.jshandle._client.md)
## JSHandle.\_client property
<b>Signature:</b>
```typescript
_client: CDPSession;
```

View File

@ -1,22 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [JSHandle](./puppeteer.jshandle.md) &gt; [(constructor)](./puppeteer.jshandle._constructor_.md)
## JSHandle.(constructor)
Constructs a new instance of the `JSHandle` class
<b>Signature:</b>
```typescript
constructor(context: ExecutionContext, client: CDPSession, remoteObject: Protocol.Runtime.RemoteObject);
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| context | [ExecutionContext](./puppeteer.executioncontext.md) | |
| client | [CDPSession](./puppeteer.cdpsession.md) | |
| remoteObject | Protocol.Runtime.RemoteObject | |

View File

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [JSHandle](./puppeteer.jshandle.md) &gt; [\_context](./puppeteer.jshandle._context.md)
## JSHandle.\_context property
<b>Signature:</b>
```typescript
_context: ExecutionContext;
```

View File

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [JSHandle](./puppeteer.jshandle.md) &gt; [\_disposed](./puppeteer.jshandle._disposed.md)
## JSHandle.\_disposed property
<b>Signature:</b>
```typescript
_disposed: boolean;
```

View File

@ -1,11 +0,0 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [puppeteer](./puppeteer.md) &gt; [JSHandle](./puppeteer.jshandle.md) &gt; [\_remoteObject](./puppeteer.jshandle._remoteobject.md)
## JSHandle.\_remoteObject property
<b>Signature:</b>
```typescript
_remoteObject: Protocol.Runtime.RemoteObject;
```

View File

@ -12,6 +12,10 @@ Represents an in-page JavaScript object. JSHandles can be created with the [page
export declare class JSHandle 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 ## Example
@ -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)<!-- -->. 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 ## Methods
| Method | Modifiers | Description | | Method | Modifiers | Description |

View File

@ -100,11 +100,26 @@ export function createJSHandle(
* @public * @public
*/ */
export class JSHandle { export class JSHandle {
/**
* @internal
*/
_context: ExecutionContext; _context: ExecutionContext;
/**
* @internal
*/
_client: CDPSession; _client: CDPSession;
/**
* @internal
*/
_remoteObject: Protocol.Runtime.RemoteObject; _remoteObject: Protocol.Runtime.RemoteObject;
/**
* @internal
*/
_disposed = false; _disposed = false;
/**
* @internal
*/
constructor( constructor(
context: ExecutionContext, context: ExecutionContext,
client: CDPSession, client: CDPSession,