Skip to content

Commit 40fde80

Browse files
committed
Implement the no-argument Blob constructor.
1 parent 9046085 commit 40fde80

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/components/script/dom/bindings/codegen/Blob.webidl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44
* You can obtain one at http://mozilla.org/MPL/2.0/.
55
*
66
* The origin of this IDL file is
7-
* http://www.w3.org/TR/2012/WD-dom-20120105/
7+
* http://dev.w3.org/2006/webapi/FileAPI/
88
*
99
* Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
1010
* liability, trademark and document use rules apply.
1111
*/
1212

13+
[Constructor]
1314
interface Blob {
14-
};
15+
};

src/components/script/dom/blob.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
44

55
use dom::bindings::utils::{Reflectable, Reflector};
6+
use dom::bindings::utils::Fallible;
67
use dom::bindings::codegen::BlobBinding;
78
use dom::window::Window;
89

@@ -33,6 +34,12 @@ impl Blob {
3334
}
3435
}
3536

37+
impl Blob {
38+
pub fn Constructor(window: @mut Window) -> Fallible<@mut Blob> {
39+
Ok(Blob::new(window))
40+
}
41+
}
42+
3643
impl Reflectable for Blob {
3744
fn reflector<'a>(&'a self) -> &'a Reflector {
3845
&self.reflector_

0 commit comments

Comments
 (0)