mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 14:07:45 +00:00
LibWeb: Add constructor to Range IDL interface
This commit is contained in:
parent
0ac07c7351
commit
8f8f7bfd0f
2 changed files with 7 additions and 0 deletions
|
@ -27,6 +27,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <AK/RefCounted.h>
|
#include <AK/RefCounted.h>
|
||||||
|
#include <LibWeb/Bindings/WindowObject.h>
|
||||||
#include <LibWeb/Bindings/Wrappable.h>
|
#include <LibWeb/Bindings/Wrappable.h>
|
||||||
#include <LibWeb/DOM/Node.h>
|
#include <LibWeb/DOM/Node.h>
|
||||||
|
|
||||||
|
@ -46,6 +47,10 @@ public:
|
||||||
{
|
{
|
||||||
return adopt(*new Range(start_container, start_offset, end_container, end_offset));
|
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.
|
// FIXME: There are a ton of methods missing here.
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
interface Range {
|
interface Range {
|
||||||
|
|
||||||
|
constructor();
|
||||||
|
|
||||||
readonly attribute Node startContainer;
|
readonly attribute Node startContainer;
|
||||||
readonly attribute unsigned long startOffset;
|
readonly attribute unsigned long startOffset;
|
||||||
readonly attribute Node endContainer;
|
readonly attribute Node endContainer;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue