diff --git a/Sources/Element.swift b/Sources/Element.swift
index 8b4c67b..63e3cd1 100644
--- a/Sources/Element.swift
+++ b/Sources/Element.swift
@@ -16,9 +16,6 @@ open class Element: Node {
private static let idString = "id".utf8Array
private static let rootString = "#root".utf8Array
- //private static let classSplit : Pattern = Pattern("\\s+")
- private static let classSplit = "\\s+"
-
/**
* Create a new, standalone Element. (Standalone in that is has no parent.)
*
@@ -1112,6 +1109,15 @@ open class Element: Node {
public func className() throws -> String {
return try String(decoding: attr(Element.classString).trim(), as: UTF8.self)
}
+
+ /**
+ * Gets the literal value of this element's "class" attribute, which may include multiple class names, space
+ * separated. (E.g. on <div class="header gray">
returns, "header gray
")
+ * @return The literal class attribute, or empty string if no class attribute set.
+ */
+ public func classNameUTF8() throws -> [UInt8] {
+ return try attr(Element.classString).trim()
+ }
/**
* Get all of the element's class names. E.g. on element {@code