index.html 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title><my-element> ⌲ Docs</title>
  7. <link rel="stylesheet" href="../docs.css">
  8. <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600|Roboto+Mono">
  9. <link href="../prism-okaidia.css" rel="stylesheet" />
  10. <script src="/node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
  11. <script src="/node_modules/lit/polyfill-support.js"></script>
  12. <script type="module" src="../my-element.bundled.js"></script>
  13. </head>
  14. <body>
  15. <header>
  16. <h1>&lt;my-element></h1>
  17. <h2>A web component just for me.</h2>
  18. </header>
  19. <nav>
  20. <a href="../">Home</a>
  21. <a href="../examples/">Examples</a>
  22. <a href="">API</a>
  23. <a href="../install/">Install</a>
  24. </nav>
  25. <div id="main-wrapper">
  26. <main>
  27. <h1>API</h1>
  28. <h2>&lt;my-element></h2>
  29. <div>
  30. An example element.
  31. </div>
  32. <h3>Attributes</h3>
  33. <table>
  34. <tr>
  35. <th>Name</th><th>Description</th><th>Type</th><th>Default</th>
  36. </tr>
  37. <tr>
  38. <td>name</td><td>The name to say "Hello" to.</td><td>string</td><td>"World"</td>
  39. </tr>
  40. <tr>
  41. <td>count</td><td>The number of times the button has been clicked.</td><td>number</td><td>0</td>
  42. </tr>
  43. </table>
  44. <h3>Properties</h3>
  45. <table>
  46. <tr>
  47. <th>Name</th><th>Attribute</th><th>Description</th><th>Type</th><th>Default</th>
  48. </tr>
  49. <tr>
  50. <td>name</td><td>name</td><td>The name to say "Hello" to.</td><td>string</td><td>"World"</td>
  51. </tr>
  52. <tr>
  53. <td>count</td><td>count</td><td>The number of times the button has been clicked.</td><td>number</td><td>0</td>
  54. </tr>
  55. <tr>
  56. <td>renderRoot</td><td>undefined</td><td>Node or ShadowRoot into which element DOM should be rendered. Defaults
  57. to an open shadowRoot.</td><td>HTMLElement | ShadowRoot</td><td>undefined</td>
  58. </tr>
  59. <tr>
  60. <td>isUpdatePending</td><td>undefined</td><td>undefined</td><td>boolean</td><td>undefined</td>
  61. </tr>
  62. <tr>
  63. <td>hasUpdated</td><td>undefined</td><td>undefined</td><td>boolean</td><td>undefined</td>
  64. </tr>
  65. <tr>
  66. <td>updateComplete</td><td>undefined</td><td>Returns a Promise that resolves when the element has completed updating.
  67. The Promise value is a boolean that is `true` if the element completed the
  68. update without triggering another update. The Promise result is `false` if
  69. a property was set inside `updated()`. If the Promise is rejected, an
  70. exception was thrown during the update.
  71. To await additional asynchronous work, override the `getUpdateComplete`
  72. method. For example, it is sometimes useful to await a rendered element
  73. before fulfilling this Promise. To do this, first await
  74. `super.getUpdateComplete()`, then any subsequent state.</td><td>Promise<boolean></td><td>undefined</td>
  75. </tr>
  76. </table>
  77. <h3>Slots</h3>
  78. <table>
  79. <tr>
  80. <th>Name</th><th>Description</th>
  81. </tr>
  82. <tr>
  83. <td></td><td>This element has a slot</td>
  84. </tr>
  85. </table>
  86. <h3>CSS Shadow Parts</h3>
  87. <table>
  88. <tr>
  89. <th>Name</th><th>Description</th>
  90. </tr>
  91. <tr>
  92. <td>button</td><td>The button</td>
  93. </tr>
  94. </table>
  95. </main>
  96. </div>
  97. <footer>
  98. <p>
  99. Made with
  100. <a href="https://github.com/PolymerLabs/lit-starter-ts">lit-starter-ts</a>
  101. </p>
  102. </footer>
  103. </body>
  104. </html>