Add form submission for file type input and related fixings

This commit is contained in:
Zhen Zhang 2016-07-21 08:31:25 +02:00
parent 2553bb7af4
commit ef091179f5
15 changed files with 243 additions and 113 deletions

View file

@ -9,6 +9,7 @@ use dom::bindings::js::{JS, Root};
use dom::bindings::reflector::{Reflector, reflect_dom_object};
use dom::file::File;
use dom::window::Window;
use std::slice::Iter;
// https://w3c.github.io/FileAPI/#dfn-filelist
#[dom_struct]
@ -32,6 +33,10 @@ impl FileList {
GlobalRef::Window(window),
FileListBinding::Wrap)
}
pub fn iter_files(&self) -> Iter<JS<File>> {
self.list.iter()
}
}
impl FileListMethods for FileList {