DOMString
DOMString은 UTF-16 문자열을 위한 독립적으로 구현된 DOM 인터페이스이다.
JavaScript 문자열은 이미 UTF-16 문자열이므로 JavaScript의 모든 인스턴스 String는 자동으로 DOMString 인스턴스이기도 하다.
DOMString 허용하는 특정 Web API의 경우, ToString으로 문자열화한다.
DOMString 허용하는 특정 Web API의 경우, null일 때, "null" 대신 빈문자열을 전달하는 레거시 동작이 있다.
오.. 충격적 사실.
참고
https://www.w3.org/TR/DOM-Level-3-Core/core.html#DOMString
Document Object Model Core
1.1.1 The DOM Structure Model The DOM presents documents as a hierarchy of Node objects that also implement other, more specialized interfaces. Some types of nodes may have child nodes of various types, and others are leaf nodes that cannot have anything b
www.w3.org
https://developer.mozilla.org/en-US/docs/Web/API/DOMString
DOMString - Web APIs | MDN
A DOMString is a sequence of 16-bit unsigned integers, typically interpreted as UTF-16 code units. This corresponds exactly to the JavaScript primitive String type. When a DOMString is provided to JavaScript, it maps directly to the corresponding St
developer.mozilla.org
https://stackoverflow.com/questions/35123890/what-is-a-domstring-really
What is a DOMString really?
I came across DOMString while reading the HTML spec. On some research, found the following data regarding it: From MDN: DOMString is a UTF-16 String. As JavaScript already uses such strings,
stackoverflow.com