Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reading unsanitized data from the async clipboard API #1178

Merged
merged 18 commits into from
Jun 27, 2024
Merged

Conversation

captainbrosset
Copy link
Contributor

@captainbrosset captainbrosset commented Jun 3, 2024

Since Edge/Chrome 122, devs can optionally pass formats when using the Clipboard.read() async API to get the non browser-sanitized version of the data. This is useful for apps that deal with HTML for example.

@github-actions github-actions bot added the feature definition Creating or defining new features or groups of features. label Jun 3, 2024
@captainbrosset
Copy link
Contributor Author

This one has no corresponding keys in BCD, so it's all manual.

@foolip
Copy link
Collaborator

foolip commented Jun 3, 2024

@captainbrosset can you add this to BCD? They BCD path would be api.Clipboard.read.formats_unsanitized_parameter. Search for "options_latencyHint_parameter" for an entry you can copy-paste as a start.

We could still land this without waiting for the BCD change to be merged or released.

@captainbrosset
Copy link
Contributor Author

@captainbrosset can you add this to BCD? They BCD path would be api.Clipboard.read.formats_unsanitized_parameter. Search for "options_latencyHint_parameter" for an entry you can copy-paste as a start.

Adding it in mdn/browser-compat-data#23236

Let's wait for this to ship and then I'll add the compat key here.

captainbrosset and others added 2 commits June 3, 2024 17:52
Co-authored-by: Philip Jägenstedt <philip@foolip.org>
@foolip
Copy link
Collaborator

foolip commented Jun 3, 2024

Let's wait for this to ship and then I'll add the compat key here.

That's OK if you like, but if you want to move faster I'm OK with a TODO here as well.

@captainbrosset
Copy link
Contributor Author

This branch targets another PR branch I've got ongoing. I messed up the merge a little bit, but let's no worry about this for now. In any case, we need to wait for the next BCD bump since I'm using a new BCD key here. Once it's available I'll clean things up here and make the PR target main.

@captainbrosset captainbrosset marked this pull request as draft June 5, 2024 13:18
Base automatically changed from clipboard-supports to main June 6, 2024 08:19
@captainbrosset
Copy link
Contributor Author

I believe the new BCD key that this PR depends on is in BCD 5.5.32, which is about to be added to the repo.

@captainbrosset captainbrosset marked this pull request as ready for review June 18, 2024 07:52
Copy link
Collaborator

@ddbeck ddbeck left a comment

Choose a reason for hiding this comment

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

Excellent. Thank you Patrick!

@ddbeck ddbeck merged commit d5aa515 into main Jun 27, 2024
3 checks passed
@ddbeck ddbeck deleted the unsanitized branch June 27, 2024 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature definition Creating or defining new features or groups of features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants