This is a concept fully defined in the Web IDL spec and doesn't belong in the DOM directory/namespace - not even DOMException, despite the name :^)
This better matches the spec, and makes it possible for things like Path2D to reuse the same implementation without duplicate code. :^)