Class: WAT

WAT

Provides methods and properties for loading plugins and querying versions. Accessible using the keyword '$wat'.


Example
console.log('WAT version is ' + $wat.version.str);

Members


<readonly> plugins :wat.Plugins

Gets the plugin object that can be used to query information about the available plugins

Type:

<readonly> version :wat.Version

Gets the version of WAT

Type:

Methods


load(name)

Loads a plugin

Parameters:
Name Type Description
name string

The name of the plugin to load.

Returns:
  • List of objects created by the plugin that are used to interact with the plugin. The objects returned are defined by the plugin.
Type
Array.<object>
Example
// load a plugin for the hardware on the device
// the hw plugins only return a single object
var hw = $wat.load('hw')[0];
// if the plugin failed to load, this will cause an exception since hw would be undefined
console.log('Running on HW of type ' + hw.type);