diff --git a/docs/api/puppeteer.elementhandle.boundingbox.md b/docs/api/puppeteer.elementhandle.boundingbox.md index e47a0e1a250..bf475b44b2c 100644 --- a/docs/api/puppeteer.elementhandle.boundingbox.md +++ b/docs/api/puppeteer.elementhandle.boundingbox.md @@ -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: diff --git a/docs/api/puppeteer.elementhandle.boxmodel.md b/docs/api/puppeteer.elementhandle.boxmodel.md index 9adf38d4b0b..9cc8f06fc5d 100644 --- a/docs/api/puppeteer.elementhandle.boxmodel.md +++ b/docs/api/puppeteer.elementhandle.boxmodel.md @@ -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: diff --git a/docs/api/puppeteer.elementhandle.md b/docs/api/puppeteer.elementhandle.md index 88f21f5093f..b47b5abf450 100644 --- a/docs/api/puppeteer.elementhandle.md +++ b/docs/api/puppeteer.elementhandle.md @@ -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) | |
Runs the given function on the first element matching the given selector in the current element.
If the given function returns a promise, then this method will wait till the promise resolves.
| | [$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), ornull
if the element is not visible. |
-| [boxModel()](./puppeteer.elementhandle.boxmodel.md) | | This method returns boxes of the element, or null
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 null
if the element is [not part of the layout](https://drafts.csswg.org/css-display-4/#box-generation) (example: display: none
). |
+| [boxModel()](./puppeteer.elementhandle.boxmodel.md) | | 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
). |
| [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. |
diff --git a/packages/puppeteer-core/src/api/ElementHandle.ts b/packages/puppeteer-core/src/api/ElementHandle.ts
index e166f3103d0..3355c5ceebe 100644
--- a/packages/puppeteer-core/src/api/ElementHandle.ts
+++ b/packages/puppeteer-core/src/api/ElementHandle.ts
@@ -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
*