EvalJavaScriptWithArguments

Typehandler
DictionaryLCB
LibraryLiveCode Builder
Syntax
EvalJavaScriptWithArguments(<pScript>,<pArgs>)
Associationscom.livecode.emscripten
Summary

Evaluate JavaScript code within the browser with arguments

Parameters
NameTypeDescription
pScript

The script to evaluate

pArgs

The list of arguments to pass to the script

Example
variable mButton as JSObject

public handler SetButtonText(in pText as String)
	EvalJavaScriptWithArguments("arguments[0].innerHTML = arguments[1]", [mButton, pText])
end handler
Values
NameTypeDescription
return

A value of any type

Description

Use EvalJavaScriptWithArguments to get the result of running a block of JavaScript code, where you need to pass values to the script.