DOMString 是一个UTF-16字符串。由于JavaScript已经使用了这样的字符串,所以DOMString 直接映射到 一个String。
将 null传递给接受一个DOMString的一个方法或参数通常会引用为“null”。
规范
| Specification | Status | Comment |
|---|---|---|
| Web IDL (Second Edition) DOMString |
Candidate Recommendation | Rephrasing of the definition to remove weird edge cases. |
| Document Object Model (DOM) Level 3 Core Specification DOMString |
Recommendation | No change from Document Object Model (DOM) Level 2 Core Specification |
| Document Object Model (DOM) Level 2 Core Specification DOMString |
Recommendation | No change from Document Object Model (DOM) Level 1 Specification |
| Document Object Model (DOM) Level 1 Specification DOMString |
Recommendation | Initial definition. |