Gtk.WidgetPath.prototype.has_parent

function has_parent(type:GType):Boolean {
    // Gjs wrapper for gtk_widget_path_has_parent()
}

Returns true if any of the parents of the widget represented in path is of type type, or any subtype of it.

Since 3.0

type

widget type to check in parents

Returns

true if any parent is of type type