Adding event handler attributes cut/copy/paste #699

Closed
wants to merge 1 commit into
from

Conversation

4 participants
@Ritsyy
Collaborator

Ritsyy commented Feb 15, 2016

Adding event handler attributes cut/copy/paste supported on document objects.

Fix https://www.w3.org/Bugs/Public/show_bug.cgi?id=27274.
Tests on http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=3886.

source
+ <td> <code>Event</code>
+ <td> Elements
+ <td> Fired at <code>Document</code> and the action will place the selected data on the
+ clipboard and remove the selection from the document

This comment has been minimized.

@annevk

annevk Feb 16, 2016

Member

This is contradictory. If they only fire on documents, don't mention "Elements" here. Do they only fire on documents though? @hallvors?

@annevk

annevk Feb 16, 2016

Member

This is contradictory. If they only fire on documents, don't mention "Elements" here. Do they only fire on documents though? @hallvors?

This comment has been minimized.

@Ritsyy

Ritsyy Feb 16, 2016

Collaborator

oh sorry that is a mistake, it has to be document. I'll commit the change.
I tried this with this test http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=3886 . I should test on elements too though right?

@Ritsyy

Ritsyy Feb 16, 2016

Collaborator

oh sorry that is a mistake, it has to be document. I'll commit the change.
I tried this with this test http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=3886 . I should test on elements too though right?

@hallvors

This comment has been minimized.

Show comment
Hide comment
@hallvors

hallvors Feb 16, 2016

Do they only fire on documents though? @hallvors?

No, on elements too. Here's a variation on @Ritsyy 's test:
http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=3888

Do they only fire on documents though? @hallvors?

No, on elements too. Here's a variation on @Ritsyy 's test:
http://software.hixie.ch/utilities/js/live-dom-viewer/?saved=3888

@Ritsyy

This comment has been minimized.

Show comment
Hide comment
@Ritsyy

Ritsyy Feb 17, 2016

Collaborator

@annevk Changes done :)

Collaborator

Ritsyy commented Feb 17, 2016

@annevk Changes done :)

source
+ <tr> <!-- copy -->
+ <td> <dfn><code data-x="event-copy">copy</code></dfn>
+ <td> <code>Event</code>
+ <td> Document, Elements

This comment has been minimized.

@annevk

annevk Feb 17, 2016

Member

To be consistent with the rest of the table, it should be Document in <code>, no? (Also below.)

@annevk

annevk Feb 17, 2016

Member

To be consistent with the rest of the table, it should be Document in <code>, no? (Also below.)

This comment has been minimized.

@Ritsyy

Ritsyy Feb 17, 2016

Collaborator

yeah for consistency this would be right.

@Ritsyy

Ritsyy Feb 17, 2016

Collaborator

yeah for consistency this would be right.

source
@@ -8976,6 +8977,7 @@ partial /*sealed*/ interface <dfn>Document</dfn> {
};
<span>HTMLElement</span> implements <span>GlobalEventHandlers</span>;
<span>HTMLElement</span> implements <span>ElementContentEditable</span>;
+<span>HTMLElement</span> implements <span>DocumentAndElementEventHandlers</span>;

This comment has been minimized.

@annevk

annevk Feb 17, 2016

Member

Put this one directly after GlobalEventHandlers?

@annevk

annevk Feb 17, 2016

Member

Put this one directly after GlobalEventHandlers?

This comment has been minimized.

@Ritsyy

Ritsyy Feb 17, 2016

Collaborator

okay will place it after GlobalEventHandlers

@Ritsyy

Ritsyy Feb 17, 2016

Collaborator

okay will place it after GlobalEventHandlers

@annevk

This comment has been minimized.

Show comment
Hide comment
@annevk

annevk Feb 17, 2016

Member

LGTM with those fixed.

Member

annevk commented Feb 17, 2016

LGTM with those fixed.

source
+ <td> <dfn><code data-x="event-copy">copy</code></dfn>
+ <td> <code>Event</code>
+ <td> <code>Document</code> , Elements
+ <td> Fired at <code>Document</code> and the selected data will be copied to the clipboard

