ohash icon indicating copy to clipboard operation
ohash copied to clipboard

feat(serialize): support HTML elements

Open zsilbi opened this issue 9 months ago • 1 comments

Resolves https://github.com/unjs/ohash/issues/154

Added support for serializing HTML elements.

We could also support these (??):

  • Comment
  • DocumentFragment
  • HTMLDocument
  • HTMLCollection
  • NodeList
  • Range
  • Text

Added DOM tests with @vitest-environment happy-dom

zsilbi avatar Mar 25 '25 20:03 zsilbi

This is really nice work with tests coverage 🚀

I think it is almost time we think about supporting extended serializers (like a preset addon for supporting HTML serialization), even though bundle addition is few bytes still is not needed for many (I imagine most of) users.

pi0 avatar Mar 25 '25 20:03 pi0