diff --git a/js/x11/core/examples/smoketest/atoms.js b/js/x11/core/examples/smoketest/atoms.js new file mode 100644 index 0000000..d8a77c8 --- /dev/null +++ b/js/x11/core/examples/smoketest/atoms.js @@ -0,0 +1,11 @@ +var x11 = require('../../lib'); +x11.createClient(function(err, display) { + var X = display.client; + var hello = 'Hello, node.js'; + X.InternAtom(false, hello, function(err, atomId) { + X.GetAtomName(atomId, function(err, str) { + console.log('Value for atom ' + atomId + ' is \"' + str + '\"'); + X.terminate(); + }); + }); +});