Skip to content

DocumentFragment

Compare
Choose a tag to compare
@byteface byteface released this 15 Aug 01:11
· 262 commits to master since this release

so i made a start on the sanitizer api...
https://wicg.github.io/sanitizer-api/#sanitizer-algorithms

which lead to the creation of DocumentFragment.

DocumentFragment is now available. it can decorate other elements that don't have a document to make available a few methods of the Document class. when you call str on it, it only returns the content.

also quite a big change to tag.
element.attributes wasn't returning due to tag sharing the name. so tag is now changed to attributes which stringifies the kwargs and elements attributes prop now works. however be aware it returns not a dict but a list of Attr. I considered attributes_ to return kwargs but will see how this pans out. I was surprised all tests still passing so hope it doesn't affect anyone.

added a page for the utils to the docs. will see if they appear.