[webkit-changes] [WebKit/WebKit] 39c232: Implement Observable#last

Marais Rossouw noreply at github.com
Mon Oct 21 18:29:34 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 39c23277bab79fb17fa560e50f4adbdee7d13020
      https://github.com/WebKit/WebKit/commit/39c23277bab79fb17fa560e50f4adbdee7d13020
  Author: Marais Rossouw <me at marais.co>
  Date:   2024-10-21 (Mon, 21 Oct 2024)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/dom/observable/tentative/observable-last.any-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/dom/observable/tentative/observable-last.any.js
    M LayoutTests/imported/w3c/web-platform-tests/dom/observable/tentative/observable-last.any.worker-expected.txt
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    A Source/WebCore/dom/InternalObserverLast.cpp
    A Source/WebCore/dom/InternalObserverLast.h
    M Source/WebCore/dom/Observable.cpp
    M Source/WebCore/dom/Observable.h
    M Source/WebCore/dom/Observable.idl

  Log Message:
  -----------
  Implement Observable#last
https://bugs.webkit.org/show_bug.cgi?id=277512

Reviewed by Darin Adler.

This change introduces the `.last` promise-returning operator
for Observables, using the InternalObserver and subscribing immediately.
This is required by the specification https://wicg.github.io/observable/#dom-observable-last

* LayoutTests/imported/w3c/web-platform-tests/dom/observable/tentative/observable-last.any-expected.txt: Rebaselined.
* LayoutTests/imported/w3c/web-platform-tests/dom/observable/tentative/observable-last.any.worker-expected.txt: Rebaselined.
* LayoutTests/imported/w3c/web-platform-tests/dom/observable/tentative/observable-last.any.js:
  AbortErrors' description text is not normative, as such do not assert
  against it.
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/dom/InternalObserverLast.cpp: Added.
(WebCore::createInternalObserverOperatorLast):
* Source/WebCore/dom/InternalObserverLast.h: Added.
* Source/WebCore/dom/Observable.cpp:
(WebCore::Observable::last):
* Source/WebCore/dom/Observable.h:
* Source/WebCore/dom/Observable.idl:
  Exposes `Promise<any> last(options)` as a promise-returning operator.

Canonical link: https://commits.webkit.org/285542@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list