# Call JavaScript Function

## Overview

![The Call JavaScript Function Node.](https://2561100106-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ff6JZovzOqBctA4C1o76u%2Fuploads%2Fgit-blob-bb0cb819c855f87c4abda21007e3c9a1b777af3c%2Fcalljavascriptfunctionnodeupdatedimage.png?alt=media)

The **Call JavaScript Function** **Node** executes a JavaScript function that is defined in a **Web Sprite** **Object**, which has to be given to the **Node** as its **Object** **Attribute**.

[**Scope**](https://docs.incari.com/incari-studio/2023.2/overview#scopes): **Scene**.

## Attributes

![The Call JavaScript Function Node Attributes.](https://2561100106-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ff6JZovzOqBctA4C1o76u%2Fuploads%2Fgit-blob-b2fbe5be5f6bb1be1fc2cc8bbbfe874633301fb6%2Fjavascriptcallbackfuncattsupdatedimage.png?alt=media)

### Function

| Attribute          | Type       | Description                                                                                    |
| ------------------ | ---------- | ---------------------------------------------------------------------------------------------- |
| `JS Function Name` | **String** | Name of the function to be executed, if none is given in the `Function name` **Input Socket**. |

### Inputs

| Attribute        | Type          | Description                                                                      |
| ---------------- | ------------- | -------------------------------------------------------------------------------- |
| `Parameters [n]` | **Drop-down** | Label, **Data Type**, and default value of the parameters given to the function. |

## Inputs

| Input             | Type                                                               | Description                                                                            |
| ----------------- | ------------------------------------------------------------------ | -------------------------------------------------------------------------------------- |
| *Pulse Input* (►) | **Pulse**                                                          | A standard **Input Pulse**, to trigger the execution of the **Node**.                  |
| `Object ID`       | **ObjectID**                                                       | **Web Sprite** **Object** that contains the definition of the function to be executed. |
| `Function name`   | **String**                                                         | Name of the function to be executed.                                                   |
| `Parameter [n]`   | *Defined in the **Data Type** of the `Parameters`* ***Attribute*** | Value of the corresponding parameter.                                                  |

## Outputs

| Output             | Type      | Description                                                                                                                            |
| ------------------ | --------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| *Pulse Output* (►) | **Pulse** | A standard **Output Pulse**, to move onto the next **Node** along the **Logic Branch**, once this **Node** has finished its execution. |
| `OnLoaded`         | **Pulse** | Flows to additional actions when the **Web Sprite** **Object** has finished loading.                                                   |

## See Also

* [**On JavaScript Callback**](https://docs.incari.com/incari-studio/2023.2/toolbox/events/web/on-javascript-callback)
