Navigating Vuforia Studio > Project Pane > Views > Using JavaScript in Vuforia Studio
Using JavaScript in Vuforia Studio
Including custom JavaScript in your Experiences can introduce security risks. Do not preview or publish projects that contain scripts from untrusted sources, and when writing custom JavaScript, be sure to follow secure coding practices and testing. As an example, see the AJAX Security Cheat Sheet.
The JavaScript editor allows you to use your own code within the application view as the body of the AngularJS controller for the view. Therefore, it has access to a few objects that are implicitly available, such as the $scope. This allows functions and properties, like button click events, to be exposed for the widgets to use. To access the editor, click Home.js under the VIEWS section.
To try out a few JavaScript examples, check out the following tutorials:
Invoke Functions from a Button Using JavaScript
Use a Timer in JavaScript
Show and Hide a Spinner Using JavaScript
Invoke a Function Using a Gesture in a 3D Eyewear Experience