web-components-examples
web-components-examples copied to clipboard
A series of web components examples, related to the MDN web components documentation at https://developer.mozilla.org/en-US/docs/Web/Web_Components.
#### Summary Suggest a new name for template ID in **simple-template** example. #### Related issues Fixes #74 #### Related content pull request Later...
My issue relate to: https://github.com/mdn/web-components-examples/tree/712ce27cd5b3c894ebc9b9958ec0973e3e86157b/simple-template My point is the custom-element name and the template id name is the same that confused for anyone start to read from `main.js` file. I...
In the word-count-web-component javascript file, there is a comment that goes as follows : ```js // Update count when element content changes setInterval(function() { var count = 'Words: ' +...
Add one or more examples of creating a form-associated element using `attachInternals()` and `formAssociated`. https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/attachInternals https://web.dev/more-capable-form-controls/
Taking list items as individual items is a pretty awkward API that people are using as an example of why web components have a bad API. It's a poor argument...
https://github.com/mdn/web-components-examples/blob/712ce27cd5b3c894ebc9b9958ec0973e3e86157b/slotchange/main.js#L40 `this.shadowRoot` Remove `this.` as `this.shadowRoot` is null and `shadowRoot` is already defined
When I switch from Google's English to Chinese; const nextul = e.target.nextElementSibling; The value of nextul is null and cannot be expanded.
The [spec](https://html.spec.whatwg.org/multipage/custom-elements.html#custom-element-conformance) says this: > The element's attributes and children must not be inspected, as in the non-upgrade case none will be present, and relying on upgrades makes the element...
#### Summary PR fixes #https://github.com/mdn/content/issues/35296 #### Supporting details #### Related issues #### Related content pull request
Make sure PRs don't get missed