Simon Willison’s Weblog

Subscribe

Friday, 17th November 2023

HTML Web Components: An Example (via) Jim Nielsen provides a clear example illustrating the idea of the recently coined "HTML Web Components" pattern. It's Web Components as progressive enhancement: in this example a <user-avatar> custom element wraps a regular image, then JavaScript defines a Web Component that enhances that image. If the JavaScript fails to load the image still displays.

# 4:33 pm / web-components, progressive-enhancement, javascript

2023 » November

MTWTFSS
  12345
6789101112
13141516171819
20212223242526
27282930