Replies: 2 comments 2 replies
-
Big +1 👍 I strongly support making this change. |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
@foolip is it still relevant? There are many |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
DOMString,ByteStringandUSVStringare defined by Web IDL as strings with varying restrictions, whileCSSOMStringis defined as eitherDOMStringorUSVString, to allow for implementations that use either UTF-8 or UTF-16 internally.From the perspective of JavaScript and web developers, there are just strings:
DOMStringis just aStringby another name.ByteStringhas the additional requirement that no code point is larger than 255 and is used mainly for HTTP headers. The following throws aTypeErrorbecause of this:USVStringhas the additional requirement that there are no lone surrogates, and is used a lot for URLs. Lone surrogates are replaced with U+FFFD in APIs that accept USVString.CSSOMStringis just a type alias, so it might behave likeUSVString, or it might not.These distinctions rarely matter, and I'm proposing that MDN simply talks about strings in most cases.
Aside: There's an unfortunate number of references to "DOMString objects", "USVString object", etc. There aren't objects, they're strings :)
Beta Was this translation helpful? Give feedback.
All reactions