Closed johanneswilm closed 7 years ago
Right. What about the dataTransfer object? Should we keep that? In some ways it seems to be similar to clipboard operations.
From @choniong on August 24, 2016 15:58
I would imagine we could have:
dataTransfer=NULL
for both deleteByDrag
and deleteByCut
, anddataTransfer=|data to insert|
for insertFromDrop
and insertFromPaste
.Does that sounds reasonable?
But for 2.
, should dataTransfer
be the
e.g. The raw data could be <meta charset='utf-8'><h1 style="........">header</h1>
, but the fragment being actually inserted could be just <h1>header</h1>
.
I would vote for 1. Raw data
since JS could put their own stuff, but this might not be consistence with beforeinput
's definition?
Hey, yes, it definitely needs to be 1 as the JS may decide to do something completely different with it and it should have access to the most "original" version of the data available.
Did you guys come to a conclusion on whether or not we can create both the dragend- and drop-based beforeinput events? If I recall correctly the plan was for the Chrome team to check their source code on whether it's viable to have both events.
From @choniong on August 24, 2016 15:17
We should use the name
deleteByDrag
&insertFromDrop
to make it clear that the event is only for DOM modification. (e.g. PreventingdeleteByDrag
won't stop thedrag&drop
process)Background: Assume we all agree that
InputEvent
should only focus on DOM modification https://github.com/w3c/editing/issues/144#issuecomment-240892363, and we are renamingcut
&paste
todeleteByCut
&insertFromPaste
.Copied from original issue: w3c/editing#147