pub(super) fn for_name(name: &str) -> f64 {
    match name {
        "IndexSizeError" => 1.0,
        "DOMStringSizeError" => 2.0,
        "HierarchyRequestError" => 3.0,
        "WrongDocumentError" => 4.0,
        "InvalidCharacterError" => 5.0,
        "NoDataAllowedError" => 6.0,
        "NoModificationAllowedError" => 7.0,
        "NotFoundError" => 8.0,
        "NotSupportedError" => 9.0,
        "InUseAttributeError" => 10.0,
        "InvalidStateError" => 11.0,
        "SyntaxError" => 12.0,
        "InvalidModificationError" => 13.0,
        "NamespaceError" => 14.0,
        "InvalidAccessError" => 15.0,
        "ValidationError" => 16.0,
        "TypeMismatchError" => 17.0,
        "SecurityError" => 18.0,
        "NetworkError" => 19.0,
        "AbortError" => 20.0,
        "URLMismatchError" => 21.0,
        "QuotaExceededError" => 22.0,
        "TimeoutError" => 23.0,
        "InvalidNodeTypeError" => 24.0,
        "DataCloneError" => 25.0,
        _ => 0.0,
    }
}
