2014-07-28 03:21:00 +04:00
|
|
|
/* -*- 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/.
|
|
|
|
*/
|
|
|
|
|
2014-11-27 20:55:00 +03:00
|
|
|
enum SelectionState {
|
2014-08-11 04:37:00 +04:00
|
|
|
"drag",
|
|
|
|
"mousedown",
|
|
|
|
"mouseup",
|
|
|
|
"keypress",
|
|
|
|
"selectall",
|
|
|
|
"collapsetostart",
|
2014-11-27 20:56:00 +03:00
|
|
|
"collapsetoend",
|
2014-12-10 03:50:00 +03:00
|
|
|
"blur",
|
2015-01-22 07:28:00 +03:00
|
|
|
"updateposition",
|
|
|
|
"taponcaret"
|
2014-08-11 04:37:00 +04:00
|
|
|
};
|
|
|
|
|
2014-11-27 20:55:00 +03:00
|
|
|
dictionary SelectionStateChangedEventInit : EventInit {
|
2014-12-10 03:50:00 +03:00
|
|
|
boolean visible = true;
|
2014-07-28 03:21:00 +04:00
|
|
|
DOMString selectedText = "";
|
|
|
|
DOMRectReadOnly? boundingClientRect = null;
|
2014-11-27 20:55:00 +03:00
|
|
|
sequence<SelectionState> states = [];
|
2014-07-28 03:21:00 +04:00
|
|
|
};
|
|
|
|
|
2014-11-27 20:55:00 +03:00
|
|
|
[Constructor(DOMString type, optional SelectionStateChangedEventInit eventInit),
|
2014-07-28 03:21:00 +04:00
|
|
|
ChromeOnly]
|
2014-11-27 20:55:00 +03:00
|
|
|
interface SelectionStateChangedEvent : Event {
|
2014-12-10 03:50:00 +03:00
|
|
|
readonly attribute boolean visible;
|
2014-07-28 03:21:00 +04:00
|
|
|
readonly attribute DOMString selectedText;
|
|
|
|
readonly attribute DOMRectReadOnly? boundingClientRect;
|
2014-11-27 20:55:00 +03:00
|
|
|
[Cached, Pure] readonly attribute sequence<SelectionState> states;
|
2014-07-28 03:21:00 +04:00
|
|
|
};
|