An iContext object is provided by the framework to a widget. It provides a set of services to a BTT widget so that the widget can interact with framework and elements on other pages. The iContext is implemented in the base class of JavaScript class. And the APIs provided by iContext follows the design of the BTT widget.
<iw:content mode="view"> <![CDATA[ <button onclick="iContext.iScope(event).onClickButton()"> click me</button> ]]>; </iw:content> //onClickButton() is a javascript method defined in widget.
this.onLoad = function() { this.rootFrame = this.iContext.getElementById('rootFrame'); this.rootFrame.src = this.iContext.getiWidgetAttributes().items.url.value; }