Gtk.Entry.prototype.set_visibility

function set_visibility(visible:Boolean):void {
    // Gjs wrapper for gtk_entry_set_visibility()
}

Sets whether the contents of the entry are visible or not. When visibility is set to false, characters are displayed as the invisible char, and will also appear that way when the text in the entry widget is copied elsewhere.

By default, GTK+ picks the best invisible character available in the current font, but it can be changed with Gtk.Entry.prototype.set_invisible_char.

Note that you probably want to set Gtk.input-purpose to Gtk.InputPurpose.password or Gtk.InputPurpose.pin to inform input methods about the purpose of this entry, in addition to setting visibility to false.

visible

true if the contents of the entry are displayed as plaintext