Skip to content

Conversation

@EdgarChen
Copy link

@EdgarChen EdgarChen commented May 5, 2025

Fixes #236.

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: It already behaves this way.
    • Chromium: It already behaves this way.
    • Gecko: It already behaves this way.
  • For browsers that are shipping the feature, implementation bugs are filed for the proposed changes (link to bug, or write "Not Implementing"):

    • WebKit: N/A
    • Chromium: N/A
    • Gecko: N/A

Preview | Diff

@EdgarChen
Copy link
Author

The markup error should be fixed by #234.

Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

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

You removed task queueing, but you cannot resolve or reject promises while in parallel without queueing a task first.

@EdgarChen
Copy link
Author

You removed task queueing, but you cannot resolve or reject promises while in parallel without queueing a task first.

Oh, right, I added it back. Thank you.

@EdgarChen EdgarChen requested a review from annevk May 15, 2025 20:05
Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

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

The commit message body could explain a bit more about why this change is being made.

1. Abort these steps.

1. [=Reject=] |p| with {{"NotFoundError"}} {{DOMException}} in |realm|.
1. Resolve |p| with empty string.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
1. Resolve |p| with empty string.
1. Resolve |p| with the empty string.

1. If |mimeType|'s [=MIME type/essence=] is "`text/plain`":

1. If |representation|'s [=representation/MIME type=] [=MIME type/essence=] is "text/plain", then:
1. Resolve |p| with |systemClipboardRepresentation|'s [=system clipboard representation/data=].
Copy link
Member

Choose a reason for hiding this comment

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

[=system clipboard representation/data=] can be a string or a blob, right? But we want to always return a string. How is that going to work now?

Copy link

@Gae24 Gae24 Jul 4, 2025

Choose a reason for hiding this comment

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

Actually, data is defined as a sequence of bytes. So, should we always return the result of [=UTF-8 decoding=] data's bytes?

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.

Clarifying clipboard.readText() behaviour

3 participants