Bug 18957
Summary: | Allow assignment to value attr of input[type=file] elements via ObjC DOM API | ||
---|---|---|---|
Product: | WebKit | Reporter: | Todd Ditchendorf <todd> |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED WONTFIX | ||
Severity: | Enhancement | CC: | adele, ahmad.saleem792, bfulgham, cdumez, mitz, rniwa, sam |
Priority: | P2 | Keywords: | InRadar |
Version: | 528+ (Nightly build) | ||
Hardware: | Mac | ||
OS: | OS X 10.5 |
Todd Ditchendorf
Given an HTML element in a DOM:
<input type="file">
AFAICT, you cannot programmatically set the value of the "value" attribute of this element via the ObjC DOM API.
I understand that JavaScript is not allowed to set the value of the "value" attr due to security restrictions. But it seems that ObjC should be allowed to set this value attribute, as it wouldn't be a security risk, no?
thx!
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Todd Ditchendorf
My use case:
I am writing a WebKit-based desktop application, and I want users to be able to easily drag a local file to anywhere on the WebView, to add the file as the value of the 'value' attr of an <input type="file"> element in the current DOM.
I know that you can currently drop a file directly over the input element, but that *does* require a bit more dexterity, and does not work in the case where the input element may be currently hidden or scrolled out of view.
This enhancement would allow me to offer nicer usability.
mitz
Maybe this can be better served by (extensions to) the DOM drag and drop API.
Mark Rowe (bdash)
<rdar://problem/5923198>
Ahmad Saleem
There are various enhancements in WebAPI and JavaScript use cases and in general across browsers, I think this can be achieved easily these days and this enhancement request can be marked as "RESOLVED WONTFIX".
Please reopen, if you think there is still gap in modern Web standards to achieve this and you can also raise such discussion of gaps in Standards or related WHATWG Github. Thanks!