Class: HTMLWidget

parasql.widget.HTMLWidget

The HTMLWidget class allows you to reserve a section of screen real estate for use by your custom code.
License:
  • https://www.parasql.com/about/license.jsp
Fires:
  • parasql.Event#event:render When the HTML Widget is ready to have its contents rendered.

Extends

Methods

addEventListener(type, listener)

Adds an event listener to this widget. This can also be done via the Events... option on the tool bar.
Parameters:
Name Type Description
type string A valid event type.
listener string A string containing either the name of a JavaScript function to call, an inline function to be called, or code that resolves to an object which implements a handleEvent(event) method.
Inherited From:
See:
Examples
// add an inline function as an event listener 
parasql.app.getWidgetById('ID1007').addEventListener('render','function (event) { event.target.getContentDiv().innerHTML = "Inline Hello World"; }');
// add a function call as an event listener
parasql.app.getWidgetById('ID1008').addEventListener('render','renderHelloWidget');
// add an object as an event listener; the object must implement handleEvent(event)
document.myClass = new MyClass();
parasql.app.getWidgetById('ID1009').addEventListener('render','document.myClass');

getContentDiv() → {HTMLDivElement}

Typically your code will call this method after it receives a render event.
Returns:
The div element currently in use by this HTMLWidget; the value returned will change with each rendering. Your code can use this as the root element into which you render additional elements.
Type
HTMLDivElement

getWidgetId() → (non-null) {string}

Inherited From:
Returns:
Returns an immutable string that uniquely identifies this widget.
Type
string

redisplay()

Redisplays this widget.
Inherited From: