Skip to content

Instantly share code, notes, and snippets.

@jonnor
Created April 13, 2015 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonnor/f90df864e70faae31f7a to your computer and use it in GitHub Desktop.
Save jonnor/f90df864e70faae31f7a to your computer and use it in GitHub Desktop.
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