module-barejs_polyfill.Symbol.html 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>JSDoc: Class: Symbol</title>
  6. <script src="scripts/prettify/prettify.js"> </script>
  7. <script src="scripts/prettify/lang-css.js"> </script>
  8. <!--[if lt IE 9]>
  9. <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  10. <![endif]-->
  11. <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
  12. <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
  13. </head>
  14. <body>
  15. <div id="main">
  16. <h1 class="page-title">Class: Symbol</h1>
  17. <section>
  18. <header>
  19. <h2><span class="attribs"><span class="type-signature"></span></span>
  20. <span class="ancestors"><a href="module-barejs_polyfill.html">barejs/polyfill</a>.</span>Symbol<span class="signature">(_description<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h2>
  21. </header>
  22. <article>
  23. <div class="container-overview">
  24. <h4 class="name" id="Symbol"><span class="type-signature"></span>new Symbol<span class="signature">(_description<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
  25. <div class="description">
  26. <p>Create a &quot;<a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol">Symbol</a>&quot; which is
  27. actually just a string (so it works &quot;like&quot; a Symbol in older environments).
  28. Symbol is never used with new, it is meant to be invoked as a creator function:</p>
  29. <pre class="prettyprint source"><code> var key = Symbol( &quot;description&quot; );
  30. var obj = {};
  31. obj[key] = &quot;value&quot;;</code></pre>
  32. </div>
  33. <h5>Parameters:</h5>
  34. <table class="params">
  35. <thead>
  36. <tr>
  37. <th>Name</th>
  38. <th>Type</th>
  39. <th>Attributes</th>
  40. <th class="last">Description</th>
  41. </tr>
  42. </thead>
  43. <tbody>
  44. <tr>
  45. <td class="name"><code>_description</code></td>
  46. <td class="type">
  47. <span class="param-type">string</span>
  48. </td>
  49. <td class="attributes">
  50. &lt;optional><br>
  51. </td>
  52. <td class="description last"><p>Optional: a description of the Symbol that will provide a hint of what the
  53. Symbol is for. Only for debug, does not affect the actual Symbol in any way.</p></td>
  54. </tr>
  55. </tbody>
  56. </table>
  57. <dl class="details">
  58. <dt class="tag-source">Source:</dt>
  59. <dd class="tag-source"><ul class="dummy"><li>
  60. <a href="polyfill_Symbol.js.html">polyfill/Symbol.js</a>, <a href="polyfill_Symbol.js.html#line15">line 15</a>
  61. </li></ul></dd>
  62. </dl>
  63. <h5>Throws:</h5>
  64. <dl>
  65. <dt>
  66. <div class="param-desc">
  67. <p>Throws a TypeError if used as a constructor (with new).</p>
  68. </div>
  69. </dt>
  70. <dd></dd>
  71. <dt>
  72. <dl>
  73. <dt>
  74. Type
  75. </dt>
  76. <dd>
  77. <span class="param-type">TypeError</span>
  78. </dd>
  79. </dl>
  80. </dt>
  81. <dd></dd>
  82. </dl>
  83. </div>
  84. </article>
  85. </section>
  86. </div>
  87. <nav>
  88. <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-barejs.html">barejs</a></li><li><a href="module-barejs_polyfill.html">barejs/polyfill</a></li><li><a href="module-barejs_polyfill_Intl.html">barejs/polyfill/Intl</a></li></ul><h3>Classes</h3><ul><li><a href="module-barejs.decl.html">decl</a></li><li><a href="module-barejs.decl-Enum.html">Enum</a></li><li><a href="module-barejs.decl-Interface.html">Interface</a></li><li><a href="module-barejs.decl-SpecialType.html">SpecialType</a></li><li><a href="module-barejs.Destroyable.html">Destroyable</a></li><li><a href="module-barejs.EventArgs.html">EventArgs</a></li><li><a href="module-barejs.Evented.html">Evented</a></li><li><a href="module-barejs.Evented-EventedHandle.html">EventedHandle</a></li><li><a href="module-barejs.Exception.html">Exception</a></li><li><a href="module-barejs_polyfill.Array.html">Array</a></li><li><a href="module-barejs_polyfill.Date.html">Date</a></li><li><a href="module-barejs_polyfill.EntryStore.html">EntryStore</a></li><li><a href="module-barejs_polyfill.EntryStore.Iterator.html">Iterator</a></li><li><a href="module-barejs_polyfill.Function.html">Function</a></li><li><a href="module-barejs_polyfill.Map.html">Map</a></li><li><a href="module-barejs_polyfill.Map-MapIterator.html">MapIterator</a></li><li><a href="module-barejs_polyfill.Math.html">Math</a></li><li><a href="module-barejs_polyfill.Number.html">Number</a></li><li><a href="module-barejs_polyfill.Object.html">Object</a></li><li><a href="module-barejs_polyfill.Promise.html">Promise</a></li><li><a href="module-barejs_polyfill.Set.html">Set</a></li><li><a href="module-barejs_polyfill.Set-SetIterator.html">SetIterator</a></li><li><a href="module-barejs_polyfill.String.html">String</a></li><li><a href="module-barejs_polyfill.Symbol.html">Symbol</a></li><li><a href="module-barejs_polyfill.WeakMap.html">WeakMap</a></li><li><a href="module-barejs_polyfill.WeakSet.html">WeakSet</a></li><li><a href="module-barejs_polyfill_Intl.DateTimeFormat.html">DateTimeFormat</a></li><li><a href="module-barejs_polyfill_Intl.DateTimeFormat-DateTimeFormatOptions.html">DateTimeFormatOptions</a></li><li><a href="module-barejs_polyfill_Intl.NumberFormat.html">NumberFormat</a></li><li><a href="module-barejs_polyfill_Intl.NumberFormat-NumberFormatOptions.html">NumberFormatOptions</a></li><li><a href="module-barejs_polyfill_Intl-Format.html">Format</a></li></ul>
  89. </nav>
  90. <br class="clear">
  91. <footer>
  92. Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Wed Oct 03 2018 15:59:34 GMT+0200 (W. Europe Daylight Time)
  93. </footer>
  94. <script> prettyPrint(); </script>
  95. <script src="scripts/linenumber.js"> </script>
  96. </body>
  97. </html>