blob: 98d340a175f7298499ac55a9b55f22403ce73549 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
/*
* Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibWeb/Bindings/Intrinsics.h>
#include <LibWeb/DOM/Element.h>
#include <LibWeb/ResizeObserver/ResizeObserver.h>
namespace Web::ResizeObserver {
// https://drafts.csswg.org/resize-observer/#dom-resizeobserver-resizeobserver
JS::NonnullGCPtr<ResizeObserver> ResizeObserver::construct_impl(JS::Realm& realm, WebIDL::CallbackType* callback)
{
// FIXME: Implement
(void)callback;
return *realm.heap().allocate<ResizeObserver>(realm, realm);
}
ResizeObserver::ResizeObserver(JS::Realm& realm)
: PlatformObject(realm)
{
set_prototype(&Bindings::cached_web_prototype(realm, "ResizeObserver"));
}
ResizeObserver::~ResizeObserver() = default;
// https://drafts.csswg.org/resize-observer/#dom-resizeobserver-observe
void ResizeObserver::observe(DOM::Element& target, ResizeObserverOptions options)
{
// FIXME: Implement
(void)target;
(void)options;
}
// https://drafts.csswg.org/resize-observer/#dom-resizeobserver-unobserve
void ResizeObserver::unobserve(DOM::Element& target)
{
// FIXME: Implement
(void)target;
}
// https://drafts.csswg.org/resize-observer/#dom-resizeobserver-disconnect
void ResizeObserver::disconnect()
{
// FIXME: Implement
}
}
|