JS9 Plugins: browser-based analysis using JS9 plugins

You can add browser-based analysis to a JS9 webpage by writing a JS9 Plugin module, consisting of a constructor function that gets called for each div of the plugin class, and one or more event callbacks to process the desired events. A plugin is registered using the JS9.RegisterPlugin() public routine. See plugins/plugintest.js for the example plugin code.

If the webpage does not contain a div for this plugin class, the plugin will be added to one of the menus (depending on the value of the viewMenu property passed in the registration routine). In the examples below, the first instance of JS9 defines its own static divs for pluginTest. The second instance of JS9 uses the View menu to bring up pluginTest in a light window.

An example of a plugin div element already defined on the webpage to hold the Plugin messages. Load an image, then move the mouse, or create and manipulate a region, or press a key to see callbacks fire in the blue display region:

Here, no static plugin div element has been defined on the webpage. Instead, it can be displayed from the View menu as a light window. Load an image and choose View->pluginTest, then move the mouse, or create and manipulate a region, or press a key to see callbacks fire in the light window.

JS9 Demos:

web page configuration: multiple displays: plugins: colors: data analysis: FITS support: not often needed: