Contact emails
[email protected]

Specification
https://github.com/tc39/proposal-upsert


Summary
ECMAScript proposal for Map.prototype.getOrInsert, 
Map.prototype.getOrInsertComputed, WeakMap.prototype.getOrInsert, and 
WeakMap.prototype.getOrInsertComputed.


Blink component
Blink>JavaScript>Language


Web Feature ID
getorinsert


Motivation
No information provided


Initial public proposal
No information provided


TAG review
No information provided


TAG review status
Not applicable


Risks




Interoperability and Compatibility
No information provided

Gecko: Shipped/Shipping 
(https://www.firefox.com/en-US/firefox/144.0/releasenotes) Firefox now supports 
the upsert proposal. This adds getOrInsert and getOrInsertComputed methods to 
Map and WeakMap. These methods either return the value associated with a key, 
or insert a default value, and then return that value, simplifying handling of 
cases where it's not known if a key is already present in the Map or WeakMap.

WebKit: Shipped/Shipping 
(https://developer.apple.com/documentation/safari-release-notes/safari-18_4-release-notes)
 Added support for Map.prototype.getOrInsert and WeakMap.prototype.getOrInsert. 
(138955824)

Web developers: No signals

Other signals:


WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it 
has potentially high risk for Android WebView-based applications?
No information provided



Debuggability
No information provided


Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, 
ChromeOS, Android, and Android WebView)?
No


Is this feature fully tested by web-platform-tests?
No
https://github.com/tc39/test262/pull/4454


Flag name on about://flags
--js-flags=--js_upsert


Finch feature name
V8Flag_js_upsert


Rollout plan
Will ship enabled for all users


Requires code in //chrome?
False


Tracking bug
https://issues.chromium.org/u/1/issues/434977728


Estimated milestones


Shipping on desktop 145

DevTrial on desktop 143

Shipping on Android 145

DevTrial on Android 143




Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop 
issues. Please list open issues (eg links to known github issues in the project 
for the feature specification) whose resolution may introduce web 
compat/interop risk (eg, changing to naming or structure of the API in a 
non-backward-compatible way).
No information provided


Link to entry on the Chrome Platform Status
https://chromestatus.com/feature/5201653661827072?gate=6583456041664512


This intent message was generated by Chrome Platform Status.

-- 
You received this message because you are subscribed to the Google Groups 
"blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/692eb5f4.050a0220.107b62.1348.GAE%40google.com.

Reply via email to