aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/filelist.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/filelist.rs')
-rw-r--r--components/script/dom/filelist.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/components/script/dom/filelist.rs b/components/script/dom/filelist.rs
index 96bfc4ce0d3..4f8e976f5f7 100644
--- a/components/script/dom/filelist.rs
+++ b/components/script/dom/filelist.rs
@@ -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 {