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

docs typo error (useClipboardItems) #4370

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ShangChien
Copy link

@ShangChien ShangChien commented Nov 28, 2024

Description:

Fixed an error in the usage of the Blob constructor when creating a ClipboardItem.
The original code nested { type: mime } in Array, which resulted in improperly generated Blob content.

Change:

modify

new ClipboardItem({
    [mime]: new Blob(['\'<b>HTML content</b>\'', { type: mime }]),
})

to

new ClipboardItem({
    [mime]: new Blob([`<b>HTML content</b>`], { type: mime }),
})

…when creating a ClipboardItem. The original code used an incorrect string format, which resulted in improperly generated Blob content.
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. documentation Improvements or additions to documentation labels Nov 28, 2024
@ShangChien ShangChien changed the title docs typo error: Fixed an error in the usage of the Blob constructor when creating a ClipboardItem. The original code used an incorrect string format, which resulted in improperly generated Blob content. docs typo error (useClipboardItems) Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant