Gio.MenuItem.prototype.set_submenu

function set_submenu(submenu: Gio.MenuModel): void {
    // Gjs wrapper for g_menu_item_set_submenu()
}
  

Sets or unsets the "submenu" link of menu_item to submenu.

If submenu is non-null, it is linked to. If it is null then the link is unset.

The effect of having one menu appear as a submenu of another is exactly as it sounds.

Since 2.32

submenu

a Gio.MenuModel, or null