-
Notifications
You must be signed in to change notification settings - Fork 326
HTML enhanced setter and streaming methods #4117
Copy link
Copy link
Closed
Labels
early featuresFeature definition work for features without shipping implementationsFeature definition work for features without shipping implementationsfeature definitionCreating or defining new features or groups of features.Creating or defining new features or groups of features.feature entry requestA request for a new web platform feature entryA request for a new web platform feature entry
Description
Activity
Metadata
Metadata
Assignees
Labels
early featuresFeature definition work for features without shipping implementationsFeature definition work for features without shipping implementationsfeature definitionCreating or defining new features or groups of features.Creating or defining new features or groups of features.feature entry requestA request for a new web platform feature entryA request for a new web platform feature entry
Specification
https://github.com/WICG/declarative-partial-updates/blob/main/dynamic-markup-revamped-explainer.md#resulting-api
Various discussions in HTML spec:
whatwg/html#11669
whatwg/html#2142
whatwg/html#12495
whatwg/html#12753
whatwg/html#12756
whatwg/html#12758
Description
Chrome is launching a new set of static and streaming HTML APIs as described here:
https://developer.chrome.com/blog/declarative-partial-updates#a_new_set_of_static_and_streaming_apis
This includes enhancements to
setHTML(covered in sanitizer.yml),setHTMLUnsafe(covered in parse-html-unsafe.yml), and various new positional methods (replace, before, prepend, append, after) as well as streaming versions of these.As these are likely to be implemented together if they roll out to other browsers, but the static and streaming versions are somewhat separate and could even be implemented at different times. So we in the Chrome team are suggesting two new features for this:
For now, since there is existing browser support we'll keep
setHTMLandsetHTMLUnsafeseparate, but longer term I could see those merging into "HTML setter methods" if all browsers converge on these (as we hope they will).Documentation
https://developer.chrome.com/blog/declarative-partial-updates#a_new_set_of_static_and_streaming_apis
https://github.com/WICG/declarative-partial-updates/blob/main/dynamic-markup-revamped-explainer.md#resulting-api
https://github.com/WICG/declarative-partial-updates/tree/main/examples
Browser support
Available behind a flag from Chrome 148. Shipping in Chrome 154:
https://chromestatus.com/feature/5054329641893888
Firefox: Positive - mozilla/standards-positions#1370
WebKit: No signal yet - WebKit/standards-positions#629