WaJS
From WidgetAvenue Wiki
JS File
Many host platforms do not support the use of the <script src=""> tag so external Javascript will not work properly. Additionally, inline Javascript is restricted by many host platforms. Our API provides a cross platform solution to include Javascript. Once your JS file has been created, its name has to be added to the URL of the widget, using _js parameter. For an example see the Adding Javascript page.
Events
Many host platforms do not support inline events handlers such as onclick or onmouseover, which are placed directly within the HTML code. Our API provides a cross platform solution to attach event handlers to the widget, or nodes inside it. In order to attach an event to a node, use the class attribute ldWidgetJS and define the event handlers using a ldWidgetUid_JS function.
Functions
For security and other reasons, some standard Javascript functions are disabled by host platforms.
| Sandard Javascript | waJS |
| getElementById | ldWidgetUid_getElementsByClassName |
| XMLHttpRequest | ldWidgetUid_ajaxCall |
| innerHTML | ldWidgetUid_setInnerHtml |
The WidgetAvenue API provides a library of functions that replace standard Javascript functions and work across browsers and platforms. Additional functions are provided to access specific features of some platforms, such as geolocation.
- DOM manipulation
- Ajax
- Flash
- Event handlers
- Preferences
- Host
- Social
- Widget
