To add drag & drop support to your Klip, first set a drop handler function in your
onLoad() handler:
Klip.onDrop = myDrop;
Then create the drop handler function in your Klip. The drop handler function should have one parameter, which is the URL of the dropped object.Here's an example drop handler function from the
Bookmarks Klip:
function myDrop(url)
{
if((url.indexOf("http://") != -1) || (url.indexOf("https://") != -1))
{
gBookmark.value = url;
Klip.requestRefresh();
}
}
The function checks to make sure that the link contains either "http://" or "https://", then calls
Klip.requestRefresh() to add the URL to the Klip.