2013-04-13 11:01:59 +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/.
|
|
|
|
*
|
|
|
|
* The origin of this IDL file is
|
|
|
|
* http://www.whatwg.org/html/#the-select-element
|
|
|
|
*/
|
|
|
|
|
2016-11-17 12:34:42 +03:00
|
|
|
[HTMLConstructor]
|
2013-04-13 11:01:59 +04:00
|
|
|
interface HTMLSelectElement : HTMLElement {
|
2017-06-29 17:26:00 +03:00
|
|
|
[CEReactions, SetterThrows, Pure]
|
2017-10-13 02:32:25 +03:00
|
|
|
attribute boolean autofocus;
|
2017-11-22 22:09:44 +03:00
|
|
|
[CEReactions, SetterThrows, Pure]
|
2017-10-13 02:32:25 +03:00
|
|
|
attribute DOMString autocomplete;
|
2017-06-29 17:26:00 +03:00
|
|
|
[CEReactions, SetterThrows, Pure]
|
2017-10-13 02:32:25 +03:00
|
|
|
attribute boolean disabled;
|
2013-04-13 11:01:59 +04:00
|
|
|
[Pure]
|
|
|
|
readonly attribute HTMLFormElement? form;
|
2017-06-29 17:26:00 +03:00
|
|
|
[CEReactions, SetterThrows, Pure]
|
2017-10-13 02:32:25 +03:00
|
|
|
attribute boolean multiple;
|
2017-06-29 17:26:00 +03:00
|
|
|
[CEReactions, SetterThrows, Pure]
|
2017-10-13 02:32:25 +03:00
|
|
|
attribute DOMString name;
|
2017-06-29 17:26:00 +03:00
|
|
|
[CEReactions, SetterThrows, Pure]
|
2017-10-13 02:32:25 +03:00
|
|
|
attribute boolean required;
|
2017-06-29 17:26:00 +03:00
|
|
|
[CEReactions, SetterThrows, Pure]
|
2017-10-13 02:32:25 +03:00
|
|
|
attribute unsigned long size;
|
2013-04-13 11:01:59 +04:00
|
|
|
|
|
|
|
[Pure]
|
|
|
|
readonly attribute DOMString type;
|
|
|
|
|
|
|
|
[Constant]
|
|
|
|
readonly attribute HTMLOptionsCollection options;
|
2017-06-29 17:26:00 +03:00
|
|
|
[CEReactions, SetterThrows, Pure]
|
2017-10-13 02:32:25 +03:00
|
|
|
attribute unsigned long length;
|
2013-04-21 10:41:54 +04:00
|
|
|
getter Element? item(unsigned long index);
|
2013-06-01 10:56:34 +04:00
|
|
|
HTMLOptionElement? namedItem(DOMString name);
|
2017-06-29 17:26:00 +03:00
|
|
|
[CEReactions, Throws]
|
2013-04-13 11:01:59 +04:00
|
|
|
void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null);
|
2017-06-29 17:26:00 +03:00
|
|
|
[CEReactions]
|
2013-04-13 11:01:59 +04:00
|
|
|
void remove(long index);
|
2017-06-29 17:26:00 +03:00
|
|
|
[CEReactions, Throws]
|
2017-11-04 07:36:10 +03:00
|
|
|
setter void (unsigned long index, HTMLOptionElement? option);
|
2013-04-13 11:01:59 +04:00
|
|
|
|
2013-09-02 21:23:27 +04:00
|
|
|
readonly attribute HTMLCollection selectedOptions;
|
2013-04-13 11:01:59 +04:00
|
|
|
[SetterThrows, Pure]
|
2017-10-13 02:32:25 +03:00
|
|
|
attribute long selectedIndex;
|
2013-04-13 11:01:59 +04:00
|
|
|
[Pure]
|
2017-10-13 02:32:25 +03:00
|
|
|
attribute DOMString value;
|
2013-04-13 11:01:59 +04:00
|
|
|
|
|
|
|
readonly attribute boolean willValidate;
|
|
|
|
readonly attribute ValidityState validity;
|
2017-07-14 06:46:28 +03:00
|
|
|
[Throws]
|
2013-04-13 11:01:59 +04:00
|
|
|
readonly attribute DOMString validationMessage;
|
|
|
|
boolean checkValidity();
|
2016-04-15 11:13:00 +03:00
|
|
|
boolean reportValidity();
|
2013-04-13 11:01:59 +04:00
|
|
|
void setCustomValidity(DOMString error);
|
|
|
|
|
2017-06-16 03:04:00 +03:00
|
|
|
readonly attribute NodeList labels;
|
2013-04-13 11:08:47 +04:00
|
|
|
|
|
|
|
// https://www.w3.org/Bugs/Public/show_bug.cgi?id=20720
|
2017-06-29 17:26:00 +03:00
|
|
|
[CEReactions]
|
2013-04-13 11:08:47 +04:00
|
|
|
void remove();
|
2013-04-13 11:01:59 +04:00
|
|
|
};
|
2016-08-03 14:45:46 +03:00
|
|
|
|
2017-03-14 09:28:00 +03:00
|
|
|
// Chrome only interface
|
|
|
|
|
2016-08-03 14:45:46 +03:00
|
|
|
partial interface HTMLSelectElement {
|
|
|
|
[ChromeOnly]
|
|
|
|
attribute boolean openInParentProcess;
|
2017-03-14 09:28:00 +03:00
|
|
|
[ChromeOnly]
|
|
|
|
AutocompleteInfo getAutocompleteInfo();
|
2017-05-03 12:08:44 +03:00
|
|
|
[ChromeOnly]
|
|
|
|
attribute DOMString previewValue;
|
2016-08-03 14:45:46 +03:00
|
|
|
};
|