Gtk.Widget.prototype.has_default

function has_default():Boolean {
    // Gjs wrapper for gtk_widget_has_default()
}

Determines whether widget is the current default widget within its toplevel. See Gtk.set_can_default.

Since 2.18

Returns

true if widget is the current default widget within its toplevel, false otherwise