<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>170168</bug_id>
          
          <creation_ts>2017-03-27 22:52:30 -0700</creation_ts>
          <short_desc>Implement the DataTransfer constructor</short_desc>
          <delta_ts>2024-08-28 07:38:53 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>HTML Editing</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>215837</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Domenic Denicola">d</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>andersca</cc>
    
    <cc>annevk</cc>
    
    <cc>ap</cc>
    
    <cc>bdakin</cc>
    
    <cc>boyer.jonathan</cc>
    
    <cc>jimmy</cc>
    
    <cc>rniwa</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1291807</commentid>
    <comment_count>0</comment_count>
    <who name="Domenic Denicola">d</who>
    <bug_when>2017-03-27 22:52:30 -0700</bug_when>
    <thetext>Spec change: https://github.com/whatwg/html/commit/688a102b52c7050a6808a05c5d8fe149c0937fd7
Tests: http://w3c-test.org/html/editing/dnd/datastore/datatransfer-constructor-001.html

This is part of a larger feature for async clipboard APIs; see discussion in https://github.com/w3c/clipboard-apis/issues/33. But it can be implemented independently.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1601834</commentid>
    <comment_count>1</comment_count>
    <who name="Jonathan">boyer.jonathan</who>
    <bug_when>2019-12-30 01:13:39 -0800</bug_when>
    <thetext>This constructor will also allow the instanciation of a FileList (it currently works on Firefox / Chromium)

Without this API it&apos;s impossible to create a FileList from a File array 

  const data = new DataTransfer() // This is not working on webkit
  files.forEach(file =&gt; data.items.add(file))
  return data.files</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1680694</commentid>
    <comment_count>2</comment_count>
    <who name="Jimmy Wärting">jimmy</who>
    <bug_when>2020-08-16 15:42:39 -0700</bug_when>
    <thetext>The only real usecase i see with having a DataTransfer constructor is having a way to update that damm input[type=file] with another FileList item. 

there is no way of getting it in safari...

new ClipboardEvent(&apos;paste&apos;).clipboardData
new DragEvent(&apos;drag&apos;).dataTransfer
new DataTransfer()


https://github.com/whatwg/html/issues/3269</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2010485</commentid>
    <comment_count>3</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2024-02-04 06:22:39 -0800</bug_when>
    <thetext>WPT Test Case: https://wpt.fyi/results/html/editing/dnd/datastore/datatransfer-constructor-001.html?label=experimental&amp;label=master&amp;aligned=

WPT Test Case Live Link - http://wpt.live/html/editing/dnd/datastore/datatransfer-constructor-001.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2055938</commentid>
    <comment_count>4</comment_count>
    <who name="Anne van Kesteren">annevk</who>
    <bug_when>2024-08-28 07:38:53 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 215837 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>