| FoxitPDFSDKforWeb v11.0.6 Archives Foxit PDF SDK for Web

Public Member Functions | List of all members
JavaScriptAction Class Reference
PDF » actions

JavaScript action object. More...

Inheritance diagram for JavaScriptAction:

## Public Member Functions
| getScript ()
| Get JavaScript script. More...
| setScript (script)
| Set JavaScript script. More...
Public Member Functions inherited from Action
| getSubAction (index)
| Get a sub-action by index. More...
| getSubActionCount ()
| Get the count of sub-actions. More...
| getType ()
| Get action type. More...
| insertSubAction (index, action)
| Insert a new sub-action to the location specified by index. More...
| removeAllSubActions ()
| Remove all the sub-actions. More...
| removeSubAction (index)
| Remove a sub-action, specified by index. More...
| setSubAction (index, action)
| Set a sub-action by index. More...

## Detailed Description

JavaScript action object.

Deprecated:
  Action related APIs have been moved under each object.

See also
  Annot
  Widget
  PDFFormField
  PDFDoc

## Member Function Documentation

## ◆ getScript()

JavaScriptAction::getScript | ( |  | ) |
| inline

Get JavaScript script.

Returns
  string - JavaScript script.

## ◆ setScript()

JavaScriptAction::setScript | ( |  | script | ) |
| inline

Set JavaScript script.

Parameters

  script | string - A JavaScript script to be set. It should not be an empty string.

Returns
  Promise<object> - An action object.

@2025 Foxit Software Incorporated. All rights reserved.