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!
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.
Maybe this can be better served by (extensions to) the DOM drag and drop API.
<rdar://problem/5923198>
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!