-
Notifications
You must be signed in to change notification settings - Fork 734
Open
Labels
Description
Follow up on #12578
"Patching" is an emerging proposal in the HTML spec, see whatwg/html#11542.
It is essentially streaming of content into an existing element, either "out-of-order" in the original response (see whatwg/html#11542) or later (see whatwg/html#2142).
Since a patch is an asynchronous operation, we want to be able to reflect its state and allow styling accordingly.
A patchable element has 3 states:
- Pending - it shows fallback/placeholder content
- Patching - content is being streamed
- Complete.
This can be reflected using 2 selectors for the first two states (or 3).
For example:
<style>
#gallery {
&:pending { }
&:patching { }
}
</style>
<section id=gallery patchid=gallery>
Loading...
</section>
<!-- later -->
<template patchfor=gallery>
<>the actual gallery<>
</template>
SebastianZ