Timo Willemsen
Timo Willemsen

Reputation: 8857

In the W3 DOM specifications, what is the difference between String and DOMString

So yeah, basically what is the difference between DOMString and String?

Upvotes: 4

Views: 802

Answers (2)

Starhowl
Starhowl

Reputation: 444

DOMString is a UTF-16 String. As JavaScript already uses such strings, DOMString is mapped directly to a String.

Mozilla Foundation

Upvotes: 0

Demian Brecht
Demian Brecht

Reputation: 21368

W3C:

For Java and ECMAScript, DOMString is bound to the String type because both languages also use UTF-16 as their encoding.

So, in terms of client-side stuff, I assume that there is no difference as DOMString is the equivalent of a String.

Upvotes: 5

Related Questions