Skip to content

Show devtools with F12 keybind

franck34 edited this page Aug 22, 2012 · 1 revision
var appjs = require('appjs');

appjs.router.get('/', function(request, response){
  response.send(200, 'hello');
});

appjs.createWindow().on('ready', function(){
  this.frame.show();
  this.addEventListener('keydown', function(e){
    if (e.keyIdentifier === 'F12') {
      this.frame.openDevTools();
    }
  });
});