Open cifkao opened 4 years ago
Matching attributes to properties should be case-insensitive and ignore hyphens to support kebab-cased attributes.
Code:
export class MyElement extends HTMLElement { static get observedAttributes() { return ['my-attribute']; } get myAttribute() { return this.getAttribute('my-attribute'); } set myAttribute(value) { return this.setAttribute('my-attribute', value); } } window.customElements.define('my-element', MyElement);
Output:
## Attributes | Attribute | |----------------| | `my-attribute` | ## Properties | Property | Type | |---------------|------------------| | `myAttribute` | `string \| null` |
Expected output:
## Properties | Property | Attribute | Type | |---------------|----------------|------------------| | `myAttribute` | `my-attribute` | `string \| null` |
Matching attributes to properties should be case-insensitive and ignore hyphens to support kebab-cased attributes.
Code:
Output:
Expected output: