Re: [csswg-drafts] [css-pseudo-5] ::text / ::text-node pseudoelement (#2208)

This will be useful while using the streaming mode calling the ChatGPT's completion api with an asynchronous function call.

When ChatGPT is outputting content in Streaming mode, it usually involves text nodes. At this time, if it needs to draw an image, it will pause to execute a function call. During this, a Loading sign should be displayed in the UI. The simplest way to do this is to add a `<span class="loading"/>` tag within its streaming content. Once the image is loaded and it continues to output other text content, this tag should be set to `display: none`.

```css
p .loading:has(+::text) {
    display: none;
}
```

-- 
GitHub Notification of comment by akira-cn
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2208#issuecomment-1868630233 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 25 December 2023 00:48:38 UTC