Use ToJSValConvertible to convert nullable enums to JSVal.

This commit is contained in:
Ms2ger 2014-04-06 19:51:12 +02:00
parent ccaa46e4a3
commit a52cffebeb
3 changed files with 5 additions and 5 deletions

View file

@ -74,6 +74,7 @@ impl TestBinding {
pub fn SetDoubleAttributeNullable(&self, _: Option<f64>) {}
pub fn GetStringAttributeNullable(&self) -> Option<DOMString> { Some(~"") }
pub fn SetStringAttributeNullable(&self, _: Option<DOMString>) {}
pub fn GetEnumAttributeNullable(&self) -> Option<TestEnum> { Some(_empty) }
pub fn GetInterfaceAttributeNullable(&self) -> Option<JS<Blob>> { Some(Blob::new(&self.window)) }
pub fn SetInterfaceAttributeNullable(&self, _: Option<JS<Blob>>) {}