Skip to content

Add comprehensive clipboardchange event API specification - #239

Merged
johanneswilm merged 11 commits into
w3c:mainfrom
roraja:clipboardchange/spec
Nov 24, 2025
Merged

johanneswilm merged 11 commits into
w3c:mainfrom
roraja:clipboardchange/spec

Conversation

@roraja

@roraja roraja commented Jun 23, 2025 •

Copy link
Copy Markdown
Contributor

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
Comment thread index.bs Outdated
Comment thread index.bs Outdated
Comment thread index.bs Outdated
Comment thread index.bs Outdated
Comment thread index.bs Outdated
Comment thread index.bs Outdated
Comment thread index.bs Outdated
Comment thread index.bs Outdated
Comment thread index.bs Outdated
@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
Copy Markdown

@johanneswilm

Copy link
Copy Markdown

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

None yet

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