runJsFunction

From RPTools Wiki
Revision as of 07:28, 3 May 2021 by Melek (talk | contribs) (Minor update to parameters.)
Jump to navigation Jump to search

 This article is a stub, you can help the RPTools Wiki project by contributing content to expand this article.

 This article describes a feature or macro function that is experimental and may be subject to change.

runJSfunction() Function

Runs a JavaScript function which is defined in a frame5, dialog5, or overlay.

Usage

runJSfunction(name, type, func, thisArg, argsArray)

Parameter

  • name - Name of an active frame, dialog, or overlay.
  • type - Either "frame", "dialog", or "overlay". This is needed because a frame, a dialog and an overlay could all share the same name, in which case it not clear which component is the target.
  • thisArg - Value of "this" provided to the function. Should be "null" or the name of a variable already defined in the script.
  • argsArray - JSON array specifying the arguments with which the JavaScript function should be called.