Skip to content

Implement ObservableArray #37902

Closed
Closed

Description

@stevennovaryo

Observable array is defined by https://webidl.spec.whatwg.org/#idl-observable-array as:

An observable array type is a parameterized type whose values are references to a combination of a mutable list of objects of type T, as well as behavior to perform when author code modifies the contents of the list.

It would support DocumentOrShadowRoot.adoptedstylesheets https://drafts.csswg.org/cssom/#dom-documentorshadowroot-adoptedstylesheets. Although both features could be implemented in parallel.

Firefox's implementation history could be found here: https://bugzilla.mozilla.org/show_bug.cgi?id=1683281.

Activity

  1. added
    A-content/bindings
    E-very-complex
    B-feature-tracking
    on Jul 6, 2025
  2. arihant2math commented on Sep 3, 2025

    @arihant2math
    Contributor

    It would support DocumentOrShadowRoot.adoptedstylesheets https://drafts.csswg.org/cssom/#dom-documentorshadowroot-adoptedstylesheets. Although both features could be implemented in parallel.

    Currently an issue on github.com.

  3. self-assigned this
    on Sep 3, 2025
  4. arihant2math commented on Sep 3, 2025

    @arihant2math
    Contributor

    Seems like this would desugar to the following.

    IDL:

      attribute ObservableArray<Employee> employees;
    

    Trait:

    fn Employees(&self) -> DomRoot<ObserverableArray<Employee>>;

    And the DOM interface could add callbacks to ObservableArray to implement operations that are triggered when an item is set or an item is deleted.

  5. jdm commented on Sep 3, 2025

    @jdm
    Member

    I think we should follow Gecko's lead here and make them special JS proxy objects.

  6. changed the title [-]Implement ObserverableArray[/-] [+]Implement ObservableArray[/+] on Dec 31, 2025
  7. removed their assignment
    on Feb 3, 2026
  8. self-assigned this
    on Jun 30, 2026
  9. added a commit that references this issue on Oct 24, 2026
    08f70f7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-content/bindingsB-feature-trackingE-very-complex

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions