Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
custom-backed-runtime
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script src="./noflo-noflo-runtime-iframe/runtime/network.js"></script>
</head>
<body>
<script>
var iframeRuntime = window.NofloIframeRuntime; //require('noflo-runtime-iframe');
var runtimeOptions = {
baseDir: 'mything'
};
var rt = iframeRuntime(runtimeOptions);
rt.component.listComponents = function () {
// Respond with components from the DB
}
// On graph changes, store it in our database
rt.graph.on('addedge', function () {
storeMeCustom(arguments);
});
rt.graph.on('removeedge', function() {
storeMeCustom(arguments);
});
..... rest of the change handlers ....
rt.start();
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment