mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibWeb: Make Document::run_the_document_write_steps take a StringView
Which flows on down into HTMLTokenizer::insert_input_at_insertion_point.
This commit is contained in:
parent
827170f6e6
commit
49eb3bfb1d
Notes:
sideshowbarker
2024-07-17 23:07:41 +09:00
Author: https://github.com/shannonbooth
Commit: 49eb3bfb1d
Pull-request: https://github.com/SerenityOS/serenity/pull/21042
4 changed files with 6 additions and 6 deletions
|
@ -415,7 +415,7 @@ WebIDL::ExceptionOr<void> Document::write(Vector<DeprecatedString> const& string
|
|||
StringBuilder builder;
|
||||
builder.join(""sv, strings);
|
||||
|
||||
return run_the_document_write_steps(builder.to_deprecated_string());
|
||||
return run_the_document_write_steps(builder.string_view());
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-document-writeln
|
||||
|
@ -425,11 +425,11 @@ WebIDL::ExceptionOr<void> Document::writeln(Vector<DeprecatedString> const& stri
|
|||
builder.join(""sv, strings);
|
||||
builder.append("\n"sv);
|
||||
|
||||
return run_the_document_write_steps(builder.to_deprecated_string());
|
||||
return run_the_document_write_steps(builder.string_view());
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#document-write-steps
|
||||
WebIDL::ExceptionOr<void> Document::run_the_document_write_steps(DeprecatedString input)
|
||||
WebIDL::ExceptionOr<void> Document::run_the_document_write_steps(StringView input)
|
||||
{
|
||||
// 1. If document is an XML document, then throw an "InvalidStateError" DOMException.
|
||||
if (m_type == Type::XML)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue