mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Update webidl and implement setter for the files property of a file input (#31934)
The files attribute was previously readonly, but was later updated to allow mutation via input.files = ... see https://github.com/whatwg/html/issues/2861
This commit is contained in:
parent
8c25336e9a
commit
8c1a72f130
6 changed files with 8 additions and 13 deletions
|
@ -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");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue