1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 04:17:35 +00:00

LibWeb: Add stubs for document.write and document.writeln

ACID3 test page throws exception about document.write. Let's at least
get rid of it by defining these stubs.

I added document.writeln too because it is similar.
This commit is contained in:
Maciej 2022-02-15 17:36:27 +01:00 committed by Tim Flynn
parent deba345ca7
commit ed33ea13ab
3 changed files with 19 additions and 0 deletions

View file

@ -147,6 +147,18 @@ void Document::removed_last_ref()
delete this;
}
// https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-document-write
void Document::write(Vector<String> const& strings)
{
dbgln("TODO: document.write({})", strings);
}
// https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-document-writeln
void Document::writeln(Vector<String> const& strings)
{
dbgln("TODO: document.writeln({})", strings);
}
Origin Document::origin() const
{
if (!m_url.is_valid())