이 콘텐츠는 선택한 언어로 제공되지 않습니다.
31.5. Script Parameters
In addition to the standard bindings, a script may have a set of named parameters passed in which also appear as bindings. Parameters are passed in as a map of name, value pairs where the name is a string, and the value is any value understood by the marshaller in use.
Consider the following script which takes two parameters,
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
multiplicand
and multiplier
:
// mode=local,language=javascript // parameters=[multiplicand,multiplier] multiplicand * multiplier
// mode=local,language=javascript
// parameters=[multiplicand,multiplier]
multiplicand * multiplier
As the last operation is an evaluation its result will be returned to the script invoker. Passing in values changes depending on how the script is executed, and will be covered under each execution method.