<html><body>
<script >
var gui = require('nw.gui');
var win = gui.Window.get();
var ocean = gui.Window.open('http://en.wikipedia.org/wiki/Oceania');
ocean.on('loaded', function() {
var header = ocean.document.getElementById("bodyContent").getElementsByTagName("h2")[0].textContent;
console.log(header);
});
</script>
</body></html>
{
"name": "nw-demo",
"main": "index.html",
"webkit": {
"plugin": true
}
}