How does chrome handle ondrag/drop events from outside the browser?

676 views
Skip to first unread message

Coz

unread,
Mar 15, 2011, 10:58:58 PM3/15/11
to Chromium-extensions
Question: What is the event thats fired when a file is dragged and
dropped on a chrome window?

I have been unsuccessful in finding out how to capture the event that
fires when a file is dragged onto the chrome browser.

Different file types trigger different outputs. If I drag an txt file,
chrome will open the txt file, if I drag and drop a mp3 onto a chrome
window it will trigger the mp3 to play.

What event is fired? I tried creating a content_script that adds a
ondrag* event listener to the body of every page, but it doesn't seem
to fire.

If anyone can shed some light on this or even point me to an extension
that works with this type of event, that would be uber appreciated.


Cheers,

Coz

Arne Roomann-Kurrik

unread,
Mar 16, 2011, 11:27:13 AM3/16/11
to Coz, Chromium-extensions
Hopefully you'll find this useful: http://www.html5rocks.com/tutorials/dnd/basics/

~Arne



--
You received this message because you are subscribed to the Google Groups "Chromium-extensions" group.
To post to this group, send email to chromium-...@chromium.org.
To unsubscribe from this group, send email to chromium-extens...@chromium.org.
For more options, visit this group at http://groups.google.com/a/chromium.org/group/chromium-extensions/?hl=en.


Reply all
Reply to author
Forward
0 new messages