Handle.hasSub

Checks whether the element @id exists in the SVG document.

Element IDs should look like an URL fragment identifier; for example, pass "##foo" (hash <literal>foo</literal>) to get the geometry of the element that has an <literal>id="foo"</literal> attribute.

class Handle
bool
hasSub
(
string id
)

Parameters

id string

An element's id within the SVG, starting with "##" (a single hash character), for example, "##layer1". This notation corresponds to a URL's fragment ID.

Return Value

Type: bool

%TRUE if @id exists in the SVG document, %FALSE otherwise.

Meta

Since

2.22