JavaScript.Available
--------------------

Checks whether the JavaScriptCore library is loaded.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [JavaScriptWebKit](component_JavaScriptWebKit.md) | [13.1](newinversion131.md) | ✅ 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](JavaScriptLoadLibrary.md) 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

- [JavaScript.LoadLibrary](JavaScriptLoadLibrary.md)
- [Plugin.RegisterFunction](PluginRegisterFunction.md)
- [Plugin.RegisterScriptStep](PluginRegisterScriptStep.md)

### Release notes

- **Version 13.2**
    - Fixed [JavaScript.Available](https://www.mbsplugins.eu/JavaScriptAvailable.shtml) to return 1 on macOS and iOS, broken in 13.1.
- **Version 13.1**
    - Added [JavaScript.LoadLibrary](https://www.mbsplugins.eu/JavaScriptLoadLibrary.shtml) and [JavaScript.Available](https://www.mbsplugins.eu/JavaScriptAvailable.shtml) functions.

### Blog Entries

- [MBS FileMaker Plugin, version 13.2pr1](https://www.mbsplugins.de/archive/2023-04-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [New in MBS FileMaker Plugin 13.1](https://www.mbsplugins.de/archive/2023-03-15/New_in_MBS_FileMaker_Plugin_13/monkeybreadsoftware_blog_filemaker)
- [Using JavaScript with WebKit on FileMaker Server on Linux](https://www.mbsplugins.de/archive/2023-03-05/Using_JavaScript_with_WebKit_o/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 13.1pr1](https://www.mbsplugins.de/archive/2023-02-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function is free to use.

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

  
[Java.SetTag](JavaSetTag.md) - [JavaScript.CF](JavaScriptCF.md)

[HTML Version](JavaScriptAvailable.shtml)