Gtk.Widget.prototype.grab_default

function grab_default():void {
    // Gjs wrapper for gtk_widget_grab_default()
}

Causes widget to become the default widget. widget must be able to be a default widget; typically you would ensure this yourself by calling Gtk.set_can_default with a true value. The default widget is activated when the user presses Enter in a window. Default widgets must be activatable, that is, Gtk.Widget.prototype.activate should affect them. Note that Gtk.Entry widgets require the "activates-default" property set to true before they activate the default widget when Enter is pressed and the Gtk.Entry is focused.