Skip to main content

JavaScript/TypeScript SDK Overview

Openexus provides an SDK that acts as a bridge between Openexus and your code. It gives you access to nodes, instances, properties, and more—essentially, everything within Openexus is accessible through the SDK.

Context​

The SDK is exposed as the context global variable in your code. You can use this context object for a variety of purposes such as adding an instance of a node, accessing properties on the node, getting notified when something changes in Openexus, or execute an action.

src/main.js
// read the value of a property
context.get('foo');

// set the value of a property
context.set('foo', 'bar'); // set foo === bar

// get notified when something changes
context.subscribe('foo', (value,key) => {
//... do something magical ...
});

// etc...

There are a lot of things you can do, so please read the documentation below to find out more about context and how to access specific things.