Gio.Menu.prototype.insert_submenu

function insert_submenu(position: Number(gint), label: String, submenu: Gio.MenuModel): void {
    // Gjs wrapper for g_menu_insert_submenu()
}
  

Convenience function for inserting a submenu menu item into menu. Combine Gio.MenuItem.new_submenu and Gio.Menu.prototype.insert_item for a more flexible alternative.

Since 2.32

position

the position at which to insert the item

label

the section label, or null

submenu

a Gio.MenuModel with the items of the submenu