Implement the no-argument Blob constructor.

This commit is contained in:
Ms2ger 2013-10-18 19:30:32 +02:00
parent 9046085506
commit 40fde80e1a
2 changed files with 10 additions and 2 deletions

View file

@ -4,11 +4,12 @@
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* The origin of this IDL file is
* http://www.w3.org/TR/2012/WD-dom-20120105/
* http://dev.w3.org/2006/webapi/FileAPI/
*
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
* liability, trademark and document use rules apply.
*/
[Constructor]
interface Blob {
};
};

View file

@ -3,6 +3,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::utils::{Reflectable, Reflector};
use dom::bindings::utils::Fallible;
use dom::bindings::codegen::BlobBinding;
use dom::window::Window;
@ -33,6 +34,12 @@ impl Blob {
}
}
impl Blob {
pub fn Constructor(window: @mut Window) -> Fallible<@mut Blob> {
Ok(Blob::new(window))
}
}
impl Reflectable for Blob {
fn reflector<'a>(&'a self) -> &'a Reflector {
&self.reflector_