Note: There are a few cases of duplicates in user autocompletion which are being worked on.

Implement dropzone content attribute

NEW
Unassigned

Status

()

Core
DOM: Core & HTML
--
enhancement
6 years ago
6 days ago

People

(Reporter: Ryosuke Niwa, Unassigned)

Tracking

(Blocks: 2 bugs, {dev-doc-needed})

Trunk
dev-doc-needed
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

6 years ago
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

6 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.)

Updated

5 years ago
Blocks: 568516

Comment 2

5 years ago
Can you specify "bad".
Keywords: dev-doc-needed

Comment 3

5 years ago
This is the W3C doc: http://dev.w3.org/html5/spec/dnd.html#the-dropzone-attribute

Comment 4

5 years ago
Olli - can you say more about what the issues with the spec are?

Comment 5

5 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

5 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: 802882

Comment 9

4 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

6 months 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
You need to log in before you can comment on or make changes to this bug.