SoftwareShield provides javascript API for the HTML-based UI pages by the following files:
The core SDK file provides the following APIs:
The latest gs5.js and its minified version can be downloaded from the following URLs:
UI_HTML\js\ GS_Mapping.js
The IDE auto-generated file contains definations of:
UI_HTML\js\shield.js
It is based on gs5.js and provides the following APIs:
The latest shield.js and its minified version can be downloaded from the following URLs:
To use the SDK api in a HTML page, please add the following lines to your HTML source:
<script type="text/javascript" language="javascript" src="js/gs5.js" />
To enable UI debugging, you must explicitly turn on the feature as following:
IDE main menu => Edit => UI Options:
If you want to edit UI files during debugging, you must disable the "Wrap UI Pages" option; Normally if UI pages are not wrapped, for security reason the Integrity Protection is automatically turned on to make sure the UI files are not modified by users, however, if the "Enable UI Debug" option is turned on, the Integrity Protection is turned off so that you can edit these UI files in wrapped app during UI debugging.
Once the UI debugging is enabled, there are several facilities to help your debug task:
When app launching, right click mouse will pop-up a context menu with Inspector menu item:
The inspector windows allow you to do most HTML / Javascript debugging:
Output debug message at run-time:
console.log('hello world!');
The message is displayed in the console of Inspector.
On Windows platform, you can also use the DebugView Utility:
Note that the message is not dumpped to debug log file, to log debug message please refer to Output Debug Message.
You can setup environment variable GS_UI_TESTJS to point to a javascript file, which will be loaded automatically and executed upon HTML page loading.