runJsFunction: Difference between revisions

From RPTools Wiki
Jump to navigation Jump to search
(Created page with "{{stub}} {{Experimental}} {{MacroFunction |name=runJSfunction |description= Runs a JavaScript function which is defined in a frame5, dialog5, or overlay. |usage= <source lang...")
 
(Minor update to parameters.)
Line 13: Line 13:
'''Parameter'''
'''Parameter'''
{{param|name |Name of an active frame, dialog, or overlay.}}
{{param|name |Name of an active frame, dialog, or overlay.}}
{{param|type|Either "frame", "dialog", or "overlay".}}
{{param|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.}}
{{param|thisArg|Value of "this" provided to the function.}}
{{param|thisArg|Value of "this" provided to the function. Should be "null" or the name of a variable already defined in the script.}}
{{param|argsArray|JSON array specifying the arguments with which the JavaScript function should be called.}}
{{param|argsArray|JSON array specifying the arguments with which the JavaScript function should be called.}}



Revision as of 07:28, 3 May 2021

 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.