2018-09-13 23:04:55 +03:00
|
|
|
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2015-05-20 03:59:00 +03:00
|
|
|
/* 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/.
|
|
|
|
*/
|
|
|
|
|
|
|
|
enum CaretChangedReason {
|
|
|
|
"visibilitychange",
|
|
|
|
"updateposition",
|
|
|
|
"longpressonemptycontent",
|
|
|
|
"taponcaret",
|
|
|
|
"presscaret",
|
2016-04-21 11:43:11 +03:00
|
|
|
"releasecaret",
|
2022-04-08 08:11:48 +03:00
|
|
|
"scroll",
|
|
|
|
"dragcaret"
|
2015-05-20 03:59:00 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
dictionary CaretStateChangedEventInit : EventInit {
|
|
|
|
boolean collapsed = true;
|
|
|
|
DOMRectReadOnly? boundingClientRect = null;
|
|
|
|
CaretChangedReason reason = "visibilitychange";
|
|
|
|
boolean caretVisible = false;
|
2015-12-01 23:25:06 +03:00
|
|
|
boolean caretVisuallyVisible = false;
|
2015-05-20 03:59:00 +03:00
|
|
|
boolean selectionVisible = false;
|
2015-07-30 23:34:00 +03:00
|
|
|
boolean selectionEditable = false;
|
2015-09-16 12:58:14 +03:00
|
|
|
DOMString selectedTextContent = "";
|
2022-04-08 08:11:48 +03:00
|
|
|
long clientX = 0;
|
|
|
|
long clientY = 0;
|
2015-05-20 03:59:00 +03:00
|
|
|
};
|
|
|
|
|
2019-09-27 18:26:14 +03:00
|
|
|
[ChromeOnly,
|
|
|
|
Exposed=Window]
|
2015-05-20 03:59:00 +03:00
|
|
|
interface CaretStateChangedEvent : Event {
|
2019-09-11 17:35:28 +03:00
|
|
|
constructor(DOMString type,
|
|
|
|
optional CaretStateChangedEventInit eventInit = {});
|
|
|
|
|
2015-05-20 03:59:00 +03:00
|
|
|
readonly attribute boolean collapsed;
|
2018-09-25 20:46:58 +03:00
|
|
|
/* The bounding client rect is relative to the visual viewport. */
|
2015-05-20 03:59:00 +03:00
|
|
|
readonly attribute DOMRectReadOnly? boundingClientRect;
|
|
|
|
readonly attribute CaretChangedReason reason;
|
|
|
|
readonly attribute boolean caretVisible;
|
2015-12-01 23:25:06 +03:00
|
|
|
readonly attribute boolean caretVisuallyVisible;
|
2015-05-20 03:59:00 +03:00
|
|
|
readonly attribute boolean selectionVisible;
|
2015-07-30 23:34:00 +03:00
|
|
|
readonly attribute boolean selectionEditable;
|
2015-09-16 12:58:14 +03:00
|
|
|
readonly attribute DOMString selectedTextContent;
|
2022-04-08 08:11:48 +03:00
|
|
|
[Pref="layout.accessiblecaret.magnifier.enabled"]
|
|
|
|
readonly attribute long clientX;
|
|
|
|
[Pref="layout.accessiblecaret.magnifier.enabled"]
|
|
|
|
readonly attribute long clientY;
|
2015-05-20 03:59:00 +03:00
|
|
|
};
|