Skip to content

Conversation

@roraja
Copy link
Contributor

@roraja roraja commented Jun 23, 2025

Summary

This PR adds a complete specification for the clipboardchange event to the W3C Clipboard API specification, including the missing ClipboardChangeEventInit dictionary and enhanced documentation based on implementation experience and the Microsoft Edge explainer.

The bikeshed rendered version can be verified from here:
https://rohanraja.github.io/cr-clipboard/clipboardchange/spec/#clipboard-event-clipboardchange

Changes

Added ClipboardChangeEventInit Dictionary

  • New: ClipboardChangeEventInit dictionary with types sequence parameter
  • Documentation: Clear specification of available mandatory data types on system clipboard
  • Security: Explicit exclusion of custom data types to prevent fingerprinting

Enhanced ClipboardChangeEvent Interface

  • Improved: Detailed documentation for the types attribute behavior
  • Clarified: Event firing conditions and focus requirements
  • Added: Constructor steps algorithm following W3C specification patterns

Implementation Status

Related Documentation

Testing

The specification includes comprehensive examples that can be used for:

  • Web Platform Tests (WPTs) development
  • Cross-browser compatibility validation
  • Security and privacy testing scenarios

Security & Privacy Considerations

  • No permissions required: Event only exposes data types, not contents
  • Fingerprinting mitigation: Custom data types excluded from event payload
  • Focus-gated: Events only fire when document has focus
  • Privacy-preserving: No clipboard contents exposed in event

Contacts: roraja@microsoft.com, ragoulik@microsoft.com

Fixes #230

For normative changes, the following tasks have been completed:

  • Editing WG resolution on the proposed changes, with at least two implementers participating and not objecting:
    • WebKit
    • Chromium
    • Gecko

Preview | Diff

@roraja roraja marked this pull request as draft June 23, 2025 05:42
@roraja roraja marked this pull request as ready for review July 8, 2025 04:27
@roraja roraja added the Agenda+ label Aug 12, 2025
@roraja roraja changed the title Add comprehensive clipboardchange event specification with ClipboardChangeEventInit dictionary Add comprehensive clipboardchange event API specification Nov 14, 2025
@roraja roraja requested a review from johanneswilm November 14, 2025 02:36
@johanneswilm johanneswilm merged commit ab5f530 into w3c:main Nov 24, 2025
2 checks passed
github-actions bot added a commit that referenced this pull request Nov 24, 2025
SHA: ab5f530
Reason: push, by johanneswilm

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions bot added a commit to dizzydaizy/clipboard-apis that referenced this pull request Nov 24, 2025
SHA: ab5f530
Reason: push, by pull[bot]

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@NAME-sovsec
Copy link

@johanneswilm
Copy link

TPAC 2025:

Resolution is to include the feedback from Anne
And adopt the resolution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposal: Identifying whether the clipboard has changed without re-reading it Add privacy considerations for the clipboardchange event

6 participants