In order to best accommodate the ever-growing list of data formats, viewers, and editors, Occam allows for interactive widgets to be developed that can directly interact with that data within the browser. This is done, currently, through a JavaScript API that any developer can target. Throughout this document, the motivations, use, and a tutorial will guide you through developing your own widget.
You can wrap and then use existing JavaScript widgets as they are as just a simple HTML page. However, there are a few reasons to go through the small effort of adding the appropriate API calls. For instance,
There are two different categories of widgets: viewers and editors. When you view an Object or open a file within that Object, it will use the viewer you have associated with that type of Object. Here are a few examples showcasing the different aspects of widgets.
To Be Described: API between widget and web client.
window.postMessage(message, '*');
window.addEventListener('message', (event) => {
switch(event.data.name) {
case 'updateStatus':
break;
}
});
To Be Described: A tutorial and template to make widgets and visualizations.