Restore HTMLSelectElement.add to avoid neutering test_union.html.

This commit is contained in:
Ms2ger 2014-06-01 18:01:56 +02:00
parent a0783aebbf
commit 2f0929fc36
2 changed files with 8 additions and 1 deletions

View file

@ -4,6 +4,7 @@
use dom::bindings::codegen::BindingDeclarations::HTMLSelectElementBinding;
use dom::bindings::codegen::InheritTypes::HTMLSelectElementDerived;
use dom::bindings::codegen::UnionTypes::{HTMLElementOrLong, HTMLOptionElementOrHTMLOptGroupElement};
use dom::bindings::js::{JSRef, Temporary};
use dom::document::Document;
use dom::element::HTMLSelectElementTypeId;
@ -39,6 +40,7 @@ impl HTMLSelectElement {
pub trait HTMLSelectElementMethods {
fn Validity(&self) -> Temporary<ValidityState>;
fn Add(&self, _element: HTMLOptionElementOrHTMLOptGroupElement, _before: Option<HTMLElementOrLong>);
}
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();
ValidityState::new(&*window)
}
// Note: this function currently only exists for test_union.html.
fn Add(&self, _element: HTMLOptionElementOrHTMLOptGroupElement, _before: Option<HTMLElementOrLong>) {
}
}