Gio.MenuItem.prototype.get_attribute_value
function get_attribute_value(attribute: String, expected_type: GLib.VariantType): GLib.Variant { // Gjs wrapper for g_menu_item_get_attribute_value() }
Queries the named attribute on menu_item.
If expected_type is specified and the attribute does not have this type, null is returned. null is also returned if the attribute simply does not exist.
Since 2.34
- attribute
the attribute name to query
- expected_type
the expected type of the attribute
- Returns
the attribute value, or null