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

LibWeb: Implement a large chunk of the Selection API

This patch implements enough of the Selection API specification
that we stop hitting unimplemented functions when loading Twitter.
This commit is contained in:
Andreas Kling 2022-10-11 16:54:42 +02:00
parent 317ab7a04b
commit e77798f5fd
3 changed files with 270 additions and 54 deletions

View file

@ -360,8 +360,9 @@ JS::GCPtr<Selection::Selection> Document::get_selection()
if (!browsing_context()) {
return nullptr;
}
if (!m_selection) {
m_selection = Selection::Selection::create(realm());
m_selection = Selection::Selection::create(realm(), *this);
}
return m_selection;
}