2 FSI Viewer JS
81
NeptuneLabs - FSI Viewer
2.8.2 Callbacks
You can define callback functions by assigning methods to the FSI Viewer JS
instance.
Using Callbacks
Method A – Create a function in window scope
Example:
<script>
function onFSIViewerViewChanged(strView){
console.log(strView);
}
<script>
a) assignment in Custom Tag:
Example:
<fsi-viewer onViewChanged=”onFSIViewerViewChanged” […]/>
or
b) assignment in XML configuration file:
Example:
<fsi_parameter>
<onViewChanged value=”onFSIViewerViewChanged”/>
[…]
</fsi_parameter>
Method B - Assignment by parameter