DOMString
DOMString
є 16-бітовою послідовністю безнакових цілих, типово інтерпретуєтьсят як UTF-16 code units. Це точно відповідає до JavaScript примітивному типу String. Коли DOMString
застосовється у JavaScript, це напряму відображує відповідну String
.
When a Web API accepts a DOMString
, the value provided will be stringified, using the ToString
abstract operation. (For types other than Symbol, this has the same behavior as the String()
function.)
Certain Web APIs accepting a DOMString
have an additional legacy behavior, where passing null
stringifies to the empty string instead of the usual "null"
.
Специфікації
Specification | Status | Comment |
---|---|---|
Web IDL The definition of 'DOMString' in that specification. |
Candidate Recommendation | |
Web IDL | Candidate Recommendation | This defines how JavaScript values are converted to DOMString and vice versa. |
Також дивися:
- JavaScript
String
USVString
(en-US)CSSOMString
(en-US)- Binary strings