Update DOMString to USVString?

Hello,

In many places in MDN, the term DOMString is used when the spec is using USVString. It seems that USVString is a subset of DOMString which doesn’t allow (?) unpaired unicode code points.

Also CSSOM specs seem to use the term CSSOMString to which could mean either DOMString or USVString. MDN lists CSSOMString also as DOMString.

So I was wondering if these need to be updated or are they good as is?

1 Like

Oh absolutely — if you see any instances that are out of date and still say DOMString when the spec is using USVString, feel free to change them. USVString is a fairly recent spec construct, and it has taken a while to get all the relevant spec instances migrated over.

I’ve dealt with a number of small bugs in the last couple of years along the lines of “Update method x to use USVString instead of DOMString”

Cool, thanks. Does it make sense to use CSSOMString too, when the spec is saying so?

Yes, definitely. The pages should be updated to the latest spec features, and then browser differences accounted for in the compat tables.

1 Like

We should also make sure that CSSOMString is documented. I mean, it’s just a typedef off of USVString, but that should be explained somewhere.

Eric Shepherd

Senior Technical Writer, MDN

MDN: https://developer.mozilla.org/

Blog: https://www.bitstampede.com/