breach / thrust

Chromium-based cross-platform / cross-language application framework
MIT License
2.77k stars 121 forks source link

nodejs example not working? #267

Closed mrohnstock closed 9 years ago

mrohnstock commented 9 years ago

OS: Ubuntu 14.10 x86_64 nodejs: nodejs 0.12.0 or iojs 1.3.0 node-thrust: v0.7.6-rc.1

The example in README.md for nodejs

require('node-thrust')(function(err, api) { 
  api.window({ root_url: 'https://breach.cc' }).show();
});

starts thrust, but won't display the requested url (just a blank site). Also adding some flags (for example set_kiosk) to window won't get executed:

require('node-thrust')(function(err, api) { 
  api.window({ root_url: 'https://breach.cc', set_kiosk: true }).show();
});

Am I missing something? Thanks :)

hoytech commented 9 years ago

breach.cc doesn't seem to be listening on the https port (it hangs in a normal browser too). Try a different URL.

mrohnstock commented 9 years ago

Thanks @hoytech using a different url works :). set_kiosk still won't get executed.

hoytech commented 9 years ago

Some things like dev tools and kiosk mode will only work after the window has already been shown so you need to do it in this order:

require('node-thrust')(function(err, api) {
  var w = api.window({ root_url: 'http://google.ca' });
  w.show();
  w.set_kiosk(true);
});
mrohnstock commented 9 years ago

Thanks so much :) - works.