Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 470295 of DOMString

  • Revision slug: Web/API/DOMString
  • Revision title: DOMString
  • Revision id: 470295
  • Created:
  • Creator: fusionchess
  • Is current revision? No
  • Comment

Revision Content

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

Passing null to a method or parameter accepting a DOMString stringifis to "null".

Specifications

Specification Status Comment
{{SpecName('WebIDL', '#DOMString', 'DOMString')}} {{Spec2('WebIDL')}} Rephrasing of the definition to remove weird edge cases.
{{SpecName('DOM3 Core', 'core.html#DOMString', 'DOMString')}} {{Spec2('DOM3 Core')}} No change from {{SpecName('DOM2 Core')}}
{{SpecName('DOM2 Core', 'core.html#ID-C74D1578', 'DOMString')}} {{Spec2('DOM2 Core')}} No change from {{SpecName('DOM1')}}
{{SpecName('DOM1', 'level-one-core.html#ID-C74D1578', 'DOMString')}} {{Spec2('DOM1')}} Initial definition.

See also

Revision Source

<p>A UTF-16 String. As JavaScript already uses such strings, <code>DOMString</code> is mapped directly to a <code><a href="/en/JavaScript/Reference/Global_Objects/String" title="En/JavaScript/Reference/Global_Objects/String">String</a></code>.</p>
<p>Passing <code>null</code> to a method or parameter accepting a <code>DOMString</code> stringifis to <code>"null"</code>.</p>
<h2 id="Specification" name="Specification">Specifications</h2>
<table class="standard-table">
  <tbody>
    <tr>
      <th scope="col">Specification</th>
      <th scope="col">Status</th>
      <th scope="col">Comment</th>
    </tr>
    <tr>
      <td>{{SpecName('WebIDL', '#DOMString', 'DOMString')}}</td>
      <td>{{Spec2('WebIDL')}}</td>
      <td>Rephrasing of the definition to remove weird edge cases.</td>
    </tr>
    <tr>
      <td>{{SpecName('DOM3 Core', 'core.html#DOMString', 'DOMString')}}</td>
      <td>{{Spec2('DOM3 Core')}}</td>
      <td>No change from {{SpecName('DOM2 Core')}}</td>
    </tr>
    <tr>
      <td>{{SpecName('DOM2 Core', 'core.html#ID-C74D1578', 'DOMString')}}</td>
      <td>{{Spec2('DOM2 Core')}}</td>
      <td>No change from {{SpecName('DOM1')}}</td>
    </tr>
    <tr>
      <td>{{SpecName('DOM1', 'level-one-core.html#ID-C74D1578', 'DOMString')}}</td>
      <td>{{Spec2('DOM1')}}</td>
      <td>Initial definition.</td>
    </tr>
  </tbody>
</table>
<h2 id="See_also">See also</h2>
<ul>
  <li><a href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/String" title="/en-US/docs/Web/API/DOMString">String</a></li>
  <li><a href="/en-US/docs/Web/JavaScript/Typed_arrays/String_view" title="/en-US/docs/Web/JavaScript/Typed_arrays/String_view"><code>StringView</code> – a C-like representation of strings based on typed arrays</a></li>
  <li><a href="https://developer.mozilla.org/en-US/docs/Web/API/DOMString/Binary">Binary strings</a></li>
</ul>
Revert to this revision