Add a commented javascript example "Frontend extension" similar to custom_nodes/example_node.py.example
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 155
Description
The example custom node custom_nodes/example_node.py.example is heavily commented, and gives a general idea on how to create a custom node. There is also a directory script_examples with examples for clients to use the API. These are very helpful.
The file example_node.py.example contains a comment block that reads:
```
# Set the web directory, any .js file in that directory will be loaded by the frontend as a frontend extension
# WEB_DIRECTORY = "./somejs"
```
But there isn't a javascript file that provides an example frontend extension, or that provides an explanation of how loaded javascript works with a custom node.
It would be great if there was a heavily commented javascript example "Frontend extension" that explains:
- How javascript is executed by nodes
- The general lifecycle/flow of control
- How functions might be hooked, overloaded, or replaced
- The use of important fields like node.imgs
Contributor guide
Assessment
This issue has not been assessed yet.