View a comprehensive history of all the new Javascript scripting feature updates and changes Construct 3 since the first release.
Script blocks in event sheets can now be disabled
Fix custom instance classes not always being immediately instantiated (regression since r154)
Fix runtime mouse events not firing (regression since r155)
Disabled language specific identation in text editors - prevents unneeded indentation in JS when following the style of having the opening brace on a new line
Referencing an undefined variable in a script is now assumed to be an external variable, and is considered to be defined in the global scope by the autocomplete system
New script interfaces for Array, Button, Dictionary, Sprite, SpriteFont, Text, Text Input, Tiled Background and Tilemap
Added "deviceorientation" and "devicemotion" events, and Touch script interface for requesting orientation/motion permission
Add runtime.invokeDownload() method
Fix incorrect error using 'await' in event sheet script blocks
Both 'runtime' and 'localVars' are now recognised by the script analyser in event sheet script blocks
Autocomplete could be triggered by the up and down arrow keys, interrupting document navigation
New scripting examples 'Simple alert', 'Simple keyboard movement', 'Local storage' and 'Integrating events with script'
Autocomplete of variables and properties
Added runtime.assets.loadStyleSheet() method
Add option to create new JavaScript file in 'Files' folder (useful with loadScripts)
Added option to the Settings dialog to allow the font size to be changed for all text editor and inline script blocks
Runtime now fires pointer events for both mouse and touch input
Script interface for Binary Data plugin
Code editor now focused after adding a script
Possible crash calling event functions from script
Importing scripts could cause preview to fail
Added runtime.storage APIs (accesses same storage as Local Storage plugin)
Possible incorrect "never modified" warning when the only modifications were unary increment/decrement operators
Possible incorrect "cannot access before initialization" warning when accessing variables of a higher scope from a function
Incorrect scoping of "var" declarations in warning analysis
Warnings that highlight class or function declarations will now highlight the identifier instead of the whole declaration
New warning if declaring a "function" or "var" with the same name as another in the current scope
Asset APIs to load external scripts & WebAssembly modules
New 'Loading external script & WebAssembly' example
Access global variables in event sheets via runtime.globalVars
Access local variables in event sheets via localVars in script actions/blocks
runtime.setReturnValue() function to make it easier to return script values from event functions
Script interfaces for layouts and layers
Editor now validates JavaScript code in your project before preview or export, prompting you to fix syntax errors
Debugger CPU profiler now separately measures time spent in scripts
Added warnings for unused variables, use-before-initalise and assigning to constants
Lots of new APIs to use in scripts
New example category 'Scripting' on Start Page, with 'Ghost shooter code' and 'Audio scripting' examples (more to come)
Full code editor now used for editing code in event sheets
Syntax highlighting for code in event sheets
Error highlighting when editing code in event sheets or files
Updated default script file template, and is now only used for first script
Script files now run after the engine instead of before
Exporting projects using script files now works