Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
JS.InitModules
Installs Duktape module loading.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
JavaScript | 11.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "JS.InitModules"; JSRef ) More
Parameters
Parameter | Description | Example |
---|---|---|
JSRef | The JavaScript reference number. | $js |
Result
Returns OK or error.
Description
Installs Duktape module loading.Only calls JS.InitModules once on a new instance of the JavaScript engine.
Define your own Duktape.modSearch() to provide environment specific module lookups.
After these steps, require() will be registered to the global object and the module system is ready to use.
Examples
Create JavaScript environment and enable modules:
Set Variable [ $$JS ; Value: MBS("JS.New") ]
# enables require() to use Duktape.modSearch
Set Variable [ $r ; Value: MBS( "JS.InitModules"; $$js) ]
See also
Release notes
- Version 11.2
- Added JS.InitModules function.
Example Databases
Blog Entries
- New in MBS FileMaker Plugin 11.2
- Neues MBS FileMaker Plugin 11.2
- MBS FileMaker Plugin 11.2 - More than 6500 Functions In One Plugin
- MBS FileMaker Plugin, version 11.2pr1
This function checks for a license.
Created 24th March 2021, last changed 13th June 2021