-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add FileList interface to HTML. #10693
base: main
Are you sure you want to change the base?
Conversation
This interface really only exists for usage by DataTransfer and <input type=file>, and its interface is driven by how it is (or should be used) by those. As such, it makes more sense to be part of HTML rather than FileAPI, as discussed at TPAC.
I think the build errors are because FileAPI still defines this type? Or I might be doing something wrong... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To fix the build error, remove the cross-reference definition on line 3473:
<li>The <dfn data-x-href="https://w3c.github.io/FileAPI/#filelist-section"><code>FileList</code></dfn> interface</li>
are:</p> | ||
|
||
<ol> | ||
<li><p>Set <var>serialized</var>.[[Files]] to an empty <span>list</span>.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: single-space indents, here and below.
<ol> | ||
<li><p>Set <var>serialized</var>.[[Files]] to an empty <span>list</span>.</p> | ||
|
||
<li><p><span data-x="list iterate">For each</span> <var>file</var> in <var>value</var>, append |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should loop through value's file list, here and below.
<li><p>Let <var>files</var> be <span>this</span>'s <span>files list</span>.</p></li> | ||
|
||
<li><p>If <var>index</var> is greater than or equal to the <span data-x="list size">size</span> | ||
of <var>files</var>, return null.</p></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: "then return null"
This interface really only exists for usage by DataTransfer and
<input type=file>
, and its interface is driven by how it is (or shouldbe used) by those. As such, it makes more sense to be part of HTML
rather than FileAPI, as discussed at TPAC.
(See WHATWG Working Mode: Changes for more details.)
💥 Error: Wattsi server error 💥
PR Preview failed to build. (Last tried on Oct 10, 2024, 8:30 PM UTC).
More
PR Preview relies on a number of web services to run. There seems to be an issue with the following one:
🚨 Wattsi Server - Wattsi Server is the web service used to build the WHATWG HTML spec.
🔗 Related URL
If you don't have enough information above to solve the error by yourself (or to understand to which web service the error is related to, if any), please file an issue.