summaryrefslogtreecommitdiffstats
path: root/dom/webidl/ResizeObserver.webidl
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-09-16 16:39:15 +0000
committerMoonchild <moonchild@palemoon.org>2020-09-21 11:04:05 +0000
commit791d5f8a43a28b149e0c328c71ecc31c2ade2179 (patch)
treecb08e009b0bd4681167756a4a095ad013f699a56 /dom/webidl/ResizeObserver.webidl
parented1f54ab7312f2e7f5b2f46bc5e9d693f4ee6f06 (diff)
downloadUXP-791d5f8a43a28b149e0c328c71ecc31c2ade2179.tar
UXP-791d5f8a43a28b149e0c328c71ecc31c2ade2179.tar.gz
UXP-791d5f8a43a28b149e0c328c71ecc31c2ade2179.tar.lz
UXP-791d5f8a43a28b149e0c328c71ecc31c2ade2179.tar.xz
UXP-791d5f8a43a28b149e0c328c71ecc31c2ade2179.zip
Issue #1643 - Part 2: Implement ResizeObserver API
Implements ResizeObserver, ResizeObserverEntry and ResizeObservation
Diffstat (limited to 'dom/webidl/ResizeObserver.webidl')
-rw-r--r--dom/webidl/ResizeObserver.webidl39
1 files changed, 39 insertions, 0 deletions
diff --git a/dom/webidl/ResizeObserver.webidl b/dom/webidl/ResizeObserver.webidl
new file mode 100644
index 000000000..98700f53c
--- /dev/null
+++ b/dom/webidl/ResizeObserver.webidl
@@ -0,0 +1,39 @@
+/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * The origin of this IDL file is
+ * https://wicg.github.io/ResizeObserver/
+ */
+
+[Constructor(ResizeObserverCallback callback),
+ Exposed=Window,
+ Pref="layout.css.resizeobserver.enabled"]
+interface ResizeObserver {
+ [Throws]
+ void observe(Element? target);
+ [Throws]
+ void unobserve(Element? target);
+ void disconnect();
+};
+
+callback ResizeObserverCallback = void (sequence<ResizeObserverEntry> entries, ResizeObserver observer);
+
+[Constructor(Element? target),
+ ChromeOnly,
+ Pref="layout.css.resizeobserver.enabled"]
+interface ResizeObserverEntry {
+ readonly attribute Element target;
+ readonly attribute DOMRectReadOnly? contentRect;
+};
+
+[Constructor(Element? target),
+ ChromeOnly,
+ Pref="layout.css.resizeobserver.enabled"]
+interface ResizeObservation {
+ readonly attribute Element target;
+ readonly attribute long broadcastWidth;
+ readonly attribute long broadcastHeight;
+ boolean isActive();
+};