Skip to content

[web] Remove Clipboard API fallback #157484

@ditman

Description

@ditman

The web engine has some logic to be able to copy-paste content from a Flutter app, which is using a now outdated/deprecated API (document.execCommand) as a fallback for browsers that didn't implement the standard API.

We only use the following methods from the standard Clipboard API:

  • writeText, to put content into the users' clipboard (widely available, since Safari 13.4 (~March 2020))
  • readText, to read content from the users' clipboard (widely available, since Firefox 125 (~April 2024))

It seems that soon we'll be able to remove the execCommand fallback, and all the scaffolding to make it work.

See ExecCommand* strategy classes here:

(PS: We should also remove the execCommand definition from the engine's dom.dart!)


Closes: #48581

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: tech-debtTechnical debt, code quality, testing, etc.engineflutter/engine related. See also e: labels.platform-webWeb applications specificallyteam-webOwned by Web platform teamtriaged-webTriaged by Web platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions