Skip to content

Commit 37b39b7

Browse files
authored
docs(evaluate): clarify exposeFunctions scope and lifetime (#41856)
1 parent d9eb1b0 commit 37b39b7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/src/api/params.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ Function to be evaluated in the page context.
588588
* langs: js
589589
- `exposeFunctions` <[boolean]>
590590

591-
When set to `true`, functions passed inside [`param: arg`] are exposed in the page and can be called from the page function. Calling one returns a [Promise] of its result. The page-side functions are scoped to the execution context they were passed to and disappear when the page navigates. Defaults to `false`, in which case functions are not serializable and passing one throws an error, as before.
591+
When set to `true`, functions passed inside [`param: arg`] are exposed in the page and can be called from the page function. Calling one returns a [Promise] of its result. Under the hood, each function is exposed via [`method: Page.exposeFunction`], so it is technically accessible from all frames and worlds of the page. Exposed functions are cleared upon the top-level navigation. Defaults to `false`, in which case functions are not serializable and passing one throws an error.
592592

593593
## js-evalonselector-pagefunction
594594
* langs: js

0 commit comments

Comments
 (0)