Skip to content

HTML enhanced setter and streaming methods #4117

Description

@tunetheweb

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:

  • HTML setter methods
  • HTML stream methods

For now, since there is existing browser support we'll keep setHTML and setHTMLUnsafe separate, 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    early featuresFeature definition work for features without shipping implementationsfeature definitionCreating or defining new features or groups of features.feature entry requestA request for a new web platform feature entry

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions