mirror of
https://github.com/RGBCube/serenity
synced 2025-05-17 19:15:08 +00:00
LibHTML: Add parse_html_fragment()
This function parses a partial DOM and returns it wrapped in a document fragment node (DocumentFragment.) There are now two entrances into the HTML parser, one for parsing full documents, and one for parsing fragments. Internally the both wrap the same parsing function.
This commit is contained in:
parent
f404a1dc16
commit
635717ed0f
2 changed files with 28 additions and 8 deletions
|
@ -3,5 +3,7 @@
|
|||
#include <AK/NonnullRefPtr.h>
|
||||
#include <LibHTML/DOM/Document.h>
|
||||
|
||||
NonnullRefPtr<Document> parse_html(const StringView&, const URL& = URL());
|
||||
class DocumentFragment;
|
||||
|
||||
NonnullRefPtr<Document> parse_html(const StringView&, const URL& = URL());
|
||||
RefPtr<DocumentFragment> parse_html_fragment(Document&, const StringView&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue