Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

JavaScript.Available

Checks whether the JavaScriptCore library is loaded.

Component Version macOS Windows Linux Server iOS SDK
JavaScriptWebKit 13.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "JavaScript.Available" )

Parameters

none

Result

Returns 1, 0 or error.

Description

Checks whether the JavaScriptCore library is loaded.
Always loaded on macOS since we use the one coming with macOS.

For Windows you can load JavaScriptCore.dll and for Linux you can load the JavaScriptCore.so file with JavaScript.LoadLibrary function.

Returns always 1 on macOS and iOS.

Examples

Check status:

If [ MBS( "JavaScript.Available" ) = 1 ]
    Show Custom Dialog [ "JavaScript library loaded." ]
Else
    # on Windows and Linux, you must load it via script
    Show Custom Dialog [ "JavaScript library not loaded." ]
End If

See also

Release notes

Blog Entries

This function is free to use.

Created 25th January 2023, last changed 7th May 2023


Java.SetStaticField - JavaScript.CF

💬 Ask a question or report a problem