Git Product home page Git Product logo

Comments (3)

garykac avatar garykac commented on July 20, 2024 1

Proposal: https://docs.google.com/document/d/1sMcajoYAQ_M_VOIn1RLokG1sVB7skjoeviqt9aZOcDk/edit

from clipboard-apis.

alecazam avatar alecazam commented on July 20, 2024

There is no way to specify that an item has multiple flavors/representations on the clipboard. mozGetDataAt and mozSetDataAt got this correct with an index that was in common across the flavors of a given item. This is also reflective of the native clipboard API. Adding a series of flavors to the clipboard as individual items of a DataTransfer object doesn't help the receiver determine if they're a flavor or unique item. Electron has a similar problem with only support for single item, multiple flavors.

Examples:
items: foo.png foo.jpg <- single item, two flavors
items: foo.png bar.jpg <- multiple items, two unique items
items: foo.png foo.jpg, bar.png bar.jpg <- multiple items, two flavors of the each item

In the DataTransfer item list, and index is needed to collect items.
item[0] item[1]
index: 0 index: 0 <- this is what is missing
name: foo.png name: foo.jpg <- flavors of same content
blob/file blob/file

from clipboard-apis.

rniwa avatar rniwa commented on July 20, 2024

Right. We need a better API which differentiates the flavor/representation of an item in the native clipboard from distinct entires/items in them.

from clipboard-apis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.