Neutralinojs offers the extensions API to write custom backend code with any programming language, but extensions come with the following drawbacks that affect apps in several scenarios:
- Extensions use a shared WebSocket for communication, so using direct C++ references (i.e., the window handler) is impossible within extensions.
- The developer is responsible for packaging their extension binaries.
- A C++-based extension is not fast as native C++-based code due to the WebSockets-based IPC.
Alternatively, a developer can download the framework C++ code, modify it, and re-compile it. But, the developer may face issues while synching upstream code modifications. So, Neutralinojs offers a separate namespace, a function template, inbuilt helper functions (i.e., to get the window handler, validation, etc.), and a developer guide to add custom APIs to the Neutralinojs framework without updating the framework core.
Returns all custom methods added by the app developer.
A string array of all custom method identifiers.
This method returns the sum of two numbers for demonstration purposes of custom methods.
num1Number: The first number for the summation process.
num2Number: The second number for the summation process.
addExtraFiveBoolean: Adds extra five to the numerical result.
addExtraTenBoolean: Adds extra ten to the numerical result.
The sum of input numerical parameters with extra value additions based on options.
add method implementation and learn how to capture, validate, and process parameters in C++.
For compiling your Neutralinojs fork, you can use the existing
GitHub Actions workflows.