/*
* gir-throw.js
*/
const gi = require('node-gir')
const Gtk = gi.Gtk
// main program window
const window = new Gtk.Window({
type : Gtk.WindowType.TOPLEVEL
})
const urlBar = new Gtk.Entry()
urlBar.connect('key-press-event', (...args) => {
throw new Error('test')
})
window.setDefaultSize(100, 30)
window.connect('show', () => {
Gtk.main()
})
window.connect('destroy', () => Gtk.mainQuit())
window.connect('delete-event', () => false)
window.add(urlBar)
window.showAll()
See romgrk/node-gtk#45