An iContext object is provided by the framework to a widget. It provides a set of service to a BTT widget to interact with framework and elements on other pages. The iContext will be implemented in the base class of JavaScriptâ„¢ class. And the APIs provided by iContext will follow 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; }