1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 * You can obtain one at http://mozilla.org/MPL/2.0/.
7 enum CaretChangedReason {
10 "longpressonemptycontent",
18 dictionary CaretStateChangedEventInit : EventInit {
19 boolean collapsed = true;
20 DOMRectReadOnly? boundingClientRect = null;
21 CaretChangedReason reason = "visibilitychange";
22 boolean caretVisible = false;
23 boolean caretVisuallyVisible = false;
24 boolean selectionVisible = false;
25 boolean selectionEditable = false;
26 DOMString selectedTextContent = "";
33 interface CaretStateChangedEvent : Event {
34 constructor(DOMString type,
35 optional CaretStateChangedEventInit eventInit = {});
37 readonly attribute boolean collapsed;
38 /* The bounding client rect is relative to the visual viewport. */
39 readonly attribute DOMRectReadOnly? boundingClientRect;
40 readonly attribute CaretChangedReason reason;
41 readonly attribute boolean caretVisible;
42 readonly attribute boolean caretVisuallyVisible;
43 readonly attribute boolean selectionVisible;
44 readonly attribute boolean selectionEditable;
45 readonly attribute DOMString selectedTextContent;
46 [Pref="layout.accessiblecaret.magnifier.enabled"]
47 readonly attribute long clientX;
48 [Pref="layout.accessiblecaret.magnifier.enabled"]
49 readonly attribute long clientY;