LibWeb: Use DOMParserSupportedType enum for DOMParser.parseFromString

Previously it would accept any DOMString, as we didn't support enums at
the time. Now it will only accept what's specified in the
DOMParserSupportedType enum.

This also adds spec comments to DOMParser::parse_from_string.
This commit is contained in:
Luke Wilde 2022-02-19 20:01:20 +00:00 committed by Andreas Kling
commit 10581cfaeb
Notes: sideshowbarker 2024-07-17 18:31:21 +09:00
4 changed files with 36 additions and 9 deletions

View file

@ -30,7 +30,7 @@ public:
virtual ~DOMParser() override;
NonnullRefPtr<DOM::Document> parse_from_string(String const&, String const&);
NonnullRefPtr<DOM::Document> parse_from_string(String const&, Bindings::DOMParserSupportedType type);
private:
DOMParser();