This comment has been minimized.

@annevk

annevk Feb 17, 2016

Member

Noticed two more things for these last three.

  1. There should be no space after Document. Otherwise there will be a space before the comma.
  2. The description does not account for the elements firing on elements. Do they actually fire on Document or just bubble up there?
@annevk

annevk Feb 17, 2016

Member

Noticed two more things for these last three.

  1. There should be no space after Document. Otherwise there will be a space before the comma.
  2. The description does not account for the elements firing on elements. Do they actually fire on Document or just bubble up there?

This comment has been minimized.

This comment has been minimized.

@Ritsyy

Ritsyy Feb 17, 2016

Collaborator

@annevk i think it bubbles up. waiting for the correct reply by @hallvors , i am also not sure for it. will remove the space before comma.

@Ritsyy

Ritsyy Feb 17, 2016

Collaborator

@annevk i think it bubbles up. waiting for the correct reply by @hallvors , i am also not sure for it. will remove the space before comma.

This comment has been minimized.

This comment has been minimized.

@Ritsyy

Ritsyy Feb 21, 2016

Collaborator
Fired at Document, elements and the selected data will be copied to the clipboard does this explains the working correctly or it should be something else?
@Ritsyy

Ritsyy Feb 21, 2016

Collaborator
Fired at Document, elements and the selected data will be copied to the clipboard does this explains the working correctly or it should be something else?
source
+ <td> <dfn><code data-x="event-copy">copy</code></dfn>
+ <td> <code>Event</code>
+ <td> <code>Document</code>, Elements
+ <td> Fired at <code>Document</code>, elements and the selected data will be copied to the clipboard

This comment has been minimized.

@annevk

annevk Feb 22, 2016

Member

Based on @hallvors's comment what I think we want here is to only list "Elements" as an interesting target. Document is not a target, it is just able to register a bubbling listener for this event.

Then, the sentence below we say something like "Fired at elements when the user copies data to the clipboard" and something similar for cut/copy below.

Does that help?

@annevk

annevk Feb 22, 2016

Member

Based on @hallvors's comment what I think we want here is to only list "Elements" as an interesting target. Document is not a target, it is just able to register a bubbling listener for this event.

Then, the sentence below we say something like "Fired at elements when the user copies data to the clipboard" and something similar for cut/copy below.

Does that help?

@Ritsyy

This comment has been minimized.

Show comment
Hide comment
@Ritsyy

Ritsyy Feb 22, 2016

Collaborator

@annevk i have changed the content, you are right as the target are elements here.
does it seems fine?

Collaborator

Ritsyy commented Feb 22, 2016

@annevk i have changed the content, you are right as the target are elements here.
does it seems fine?

source
+ <td> <dfn><code data-x="event-cut">cut</code></dfn>
+ <td> <code>Event</code>
+ <td> Elements
+ <td> Fired at elements when the user copies the selected data on the clipboard and remove the

This comment has been minimized.

@annevk

annevk Feb 22, 2016

Member

removes*

@annevk

annevk Feb 22, 2016

Member

removes*

@annevk

This comment has been minimized.

Show comment
Hide comment
@annevk

annevk Feb 22, 2016

Member

LGTM with that typo fixed.

Member

annevk commented Feb 22, 2016

LGTM with that typo fixed.

@Ritsyy

This comment has been minimized.

Show comment
Hide comment
@Ritsyy

Ritsyy Feb 22, 2016

Collaborator

@annevk Fixed

Collaborator

Ritsyy commented Feb 22, 2016

@annevk Fixed

@annevk

This comment has been minimized.

Show comment
Hide comment
@annevk

annevk Feb 22, 2016

Member

Committed as efe130a. Thank you @Ritsyy and @hallvors!

Member

annevk commented Feb 22, 2016

Committed as efe130a. Thank you @Ritsyy and @hallvors!

@annevk annevk closed this Feb 22, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment