Skip to content

Commit ec62988

Browse files
committed
Add description for Custom Element
1 parent 881e4fb commit ec62988

File tree

4 files changed

+27
-2
lines changed

4 files changed

+27
-2
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ Include with a script tag:
2424
<script type="module" src="./node_modules/@github/custom-element-element/dist/index.js">
2525
```
2626
27+
An example Custom Element. This documentation ends up in the
28+
README so describe how this elements works here.
29+
30+
You can event add examples on the element is used with Markdown.
31+
32+
```
33+
<custom-element></custom-element>
34+
```
35+
2736
## Browser support
2837
2938
Browsers without native [custom element support][support] require a [polyfill][].

custom-elements.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"declarations": [
99
{
1010
"kind": "class",
11-
"description": "",
11+
"description": "An example Custom Element. This documentation ends up in the\nREADME so describe how this elements works here.\n\nYou can event add examples on the element is used with Markdown.\n\n```\n<custom-element></custom-element>\n```",
1212
"name": "CustomElementElement",
1313
"superclass": {
1414
"name": "HTMLElement"

src/custom-element.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
/**
2+
* An example Custom Element. This documentation ends up in the
3+
* README so describe how this elements works here.
4+
*
5+
* You can event add examples on the element is used with Markdown.
6+
*
7+
* ```
8+
* <custom-element></custom-element>
9+
* ```
10+
*/
111
class CustomElementElement extends HTMLElement {
212
connectedCallback(): void {
313
this.textContent = ':wave:'

vscode.html-custom-data.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
{
2-
"tags": [{ "name": "custom-element", "description": "", "attributes": [] }]
2+
"tags": [
3+
{
4+
"name": "custom-element",
5+
"description": "An example Custom Element. This documentation ends up in the\nREADME so describe how this elements works here.\n\nYou can event add examples on the element is used with Markdown.\n\n```\n<custom-element></custom-element>\n```",
6+
"attributes": []
7+
}
8+
]
39
}

0 commit comments

Comments
 (0)