Dark Mode

Simon Willison's Weblog

Subscribe

1st March 2024 - Link Blog

Streaming HTML out of order without JavaScript (via) A really interesting new browser capability. If you serve the following HTML:


Then later in the same page stream an element specifying that slot:

Item number 1

The previous slot will be replaced while the page continues to load.

I tried the demo in the most recent Chrome, Safari and Firefox (and Mobile Safari) and it worked in all of them.

The key feature is shadowrootmode=open, which looks like it was added to Firefox 123 on February 19th 2024 - the other two browsers are listed on caniuse.com as gaining it around March last year.

Posted 1st March 2024 at 4:59 pm

Recent articles

This is a link post by Simon Willison, posted on 1st March 2024.

browsers 99 html 95 web-components 22

Monthly briefing

Sponsor me for $10/month and get a curated email digest of the month's most important LLM developments.

Pay me to send you less!

Sponsor & subscribe