GithubHelp home page GithubHelp logo

Comments (3)

quisido avatar quisido commented on June 2, 2024 1

This should be resolved in 1.0.4, where it will now fail silently if readText is not supported. Even TypeScript's clipboard interface does not correctly identify that readText is optional. 😵

Thank you so much for the report!

from use-clippy.

quisido avatar quisido commented on June 2, 2024

Thanks for the report! That is an interesting error. For documentation's sake, Mozilla's definition of the Clipboard API explicitly defines navigator.clipboard.readText.

Can you share the following by manually executing it in your Firefox console?

console.log(navigator.clipboard);

from use-clippy.

sangdth avatar sangdth commented on June 2, 2024

@CharlesStover I don't trust their documentation.
Here is the screenshot, I can not copy the object, it always gives me an empty object.
Screenshot 2019-10-09 at 20 54 16

Btw, the readText is not there.

console.log(typeof navigator.clipboard.readText)
>> undefined

For example, in here they stated that the permission query options available, but in reality, if you call navigator.permissions.query({ name: "clipboard-read" }) it will throw an exception.

from use-clippy.

Related Issues (19)

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.