Gio.MenuItem.prototype.set_section

function set_section(section: Gio.MenuModel): void {
    // Gjs wrapper for g_menu_item_set_section()
}
  

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

The effect of having one menu appear as a section of another is exactly as it sounds: the items from section become a direct part of the menu that menu_item is added to. See Gio.MenuItem.new_section for more information about what it means for a menu item to be a section.

Since 2.32

section

a Gio.MenuModel, or null