diff options
Diffstat (limited to 'components/script/dom/htmlinputelement.rs')
-rwxr-xr-x | components/script/dom/htmlinputelement.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/components/script/dom/htmlinputelement.rs b/components/script/dom/htmlinputelement.rs index b00d2079db6..5ebd9c2cdc0 100755 --- a/components/script/dom/htmlinputelement.rs +++ b/components/script/dom/htmlinputelement.rs @@ -1186,6 +1186,13 @@ impl HTMLInputElementMethods for HTMLInputElement { self.filelist.get().as_ref().cloned() } + /// <https://html.spec.whatwg.org/multipage/#dom-input-files> + fn SetFiles(&self, files: Option<&FileList>) { + if self.input_type() == InputType::File && files.is_some() { + self.filelist.set(files); + } + } + // https://html.spec.whatwg.org/multipage/#dom-input-defaultchecked make_bool_getter!(DefaultChecked, "checked"); |