Skip to content

Add support for cross-origin cross-tab copy and paste #2496

Description

@gonfunko

Check for duplicates

  • I have searched for similar issues before opening a new one.

Component

cross-tab copy paste

Problem

No response

Request

The cross-tab copy-paste plugin currently only works for sites on the same domain, since it uses localstorage to persist serialized blocks, which has a same origin policy enforced by the browser. It would be nice if it were possible to copy blocks across domains; most likely this would require coordination/allowlisting specific domains and communicating over postMessage, but it should in theory be possible as an additional option. One usecase (staging vs prod environments) was outlined here: https://groups.google.com/g/blockly/c/qK_jP9mG_pw.

Alternatives considered

  • Consider using system clipboard using old tricks to copy with a hidden text field
  • Consider using new clipboard web apis

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status
    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions