diff --git a/docs/sources/next/javascript-api/k6-experimental/browser/jshandle/_index.md b/docs/sources/next/javascript-api/k6-experimental/browser/jshandle/_index.md index faefcfe52f..b8684ef6b1 100644 --- a/docs/sources/next/javascript-api/k6-experimental/browser/jshandle/_index.md +++ b/docs/sources/next/javascript-api/k6-experimental/browser/jshandle/_index.md @@ -7,7 +7,7 @@ weight: 06 # JSHandle -JSHandle represents an in-page JavaScript object. +Represents a reference to a JavaScript object within the context of a webpage. This allows you to interact with JavaScript objects directly from your script. {{< docs/shared source="k6" lookup="browser-module-wip.md" version="" >}} diff --git a/docs/sources/next/javascript-api/k6-experimental/browser/jshandle/aselement.md b/docs/sources/next/javascript-api/k6-experimental/browser/jshandle/aselement.md index f52e1f6412..2fdd204af9 100644 --- a/docs/sources/next/javascript-api/k6-experimental/browser/jshandle/aselement.md +++ b/docs/sources/next/javascript-api/k6-experimental/browser/jshandle/aselement.md @@ -5,7 +5,7 @@ description: 'Browser module: JSHandle.asElement method' # asElement() -Returns either `null` or the object handle itself, if the object handle is an instance of [ElementHandle](https://grafana.com/docs/k6//javascript-api/k6-experimental/browser/elementhandle/). +Returns either `null` or the object handle itself, provided the object handle is an instance of [ElementHandle](https://grafana.com/docs/k6//javascript-api/k6-experimental/browser/elementhandle/). ### Returns diff --git a/docs/sources/next/javascript-api/k6-experimental/browser/jshandle/dispose.md b/docs/sources/next/javascript-api/k6-experimental/browser/jshandle/dispose.md index 3dde7edd80..c3095dce18 100644 --- a/docs/sources/next/javascript-api/k6-experimental/browser/jshandle/dispose.md +++ b/docs/sources/next/javascript-api/k6-experimental/browser/jshandle/dispose.md @@ -5,7 +5,7 @@ description: 'Browser module: JSHandle.dispose method' # dispose() -Stops referencing the element handle. +Releases the remote object this references. ### Returns diff --git a/docs/sources/next/javascript-api/k6-experimental/browser/jshandle/evaluate.md b/docs/sources/next/javascript-api/k6-experimental/browser/jshandle/evaluate.md index 476e317daf..9220de50cd 100644 --- a/docs/sources/next/javascript-api/k6-experimental/browser/jshandle/evaluate.md +++ b/docs/sources/next/javascript-api/k6-experimental/browser/jshandle/evaluate.md @@ -5,7 +5,7 @@ description: 'Browser module: JSHandle.evaluate(pageFunction[, arg]) method' # evaluate(pageFunction[, arg]) -Evaluates the `pageFunction` and returns its return value. This method passes this handle as the first argument to the `pageFunction`. +Returns the value of the `pageFunction` invocation. It passes this handle as the first argument to the `pageFunction`. diff --git a/docs/sources/next/javascript-api/k6-experimental/browser/jshandle/evaluatehandle.md b/docs/sources/next/javascript-api/k6-experimental/browser/jshandle/evaluatehandle.md index 0b86524875..0492fc261e 100644 --- a/docs/sources/next/javascript-api/k6-experimental/browser/jshandle/evaluatehandle.md +++ b/docs/sources/next/javascript-api/k6-experimental/browser/jshandle/evaluatehandle.md @@ -5,7 +5,9 @@ description: 'Browser module: JSHandle.evaluateHandle(pageFunction[, arg]) metho # evaluateHandle(pageFunction[, arg]) -Evaluates the `pageFunction` and returns a `JSHandle`. This method passes this handle as the first argument to the `pageFunction`. Unlike [evaluate](https://grafana.com/docs/k6//javascript-api/k6-experimental/browser/jshandle/evaluate/), `evaluateHandle` returns the value as a `JSHandle` +Returns the value of the `pageFunction` invocation as a `JSHandle`. It passes this handle as the first argument to the `pageFunction`. + +The only difference between [evaluate](https://grafana.com/docs/k6//javascript-api/k6-experimental/browser/jshandle/evaluate/) and `evaluateHandle` is that `evaluateHandle` returns [JSHandle](https://grafana.com/docs/k6//javascript-api/k6-experimental/browser/jshandle/). diff --git a/docs/sources/next/javascript-api/k6-experimental/browser/jshandle/getproperties.md b/docs/sources/next/javascript-api/k6-experimental/browser/jshandle/getproperties.md index 433aeb4b82..aff011fdd7 100644 --- a/docs/sources/next/javascript-api/k6-experimental/browser/jshandle/getproperties.md +++ b/docs/sources/next/javascript-api/k6-experimental/browser/jshandle/getproperties.md @@ -5,7 +5,7 @@ description: 'Browser module: JSHandle.getProperties() method' # getProperties() -Fetches a map with own property names of of the `JSHandle` with their values as `JSHandle` instances. +This allows you to inspect and interact with the properties of the object within the page context. ### Returns diff --git a/docs/sources/next/javascript-api/k6-experimental/browser/jshandle/jsonvalue.md b/docs/sources/next/javascript-api/k6-experimental/browser/jshandle/jsonvalue.md index 8422af2d1c..6bb855445b 100644 --- a/docs/sources/next/javascript-api/k6-experimental/browser/jshandle/jsonvalue.md +++ b/docs/sources/next/javascript-api/k6-experimental/browser/jshandle/jsonvalue.md @@ -5,7 +5,7 @@ description: 'Browser module: JSHandle.jsonValue() method' # jsonValue() -Fetches a JSON representation of the object. +Retrieves the JSON representation of the JavaScript object that the JSHandle refers to, making it easy to work with the data outside the browser context. ### Returns