On Tue, May 3, 2011 at 3:20 AM, Hallvord R. M. Steen <hallvord@opera.com>wrote:
> On Tue, 03 May 2011 07:10:10 +0900, Joćo Eiras <joao.eiras@gmail.com>
> wrote:
>
> event.clipboardData.getDocumentFragment()
>>>
>>> which would return a parsed and when applicable sanitized view of any
>>> markup the implementation supports from the clipboard.
>>>
>>
> This is already covered by doing x=createElement;x.innerHTML=foo;traverse
>> x
>>
>
> Of course it is. The point was simply to see if there was interest in
> possibly optimising away an extra serialize->parse roundtrip, if developers
> feel it would be more convenient to get the DOM right away rather than the
> markup.
This sounds good to me. There are good use-cases and it I believe it would
be fairly straightforward to implement. What would getDocumentFragment do if
there is no text/html content on the clipboard? I'm OK with saying it just
returns null or undefined.
Ojan