Closed
Bug 723008
Opened 14 years ago
Closed 8 years ago
Implement dropzone content attribute
Categories
(Core :: DOM: Core & HTML, enhancement)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
INVALID
People
(Reporter: rniwa, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-needed)
Consider implementing http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#the-dropzone-attribute.
FWIW, WebKit has webkitdropzone that matches the latest spec.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 1•14 years ago
|
||
Yes, we should implement it after reviewing the spec, and get the spec possibly fixed.
(Last time I read the spec, it was still bad.)
Comment 2•13 years ago
|
||
Can you specify "bad".
Updated•13 years ago
|
Keywords: dev-doc-needed
Comment 3•13 years ago
|
||
This is the W3C doc: http://dev.w3.org/html5/spec/dnd.html#the-dropzone-attribute
Comment 5•13 years ago
|
||
(Use whatwg spec for implementation http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#the-dropzone-attribute)
Hmm, it was long ago when I was looking at this.
It is that the API is kind of packed into one attribute, and there is no easy
way to change just certain parts of the attribute value. Sure it is DOMSettableTokenList, but
one needs to iterate through all the values to change them.
Also, it is [PutForwards=value] readonly attribute DOMSettableTokenList dropzone; and
PutForwards is always quite horrible API.
But in general, whenever implementing something from a spec you'll find bugs in the spec.
I basically think that PutForwards is generally always a bad API which should be restricted to legacy behavior.
The spec generally seemed like a good approach. But I haven't reviewed any details.
Olli: What do you mean by that you have to iterate through all attributes of a DOMSettableTokenList. The API was designed specifically so that you can add/remove/flip values without having to do that.
Comment 8•13 years ago
|
||
I mean it is too hard to know which all string: or file: types are supported.
One needs to either check each thinkable value with
dropzone.contains("file:" + type)
or iterate the list and cut file: and string: values from the actual values.
It is use of string: and file: prefixes which makes the API somewhat ugly.
Blocks: html5test
Comment 9•12 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #8)
> I mean it is too hard to know which all string: or file: types are supported.
> One needs to either check each thinkable value with
> dropzone.contains("file:" + type)
> or iterate the list and cut file: and string: values from the actual values.
> It is use of string: and file: prefixes which makes the API somewhat ugly.
I don't think the spec will change much on that regard. So either, it should be implemented as specced, or you may want to propose a better solution on the WHATWG mailing list.
Comment 10•9 years ago
|
||
We (Blink) are planning to remove our implementation of webkitdropzone [1], and I've started the process of removing dropzone from the HTML specification [2].
Based on this bug's status, it seems like you're not implementing the attribute right now. Is this correct?
Thank you!
[1] https://groups.google.com/a/chromium.org/d/topic/blink-dev/rdGvTDPU7mM/discussion
[2] https://github.com/whatwg/html/issues/2331
Comment 11•8 years ago
|
||
This has been dropped from the spec.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•