- Uses the industry standard module loader RequireJS
- Script files can be dynamically downloaded and cached by both the viewer and the browser's cache
- With modules, it's possible to reuse script such as a common control in multiple reports instead of copying and pasting HTML items
- The script is more reusable through parameterization using the
ControlHost#configuration
property and passing in data usingData Stores
- A supported method of accessing IBM data using
Data Stores
instead of being forced to scrape the HTML output - Script files can be edited in your favorite dev tools instead of the HTML Item textbox
- No globals
- No name collisions
- Multiple instances can exist on a page without using
_THIS_
- Code does not accumulate and use more and more memory
- The ability to bring in 3rd party libraries such as D3.
- Easier to debug
- You can debug just your file without the viewer's implementation getting in the way
- The script author can report an error by throwing a
scriptableReportError
and the viewer will display the message
- Script written against the supported interfaces will continue to work between releases
- API will expand from release to release exposing more capabilities
- Sufficient events/notifications are provided for proper synchronization
- Goes beyond the original Prompt API and exposes most controls for scripting
- Enough extensions points provided to seamlessly implement an alternative prompt control
- All controls can be accessed by name in addition to prompt controls
- Simpler to implement collapsible regions