Gtk.ProgressBar.prototype.get_text

function get_text():String {
    // Gjs wrapper for gtk_progress_bar_get_text()
}

Retrieves the text displayed superimposed on the progress bar, if any, otherwise null. The return value is a reference to the text, not a copy of it, so will become invalid if you change the text in the progress bar.

Returns

text, or null; this string is owned by the widget and should not be modified or freed.