From 40fde80e1a738f392e5741ac8b88e7655728d371 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Fri, 18 Oct 2013 19:30:32 +0200 Subject: [PATCH] Implement the no-argument Blob constructor. --- src/components/script/dom/bindings/codegen/Blob.webidl | 5 +++-- src/components/script/dom/blob.rs | 7 +++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/components/script/dom/bindings/codegen/Blob.webidl b/src/components/script/dom/bindings/codegen/Blob.webidl index bc6ad78efa5..afa67719560 100644 --- a/src/components/script/dom/bindings/codegen/Blob.webidl +++ b/src/components/script/dom/bindings/codegen/Blob.webidl @@ -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 { -}; \ No newline at end of file +}; diff --git a/src/components/script/dom/blob.rs b/src/components/script/dom/blob.rs index b981786f0f0..9e265e4114b 100644 --- a/src/components/script/dom/blob.rs +++ b/src/components/script/dom/blob.rs @@ -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_