Minor change to draft API

6 views
Skip to first unread message

James Hawkins

unread,
Nov 5, 2011, 2:49:48 PM11/5/11
to web-i...@googlegroups.com
I made a slight change to the draft API at [1].  I modified the |type| attribute to be a ContentTypes instead of ContentType.

ContentTypes [2] is a comma-separated list of media types.

One use case for this change is an image editor that would ideally register for image/* but cannot due to limitations in the libraries used to encode/decode images; therefore, they will now register for, e.g., "image/png, image/jpeg"


Thanks,
James

Paul Kinlan

unread,
Nov 5, 2011, 5:36:48 PM11/5/11
to web-i...@googlegroups.com
This is Cool.  If this is represented in the DOM as a DOMTokenList then it should space separated?
--
Paul Kinlan
Developer Advocate @ Google for Chrome and HTML5

James Hawkins

unread,
Nov 6, 2011, 11:33:59 AM11/6/11
to web-i...@googlegroups.com
Rachel suggested DOMTokenList, which prompted me to go in and change the draft; however, I noticed that [2] already had a list version of MIME types, so I think it's probably best to not create a new version of 'list of MIME types'.  Does DOMTokenList definitely not work with CSV?

Rachel Blum

unread,
Nov 6, 2011, 8:22:05 PM11/6/11
to web-i...@googlegroups.com
Yep - DOMTokenList is space-separated only. I'm not sure the IDL natively supports lists of comma-separated items, so I guess it would become a simple string type.

Rachel
Reply all
Reply to author
Forward
0 new messages