1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 18:37:34 +00:00

LibWeb: Add constructor to Range IDL interface

This commit is contained in:
Linus Groh 2021-02-17 22:53:04 +01:00 committed by Andreas Kling
parent 0ac07c7351
commit 8f8f7bfd0f
2 changed files with 7 additions and 0 deletions

View file

@ -27,6 +27,7 @@
#pragma once
#include <AK/RefCounted.h>
#include <LibWeb/Bindings/WindowObject.h>
#include <LibWeb/Bindings/Wrappable.h>
#include <LibWeb/DOM/Node.h>
@ -46,6 +47,10 @@ public:
{
return adopt(*new Range(start_container, start_offset, end_container, end_offset));
}
static NonnullRefPtr<Range> create_with_global_object(Bindings::WindowObject& window)
{
return Range::create(window.impl());
}
// FIXME: There are a ton of methods missing here.

View file

@ -1,5 +1,7 @@
interface Range {
constructor();
readonly attribute Node startContainer;
readonly attribute unsigned long startOffset;
readonly attribute Node endContainer;