Skip to content

Adopt lazy getType() as preferred approach for Selective Clipboard Format Read#1254

Open
ashishkum-ms wants to merge 4 commits intoMicrosoftEdge:mainfrom
ashishkum-ms:user/ashishkum/update-sfr-explainer
Open

Adopt lazy getType() as preferred approach for Selective Clipboard Format Read#1254
ashishkum-ms wants to merge 4 commits intoMicrosoftEdge:mainfrom
ashishkum-ms:user/ashishkum/update-sfr-explainer

Conversation

@ashishkum-ms
Copy link
Contributor

Summary

This PR restructures the Selective Clipboard Format Read explainer to present the lazy getType() approach as the preferred solution, based on W3C Clipboard APIs Working Group discussions.

Changes

  • Present both approaches with detailed examples and tradeoffs
  • Add "Preferred Approach" section explaining why lazy getType() was chosen
  • Clarify security model: permission/focus checks at read() time, not getType()

@ashishkum-ms ashishkum-ms marked this pull request as ready for review February 17, 2026 09:47
@ashishkum-ms ashishkum-ms requested a review from Copilot February 17, 2026 09:48
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Selective Clipboard Format Read explainer to present two alternative designs side-by-side and to frame the lazy ClipboardItem.getType() model as the preferred approach, reflecting the referenced W3C working group discussion.

Changes:

  • Reorganizes the explainer into “Approach 1” (add types to read()) and “Approach 2” (lazy OS read on getType()), with updated examples and boundary scenarios.
  • Adds a “Preferred Approach” section arguing for lazy getType() as the recommended direction.
  • Updates the security discussion to describe when permission/focus/user-activation checks occur in the lazy model.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ashishkum-ms ashishkum-ms force-pushed the user/ashishkum/update-sfr-explainer branch from 7a2b318 to 6dcd6ae Compare February 17, 2026 09:54
@ashishkum-ms ashishkum-ms force-pushed the user/ashishkum/update-sfr-explainer branch from fed6e91 to 3fac037 Compare February 18, 2026 05:17
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.

3 participants