title: Cocoa WebView and HTML5 Drag and Drop
body: <p>My Fellow Community - I am in some need of assistance here. I am certain this is something simple, but am just missing the mark. So please help. </p>
  
  <p><strong>Scenario:</strong><br>
  On Mac OS X 10.7 or greater, I have a webview as a browser. In that webview I navigate to Gmail. In Gmail I compose a message and then drag and drop one or more files into the compose box.</p>
  
  <p><strong>Actual Results:</strong><br>
  The pasteboard has NSURL object(s) and the webview simply takes the absolute string value and pastes it into the composed message body. For other edit areas like the search bar and such this behavior is accepted.</p>
  
  <p><strong>Desired Results:</strong><br>
  It is desired that the drag triggers the HTML5 when mousing over and the drop will trigger the proper javascript to upload the files. This behavior is consistent with how FireFox, Safari, and OmniWeb perform.</p>
  
  <p>How do I get this same consistent behavior / What do I need to implement?</p>
  
  <p><strong>What I have tried so far:</strong>  </p>
  
  <ul>
  <li>Using the WebView Editing Delegate I tried replacing the markup in the DOMRange  </li>
  <li>I subclassed WebView to override performDragging: and modify the DraggingSource pasteboard  </li>
  <li>Turned on LocalStorage using the WebView preferences private methods</li>
  </ul>
  
  <p><strong>Note:</strong> The app will be sandboxed and currently is not code signed.</p>
  
  <p>So what am I missing or better yet where do I start and end?</p>
  
  <p><strong>P.S.</strong> I have tried so many things, I didn't want to clutter this question up with the useless code snippets I have tried thus far. However, if solved I will post my results for all others.</p>