mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Restore HTMLSelectElement.add to avoid neutering test_union.html.
This commit is contained in:
parent
a0783aebbf
commit
2f0929fc36
2 changed files with 8 additions and 1 deletions
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
use dom::bindings::codegen::BindingDeclarations::HTMLSelectElementBinding;
|
use dom::bindings::codegen::BindingDeclarations::HTMLSelectElementBinding;
|
||||||
use dom::bindings::codegen::InheritTypes::HTMLSelectElementDerived;
|
use dom::bindings::codegen::InheritTypes::HTMLSelectElementDerived;
|
||||||
|
use dom::bindings::codegen::UnionTypes::{HTMLElementOrLong, HTMLOptionElementOrHTMLOptGroupElement};
|
||||||
use dom::bindings::js::{JSRef, Temporary};
|
use dom::bindings::js::{JSRef, Temporary};
|
||||||
use dom::document::Document;
|
use dom::document::Document;
|
||||||
use dom::element::HTMLSelectElementTypeId;
|
use dom::element::HTMLSelectElementTypeId;
|
||||||
|
@ -39,6 +40,7 @@ impl HTMLSelectElement {
|
||||||
|
|
||||||
pub trait HTMLSelectElementMethods {
|
pub trait HTMLSelectElementMethods {
|
||||||
fn Validity(&self) -> Temporary<ValidityState>;
|
fn Validity(&self) -> Temporary<ValidityState>;
|
||||||
|
fn Add(&self, _element: HTMLOptionElementOrHTMLOptGroupElement, _before: Option<HTMLElementOrLong>);
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> HTMLSelectElementMethods for JSRef<'a, HTMLSelectElement> {
|
impl<'a> HTMLSelectElementMethods for JSRef<'a, HTMLSelectElement> {
|
||||||
|
@ -46,4 +48,8 @@ impl<'a> HTMLSelectElementMethods for JSRef<'a, HTMLSelectElement> {
|
||||||
let window = window_from_node(self).root();
|
let window = window_from_node(self).root();
|
||||||
ValidityState::new(&*window)
|
ValidityState::new(&*window)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Note: this function currently only exists for test_union.html.
|
||||||
|
fn Add(&self, _element: HTMLOptionElementOrHTMLOptGroupElement, _before: Option<HTMLElementOrLong>) {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,8 @@ interface HTMLSelectElement : HTMLElement {
|
||||||
// attribute unsigned long length;
|
// attribute unsigned long length;
|
||||||
//getter Element? item(unsigned long index);
|
//getter Element? item(unsigned long index);
|
||||||
//HTMLOptionElement? namedItem(DOMString name);
|
//HTMLOptionElement? namedItem(DOMString name);
|
||||||
//void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null);
|
// Note: this function currently only exists for test_union.html.
|
||||||
|
void add((HTMLOptionElement or HTMLOptGroupElement) element, optional (HTMLElement or long)? before = null);
|
||||||
//void remove(); // ChildNode overload
|
//void remove(); // ChildNode overload
|
||||||
//void remove(long index);
|
//void remove(long index);
|
||||||
//setter creator void (unsigned long index, HTMLOptionElement? option);
|
//setter creator void (unsigned long index, HTMLOptionElement? option);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue