Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 8.5   9.0   9.1   9.2   9.3   9.4   9.5   10.0   10.1   10.2    Statistic  

JS.New

Creates a new JavaScript engine instance.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
JavaScript 10.0 Yes Yes Yes Yes Yes
MBS( "JS.New" )   More

Parameters

none

Result

Returns JS reference number or error.

Description

Creates a new JavaScript engine instance.
This object contains all the functions and properties you defined.
Please release the object later with the JS.Free function.

Your own JavaScript engine is useful for:
  • Running some snippet of JavaScript code without web viewer.
  • Using various JavaScript libraries
  • Providing a scripting language to your own solution.
  • Doing JavaScript on server side.
  • Working with JSON data
  • Enjoy using regular expressions, unicode text functions, number parsing and formatting with no platform dependencies

Examples

Evaluate a bit of JavaScript:

Set Variable [ $js ; Value: MBS( "JS.New" ) ]
Set Variable [ $r ; Value: MBS( "JS.Evaluate"; $js; "4+5") ]
Show Custom Dialog [ "Result" ; $r ]
Set Variable [ $r ; Value: MBS( "JS.Free"; $JS ) ]

See also

Example Databases

Blog Entries

Created 7th December 2019, last changed 9th December 2019


JS.GetGlobalPropertyValue   -   JS.Now

Feedback: Report problem or ask question.




Links
MBS FileMaker Plugins