docs: fix ElementHandle boundingBox & boxModel descriptions (#11339)

This commit is contained in:
Nikolay Vitkov 2023-11-13 15:47:42 +01:00 committed by GitHub
parent 0a41f8d01e
commit 35a05d5cc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 6 deletions

View File

@ -4,7 +4,7 @@ sidebar_label: ElementHandle.boundingBox
# ElementHandle.boundingBox() method
This method returns the bounding box of the element (relative to the main frame), or `null` if the element is not visible.
This method returns the bounding box of the element (relative to the main frame), or `null` if the element is [not part of the layout](https://drafts.csswg.org/css-display-4/#box-generation) (example: `display: none`).
#### Signature:

View File

@ -4,7 +4,7 @@ sidebar_label: ElementHandle.boxModel
# ElementHandle.boxModel() method
This method returns boxes of the element, or `null` if the element is not visible.
This method returns boxes of the element, or `null` if the element is [not part of the layout](https://drafts.csswg.org/css-display-4/#box-generation) (example: `display: none`).
#### Signature:

View File

@ -55,8 +55,8 @@ The constructor for this class is marked as internal. Third-party code should no
| [$eval(selector, pageFunction, args)](./puppeteer.elementhandle._eval.md) | | <p>Runs the given function on the first element matching the given selector in the current element.</p><p>If the given function returns a promise, then this method will wait till the promise resolves.</p> |
| [$x(expression)](./puppeteer.elementhandle._x.md) | | |
| [autofill(data)](./puppeteer.elementhandle.autofill.md) | | If the element is a form input, you can use [ElementHandle.autofill()](./puppeteer.elementhandle.autofill.md) to test if the form is compatible with the browser's autofill implementation. Throws an error if the form cannot be autofilled. |
| [boundingBox()](./puppeteer.elementhandle.boundingbox.md) | | This method returns the bounding box of the element (relative to the main frame), or <code>null</code> if the element is not visible. |
| [boxModel()](./puppeteer.elementhandle.boxmodel.md) | | This method returns boxes of the element, or <code>null</code> if the element is not visible. |
| [boundingBox()](./puppeteer.elementhandle.boundingbox.md) | | This method returns the bounding box of the element (relative to the main frame), or <code>null</code> if the element is [not part of the layout](https://drafts.csswg.org/css-display-4/#box-generation) (example: <code>display: none</code>). |
| [boxModel()](./puppeteer.elementhandle.boxmodel.md) | | This method returns boxes of the element, or <code>null</code> if the element is [not part of the layout](https://drafts.csswg.org/css-display-4/#box-generation) (example: <code>display: none</code>). |
| [click(this, options)](./puppeteer.elementhandle.click.md) | | This method scrolls element into view if needed, and then uses [Page.mouse](./puppeteer.page.md) to click in the center of the element. If the element is detached from DOM, the method throws an error. |
| [clickablePoint(offset)](./puppeteer.elementhandle.clickablepoint.md) | | Returns the middle point within an element unless a specific offset is provided. |
| [contentFrame(this)](./puppeteer.elementhandle.contentframe.md) | | Resolves the frame associated with the element, if any. Always exists for HTMLIFrameElements. |

View File

@ -1156,7 +1156,8 @@ export abstract class ElementHandle<
/**
* This method returns the bounding box of the element (relative to the main frame),
* or `null` if the element is not visible.
* or `null` if the element is {@link https://drafts.csswg.org/css-display-4/#box-generation | not part of the layout}
* (example: `display: none`).
*/
@throwIfDisposed()
@ElementHandle.bindIsolatedHandle
@ -1188,7 +1189,9 @@ export abstract class ElementHandle<
}
/**
* This method returns boxes of the element, or `null` if the element is not visible.
* This method returns boxes of the element,
* or `null` if the element is {@link https://drafts.csswg.org/css-display-4/#box-generation | not part of the layout}
* (example: `display: none`).
*
* @remarks
*