Difference between revisions of "JavaScript"
From Roll20 Wiki
Andreas J. (Talk | contribs) m |
Andreas J. (Talk | contribs) m |
||
Line 4: | Line 4: | ||
::'''1.''' [[Character Sheets]]: When editing or creating [[BCS|custom character sheets]], JavaScript can be used in [[Sheetworkers|sheetworkers]] for creating more advanced backend features. | ::'''1.''' [[Character Sheets]]: When editing or creating [[BCS|custom character sheets]], JavaScript can be used in [[Sheetworkers|sheetworkers]] for creating more advanced backend features. | ||
::::* [[Sheetworkers#JavaScript_Restrictions|Sheetworkers - JavaScript Restrictions]] | ::::* [[Sheetworkers#JavaScript_Restrictions|Sheetworkers - JavaScript Restrictions]] | ||
− | ::'''2.''' [[ | + | ::'''2.''' [[Mod|Mod Scripts]]: When editing or creating [[Mod|Mod Scripts]]. |
::::* The Roll20 API functions by running a special server-side virtual machine for each campaign. This provides an [[API:Sandbox_Model|API sandbox]] where your custom scripts can run without any danger of them affecting other user's campaigns. | ::::* The Roll20 API functions by running a special server-side virtual machine for each campaign. This provides an [[API:Sandbox_Model|API sandbox]] where your custom scripts can run without any danger of them affecting other user's campaigns. | ||
__NOTOC__ | __NOTOC__ | ||
Line 11: | Line 11: | ||
===JS Libraries=== | ===JS Libraries=== | ||
Some JavaScript libraries are made available to use with Roll20: | Some JavaScript libraries are made available to use with Roll20: | ||
− | * [[jQuery]] limited use by calling {{c|$20}} | + | * [[jQuery]] - limited use by calling {{c|$20}} |
* [http://underscorejs.org/ Underscore.js] | * [http://underscorejs.org/ Underscore.js] | ||
===Version=== | ===Version=== |
Latest revision as of 08:59, 9 June 2024
Page Updated: 2024-06-09 |
Disambiguation page for "JavaScript" |
This page is about a Roll20 feature exclusive to Pro-subscribers (and often to players in a Game created by a Pro-subscriber). If you'd like to use this feature, consider upgrading your account. |
Pro
info subscription to access:
- 1. Character Sheets: When editing or creating custom character sheets, JavaScript can be used in sheetworkers for creating more advanced backend features.
- 2. Mod Scripts: When editing or creating Mod Scripts.
- The Roll20 API functions by running a special server-side virtual machine for each campaign. This provides an API sandbox where your custom scripts can run without any danger of them affecting other user's campaigns.
See Also: Javascript:Best Practices
[edit] JS Libraries
Some JavaScript libraries are made available to use with Roll20:
- jQuery - limited use by calling
$20
- Underscore.js
[edit] Version
Versions used in Roll20, such as the API Sandbox, and Character Sheet's sheetworkers.
[edit] js
Should be at least ES2018, node.green shows ECMAScript versions & features for each node version.
[edit] Node
Roll20's sheetworkers & API runs on Node v12.16.3
. (As of 2021-05-17, source: The Aaron).