mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09:00
parent
4f83e877a8
commit
8b7021f216
3 changed files with 22 additions and 1 deletions
|
|
@ -3105,6 +3105,26 @@ HTMLInputElement::GetFiles()
|
|||
return mFileList;
|
||||
}
|
||||
|
||||
void
|
||||
HTMLInputElement::SetFiles(FileList* aFiles)
|
||||
{
|
||||
if (mType != NS_FORM_INPUT_FILE || !aFiles) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Clear |mFileList| to omit |UpdateFileList|
|
||||
if (mFileList) {
|
||||
mFileList->Clear();
|
||||
mFileList = nullptr;
|
||||
}
|
||||
|
||||
// Update |mFilesOrDirectories|
|
||||
SetFiles(aFiles, true);
|
||||
|
||||
// Update |mFileList| without copy
|
||||
mFileList = aFiles;
|
||||
}
|
||||
|
||||
/* static */ void
|
||||
HTMLInputElement::HandleNumberControlSpin(void* aData)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -474,6 +474,7 @@ public:
|
|||
// XPCOM GetForm() is OK
|
||||
|
||||
FileList* GetFiles();
|
||||
void SetFiles(FileList* aFiles);
|
||||
|
||||
// XPCOM GetFormAction() is OK
|
||||
void SetFormAction(const nsAString& aValue, ErrorResult& aRv)
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ interface HTMLInputElement : HTMLElement {
|
|||
attribute boolean disabled;
|
||||
readonly attribute HTMLFormElement? form;
|
||||
[Pure]
|
||||
readonly attribute FileList? files;
|
||||
attribute FileList? files;
|
||||
[CEReactions, Pure, SetterThrows]
|
||||
attribute DOMString formAction;
|
||||
[CEReactions, Pure, SetterThrows]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue