Skip to content

Replace DOMString with USVString for PresentationRequest URLs. #372

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

Merged
merged 3 commits into from
Nov 23, 2016

Conversation

markafoltz
Copy link
Contributor

Addresses Issue #361: Use USVString for URLs.

@markafoltz
Copy link
Contributor Author

PTAL @annevk who requested the change.

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.

Why for id?

@markafoltz markafoltz changed the title Replace DOMString with USVString for PresentationRequest url and id. Replace DOMString with USVString for PresentationRequest URLs. Nov 21, 2016
@markafoltz
Copy link
Contributor Author

Reverted the ID change.

(It seems unlikely that a unique ID generated by the browser will have a lone surrogate, but let's make that a separate issue.)

@annevk
Copy link
Member

annevk commented Nov 22, 2016

Is the ID transmitted over the wire or serialized in some way? In that case USVString might make sense.

@markafoltz
Copy link
Contributor Author

Yes, it needs to be serializable as it can be sent to a separate receiving user agent over the network. UTF-8 can encode lone surrogates, but we don't require that, so that sounds like a reason for using USVString to provide more flexibility.

@annevk
Copy link
Member

annevk commented Nov 22, 2016

UTF-8 cannot encode lone surrogates. So yes, you should use USVString.

@markafoltz markafoltz merged commit 064f74a into gh-pages Nov 23, 2016
@markafoltz markafoltz deleted the issue-361-usvstring branch November 23, 2016 22:26
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.

2 participants