// Select a snippet of code, then click the "Eval" button.
// This will run the connected devices/browsers.
// Compute a value, the return value is shown in the
// result panel.
1 + 2
// Send log message from connected devices/browsers.
// Use this in your code for debugging.
hyper.log('Hello World')
// Replace the browser content with the given HTML.
document.body.innerHTML = '
Hello World
'
// Now try this.
counter = 1
display = function() {
document.body.innerHTML =
'Counter: ' + counter + '
'
++counter
}
timer = setInterval(function() { display() }, 500)
// Then stop the timer.
clearInterval(timer)
// Start the timer again, by evaluating the code above.
// Then change the value of counter, while the timer
// is running. Also change the function display while
// the timer is running.
// Have fun!
// This is the message area where log messages and errors
// are displayed.
//
// Select one or more lines of code in the code area above.
// Then press "Eval Selection" to evaluate (run the code)
// on connected devices.
//
// "Node Eval" is special, it evaluates selected code in
// node-webkit, the platform on which this software is running.
// With this button, you can interactively develop and test
// node.js servers and functions in node-webkit. This is a
// very powerful feature.