Gtk.Container.prototype.add

function add(widget:Gtk.Widget):void {
    // Gjs wrapper for gtk_container_add()
}

Adds widget to container. Typically used for simple containers such as Gtk.Window, Gtk.Frame, or Gtk.Button; for more complicated layout containers such as Gtk.Box or Gtk.Grid, this function will pick default packing parameters that may not be correct. So consider functions such as Gtk.Box.prototype.pack_start and Gtk.attach as an alternative to Gtk.Container.prototype.add in those cases. A widget may be added to only one container at a time; you can't place the same widget inside two different containers.

widget

a widget to be placed inside container