Skip Navigation
Type MethodMethod

attribute(_:of:)

Returns the value of an attribute of the opening tag of an SVG element.

static func attribute(
    _ name: String,
    of svg: String
) -> String?

Parameters

name

The attribute name.

svg

The SVG element.

Return Value

The attribute’s value, or nil if the opening tag lacks it.