Gtk.ComboBoxText.prototype.get_active_text

function get_active_text():String {
    // Gjs wrapper for gtk_combo_box_text_get_active_text()
}

Returns the currently active string in combo_box, or null if none is selected. If combo_box contains an entry, this function will return its contents (which will not necessarily be an item from the list).

Since 2.24

Returns

a newly allocated string containing the currently active text. Must be freed with GLib.free.