[Bug 26790] New: document.execCommand('cut'/'copy'/'paste') should trigger corresponding events

https://www.w3.org/Bugs/Public/show_bug.cgi?id=26790

            Bug ID: 26790
           Summary: document.execCommand('cut'/'copy'/'paste') should
                    trigger corresponding events
           Product: WebAppsWG
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTML Editing APIs
          Assignee: ayg@aryeh.name
          Reporter: hsteen@mozilla.com
        QA Contact: sideshowbarker+html-editing-api@gmail.com
                CC: mike@w3.org, public-webapps@w3.org

The spec currently says in a red frame "We don't fire events for
copy/cut/paste/undo/redo/selectAll because they should all have their own
events".

The copy, cut and paste commands should trigger the corresponding events - this
is what IE does, and the Clipboard API spec builds functionality on this
detail. Specifically, we do not allow direct writing to the clipboard, but a
script can listen to for example a copy event and modify the content that will
end up on the clipboard, then use document.execCommand('copy') in
user-triggered threads to trigger the event. See
http://dev.w3.org/2006/webapi/clipops/clipops.html

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Saturday, 13 September 2014 20:28:56 UTC