mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:27:45 +00:00
LibWeb: Add Document.createRange()
Also tidy up DOM::Range a little bit while we're here, and unify the way we create them to use a delegating constructors.
This commit is contained in:
parent
ff018607a1
commit
9194a97cbe
6 changed files with 42 additions and 21 deletions
|
@ -42,6 +42,7 @@
|
|||
#include <LibWeb/DOM/ElementFactory.h>
|
||||
#include <LibWeb/DOM/Event.h>
|
||||
#include <LibWeb/DOM/ExceptionOr.h>
|
||||
#include <LibWeb/DOM/Range.h>
|
||||
#include <LibWeb/DOM/Text.h>
|
||||
#include <LibWeb/DOM/Window.h>
|
||||
#include <LibWeb/Dump.h>
|
||||
|
@ -587,6 +588,11 @@ NonnullRefPtr<Comment> Document::create_comment(const String& data)
|
|||
return adopt(*new Comment(*this, data));
|
||||
}
|
||||
|
||||
NonnullRefPtr<Range> Document::create_range()
|
||||
{
|
||||
return Range::create(*this);
|
||||
}
|
||||
|
||||
void Document::set_pending_parsing_blocking_script(Badge<HTML::HTMLScriptElement>, HTML::HTMLScriptElement* script)
|
||||
{
|
||||
m_pending_parsing_blocking_script = script;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue