Constructor for DataTransfer

The new asynchronous clipboard API makes use of DataTransfer objects and has a need to be able to construct new ones. For example (with new clipboard api): var data = new DataTransfer(); data.items.add("\(°o°)/", "text/plain"); navigator.clipboard.write(data).then(function() { console.log(“Copied to clipboard successfully! ᕕ( ᐛ )ᕗ”); }, function() { console.error(“Unable to write to clipboard. (╯ಠ_ಠ)╯︵ ┻━┻”); });

Demo

Documentation

Specification

Editor's draft

Status in Chromium

Blink>DataTransfer


In development (tracking bug)

Consensus & Standardization

  • No public signals
  • No public signals
  • No public signals
  • No signals

Owner

Last updated on 2017-06-14