# 💡 Ideas

**URL:** https://es.discourse.group/c/ideas/7.md

[Latest](https://es.discourse.group/latest.md) · [Categories](https://es.discourse.group/categories.md) · [Tags](https://es.discourse.group/tags.md)

---

## [About the 💡 Ideas category](https://es.discourse.group/t/about-the-ideas-category/16)

<div class="topic-metadata">

**Author:** [@zkat](https://es.discourse.group/u/zkat)\
**Replies:** 0

</div>

New ideas, proposals looking for a champion, and proposal mentoring. Get feedback on your new ideas here: what’s been done, where to find prior art, the polish your proposal needs to be considered by the committee.

---

## [Reading the state and value from a Promise](https://es.discourse.group/t/reading-the-state-and-value-from-a-promise/2655)

<div class="topic-metadata">

**Author:** [@bramus](https://es.discourse.group/u/bramus)\
**Replies:** 4\
**Last updated:** [September 24, 2026, 8:00pm UTC](https://es.discourse.group/t/reading-the-state-and-value-from-a-promise/2655 "2026-09-24T20:00:45Z")

</div>

While implementing the CSS View Transitions Specification in JavaScript (see project: view-transitions-mock), two of its steps listed in the spec required me to react to specific Promises. In “Call the update callback”: …

---

## ["indexOf" should be "firstIndexOf"](https://es.discourse.group/t/indexof-should-be-firstindexof/2654)

<div class="topic-metadata">

**Author:** [@jaroslav.tavgen](https://es.discourse.group/u/jaroslav.tavgen)\
**Replies:** 11\
**Last updated:** [September 24, 2026, 9:23am UTC](https://es.discourse.group/t/indexof-should-be-firstindexof/2654 "2026-09-24T09:23:19Z")

</div>

"indexOf" is essentially "firstIndexOf". Especially given the fact that the "lastIndexOf" property exists. It would be extemely logical to have "firstIndexOf" and "lastIndexOf" properties. \[1, 2, 3, 4, 2, 5\].indexOf(2)…

---

## [struct object sub-type](https://es.discourse.group/t/struct-object-sub-type/2652)

<div class="topic-metadata">

**Author:** [@YeesterPlus](https://es.discourse.group/u/YeesterPlus)\
**Replies:** 6\
**Last updated:** [September 16, 2026, 12:12pm UTC](https://es.discourse.group/t/struct-object-sub-type/2652 "2026-09-16T12:12:32Z")

</div>

I propose the Struct class or the struct keyword. Any subclass of Struct or any struct class should be of the struct type and final, when the struct object exits the constructor it should be sealed, and have value seman…

---

## [Symbol.equal - a way to define the weak equals operator on objects](https://es.discourse.group/t/symbol-equal-a-way-to-define-the-weak-equals-operator-on-objects/2651)

<div class="topic-metadata">

**Author:** [@YeesterPlus](https://es.discourse.group/u/YeesterPlus)\
**Replies:** 9\
**Last updated:** [September 16, 2026, 12:07pm UTC](https://es.discourse.group/t/symbol-equal-a-way-to-define-the-weak-equals-operator-on-objects/2651 "2026-09-16T12:07:16Z")

</div>

I propose something new for object comparison called Symbol.equal. The == operator should call the Symbol.equal method if the left hand side is an object or only the right hand side is an object. example: class Box{ …

---

## [Protected support for \`class\`](https://es.discourse.group/t/protected-support-for-class/68)

<div class="topic-metadata">

**Author:** [@rdking](https://es.discourse.group/u/rdking)\
**Replies:** 32\
**Last updated:** [September 12, 2026, 2:42pm UTC](https://es.discourse.group/t/protected-support-for-class/68 "2026-09-12T14:42:18Z")

</div>

For better or worse, class-fields is pretty much a given. However, it doesn't provide any support for protected access. One of the reasons why is due to the risk of loose scoping that would allow an inheriting class' met…

---

## [\`new WeakMap(entries, { properties: true });\`](https://es.discourse.group/t/new-weakmap-entries-properties-true/2645)

<div class="topic-metadata">

**Author:** [@conartist6](https://es.discourse.group/u/conartist6)\
**Replies:** 15\
**Last updated:** [September 10, 2026, 6:02pm UTC](https://es.discourse.group/t/new-weakmap-entries-properties-true/2645 "2026-09-10T18:02:27Z")

</div>

This is an observation of the WeakMap API and my experiences using it. The core observation is: it was always possible for the engine to implement WeakMap in two different ways. As hash map with weakly-held keys. (what…

---

## [Concise syntax for comparing multiple values](https://es.discourse.group/t/concise-syntax-for-comparing-multiple-values/2646)

<div class="topic-metadata">

**Author:** [@SabziDev](https://es.discourse.group/u/SabziDev)\
**Replies:** 1\
**Last updated:** [September 8, 2026, 4:17pm UTC](https://es.discourse.group/t/concise-syntax-for-comparing-multiple-values/2646 "2026-09-08T16:17:16Z")

</div>

Problem When multiple values need to satisfy the same condition, the condition has to be repeated: if (a === 1 && b === 1 && c === 1) {} This can become verbose when the same comparison is repeated for many values. P…

---

## [Lightweight Protected Fields](https://es.discourse.group/t/lightweight-protected-fields/1102)

<div class="topic-metadata">

**Author:** [@Jamesernator](https://es.discourse.group/u/Jamesernator)\
**Replies:** 14\
**Last updated:** [August 31, 2026, 11:38am UTC](https://es.discourse.group/t/lightweight-protected-fields/1102 "2026-08-31T11:38:29Z")

</div>

Lightweight Protected Fields Introduction and Problem Something I have seen both in TC39 proposals, on Twitter and various other places is that there is quite a lot of interest in some form of protected fields. Now some…

---

## [Protected and friend access modifier for class members](https://es.discourse.group/t/protected-and-friend-access-modifier-for-class-members/732)

<div class="topic-metadata">

**Author:** [@RHeinze](https://es.discourse.group/u/RHeinze)\
**Replies:** 41\
**Last updated:** [August 30, 2026, 11:01pm UTC](https://es.discourse.group/t/protected-and-friend-access-modifier-for-class-members/732 "2026-08-30T23:01:07Z")

</div>

Private static and instance properties/accessor properties/methods of classes in Javascript are currently at stage 3 of the TC39 standardization process (see here). My idea is based on that work. Most OOP languages (e.g.…

---

## [Weak/Map and Weak/Set \`put(key, value): value\` anyone?](https://es.discourse.group/t/weak-map-and-weak-set-put-key-value-value-anyone/2633)

<div class="topic-metadata">

**Author:** [@WebReflection](https://es.discourse.group/u/WebReflection)\
**Replies:** 2\
**Last updated:** [July 28, 2026, 9:49pm UTC](https://es.discourse.group/t/weak-map-and-weak-set-put-key-value-value-anyone/2633 "2026-07-28T21:49:25Z")

</div>

I've written a utility library that provides extends of Map, Set, WeakMap and WeakSet that do only one thing: add a put(key, value):value method because returning this has been a long-time-ago battle of mine, suggesting …

---

## [Proposal: tomb — Irreversible Variable Finalization](https://es.discourse.group/t/proposal-tomb-irreversible-variable-finalization/2626)

<div class="topic-metadata">

**Author:** [@jefferson-it](https://es.discourse.group/u/jefferson-it)\
**Replies:** 4\
**Last updated:** [July 25, 2026, 9:04pm UTC](https://es.discourse.group/t/proposal-tomb-irreversible-variable-finalization/2626 "2026-07-25T21:04:48Z")

</div>

Proposal: tomb — Irreversible Variable Finalization Author: Jefferson Status: Idea / Stage 0 Discussion Summary This proposal introduces a new JavaScript keyword: tomb variable; The purpose of tomb is to permanently…

---

## [Proposal: The gate keyword for conditional early returns](https://es.discourse.group/t/proposal-the-gate-keyword-for-conditional-early-returns/2627)

<div class="topic-metadata">

**Author:** [@lukas](https://es.discourse.group/u/lukas)\
**Replies:** 3\
**Last updated:** [July 25, 2026, 6:57pm UTC](https://es.discourse.group/t/proposal-the-gate-keyword-for-conditional-early-returns/2627 "2026-07-25T18:57:59Z")

</div>

I recently looked at my code and realised that my core logic was diluted with error handling code. After calling a function, I want to be sure that whatever happens inside it worked as expected, so I always add the line …

---

## [AbortSignal-like abstraction without event dispatch?](https://es.discourse.group/t/abortsignal-like-abstraction-without-event-dispatch/2620)

<div class="topic-metadata">

**Author:** [@juner](https://es.discourse.group/u/juner)\
**Replies:** 2\
**Last updated:** [July 18, 2026, 7:30pm UTC](https://es.discourse.group/t/abortsignal-like-abstraction-without-event-dispatch/2620 "2026-07-18T19:30:36Z")

</div>

While reading the discussion in whatwg/dom#1461, I started wondering whether the underlying abstraction behind AbortSignal could be separated from its event-based aspects. Related discussion: whatwg/dom#1461 — "AbortS…

---

## [\`Object.upgrade()\`: Like \`Object.setPrototypeOf()\` but only for prototype specialization at the leafs](https://es.discourse.group/t/object-upgrade-like-object-setprototypeof-but-only-for-prototype-specialization-at-the-leafs/2618)

<div class="topic-metadata">

**Author:** [@LeaVerou](https://es.discourse.group/u/LeaVerou)\
**Replies:** 7\
**Last updated:** [July 9, 2026, 8:20pm UTC](https://es.discourse.group/t/object-upgrade-like-object-setprototypeof-but-only-for-prototype-specialization-at-the-leafs/2618 "2026-07-09T20:20:56Z")

</div>

Why? We have Object.setPrototypeOf() but it's so slow in the general case that the messaging is basically "never use this". However, literally every single use case I've ever encountered for it was much more narrowly sc…

---

## [Map.prototype.with](https://es.discourse.group/t/map-prototype-with/2611)

<div class="topic-metadata">

**Author:** [@Dagur](https://es.discourse.group/u/Dagur)\
**Replies:** 4\
**Last updated:** [June 23, 2026, 4:53pm UTC](https://es.discourse.group/t/map-prototype-with/2611 "2026-06-23T16:53:44Z")

</div>

I'd like to be able to create a copy of a Map with a single value changed so instead of having to first clone the Map object and then calling Map.prototype.set, I'd like to be able to do this in one call. const newMap =…

---

## [Map and set getters to give a way to get an item at an order](https://es.discourse.group/t/map-and-set-getters-to-give-a-way-to-get-an-item-at-an-order/2541)

<div class="topic-metadata">

**Author:** [@Jingcong](https://es.discourse.group/u/Jingcong)\
**Replies:** 34\
**Last updated:** [June 22, 2026, 6:11pm UTC](https://es.discourse.group/t/map-and-set-getters-to-give-a-way-to-get-an-item-at-an-order/2541 "2026-06-22T18:11:13Z")

</div>

Map.prototype.at() & Set.prototype.at() Stage: 0 (with a dream) Author: Someone tired of converting Maps to arrays Help wanted: Champion, spec writers, emotional support The Pitch Arrays and strings got .at() in ES202…

---

## [(Champion needed) Ideas For Iterator Block Expressions](https://es.discourse.group/t/champion-needed-ideas-for-iterator-block-expressions/2605)

<div class="topic-metadata">

**Author:** [@fierflame](https://es.discourse.group/u/fierflame)\
**Replies:** 4\
**Last updated:** [June 19, 2026, 11:27am UTC](https://es.discourse.group/t/champion-needed-ideas-for-iterator-block-expressions/2605 "2026-06-19T11:27:53Z")

</div>

\[中文版本(Github)\] \[中文版本(Gitee)\] Proposal Details The block {} can be defined as a syntactic sugar similar to for..of, but it differs from for..of in the following ways: block {} will pass the result of the last statemen…

---

## [\`new Thead()\` for shared-memory isolation](https://es.discourse.group/t/new-thead-for-shared-memory-isolation/2604)

<div class="topic-metadata">

**Author:** [@conartist6](https://es.discourse.group/u/conartist6)\
**Replies:** 1\
**Last updated:** [June 18, 2026, 5:45pm UTC](https://es.discourse.group/t/new-thead-for-shared-memory-isolation/2604 "2026-06-18T17:45:43Z")

</div>

I'm offering this idea on behalf of Jarred Sumner, who has gone ahead and had AI implement it in webkit in lieu of designing the feature: Shared-memory threads for JavaScriptCore (experimental, not working yet) by Jarred…

---

## [A More Idiomatic Enum for JavaScript](https://es.discourse.group/t/a-more-idiomatic-enum-for-javascript/2566)

<div class="topic-metadata">

**Author:** [@yxdtg](https://es.discourse.group/u/yxdtg)\
**Replies:** 4\
**Last updated:** [June 13, 2026, 11:47am UTC](https://es.discourse.group/t/a-more-idiomatic-enum-for-javascript/2566 "2026-06-13T11:47:46Z")

</div>

A More Idiomatic Enum for JavaScript Idiomatic to JavaScript Semantic Progressive Arbitrary value types Mergeable Straightforward desugaring Straightforward TypeScript typing Basic Syntax enum STATUS { Ready: 0, …

---

## [A meta proposal: An AI proposals submission page](https://es.discourse.group/t/a-meta-proposal-an-ai-proposals-submission-page/2600)

<div class="topic-metadata">

**Author:** [@David263](https://es.discourse.group/u/David263)\
**Replies:** 1\
**Last updated:** [June 12, 2026, 8:38pm UTC](https://es.discourse.group/t/a-meta-proposal-an-ai-proposals-submission-page/2600 "2026-06-12T20:38:16Z")

</div>

TC39 is difficult for non-delegates to contribute to, so non-delegates with really useful ideas may tend to be stuck and give up. I've come up with a solution that won't overload either the delegates or the TC39 infras…

---

## [JSONRegistry - Allows branded instances in regular JSON](https://es.discourse.group/t/jsonregistry-allows-branded-instances-in-regular-json/2569)

<div class="topic-metadata">

**Author:** [@WebReflection](https://es.discourse.group/u/WebReflection)\
**Replies:** 50\
**Last updated:** [June 10, 2026, 10:58am UTC](https://es.discourse.group/t/jsonregistry-allows-branded-instances-in-regular-json/2569 "2026-06-10T10:58:18Z")

</div>

I've written so many serializer/encoder/decoder but I feel like going back to basics every single time, although this time I think I've nailed a prototype that works well with both native JSON API and flatted, downloaded…

---

## [Native CBOR support](https://es.discourse.group/t/native-cbor-support/1492)

<div class="topic-metadata">

**Author:** [@mbalex99](https://es.discourse.group/u/mbalex99)\
**Replies:** 10\
**Last updated:** [May 24, 2026, 5:21am UTC](https://es.discourse.group/t/native-cbor-support/1492 "2026-05-24T05:21:34Z")

</div>

Since WebAuthN uses CBOR, I felt it would be a good idea to bring broad base support for CBOR throughout. What is CBOR? CBOR is a serialization format much like JSON (and some more). However, unlike JSON, CBOR is a bina…

---

## [Additional features to \`import \* as Object from 'module'\`](https://es.discourse.group/t/additional-features-to-import-as-object-from-module/1164)

<div class="topic-metadata">

**Author:** [@tomma5o](https://es.discourse.group/u/tomma5o)\
**Replies:** 14\
**Last updated:** [May 23, 2026, 11:01pm UTC](https://es.discourse.group/t/additional-features-to-import-as-object-from-module/1164 "2026-05-23T23:01:05Z")

</div>

Hey, my first time here, sorry in advance if I've made some error about the process of opening a proposal. Just want to discuss the import \* as Object from 'module' feature in ECMAScript. Why there is no way to import …

---

## [Proposal: Observable State with Mutation History Tracking](https://es.discourse.group/t/proposal-observable-state-with-mutation-history-tracking/2567)

<div class="topic-metadata">

**Author:** [@Muddabirchohan](https://es.discourse.group/u/Muddabirchohan)\
**Replies:** 1\
**Last updated:** [May 18, 2026, 1:34am UTC](https://es.discourse.group/t/proposal-observable-state-with-mutation-history-tracking/2567 "2026-05-18T01:34:40Z")

</div>

There is no native way to: track changes over time inspect previous values debug state transitions replay or revert changes Motivation Modern applications require observability of state changes for: debugging comple…

---

## [for await? .. of](https://es.discourse.group/t/for-await-of/2452)

<div class="topic-metadata">

**Author:** [@conartist6](https://es.discourse.group/u/conartist6)\
**Replies:** 18\
**Last updated:** [May 16, 2026, 10:45am UTC](https://es.discourse.group/t/for-await-of/2452 "2026-05-16T10:45:15Z")

</div>

Trying one more time because this is pretty important and I have a lot more practical experience with this idea and so more evidence than I have had previously. The proposal I wish to champion (or find a champion for) i…

---

## [Passing error context to Symbol.dispose](https://es.discourse.group/t/passing-error-context-to-symbol-dispose/2514)

<div class="topic-metadata">

**Author:** [@mmkal](https://es.discourse.group/u/mmkal)\
**Replies:** 1\
**Last updated:** [May 6, 2026, 3:42pm UTC](https://es.discourse.group/t/passing-error-context-to-symbol-dispose/2514 "2026-05-06T15:42:37Z")

</div>

Pass error context to Symbol.dispose TLDR: const testLogger = () =\> { const logs = \[\] return { log: (...args) =\> logs.push(args), \[Symbol.dispose\]: ({ errors }) =\> { if (errors.length) { consol…

---

## [ES Codelab](https://es.discourse.group/t/es-codelab/2558)

<div class="topic-metadata">

**Author:** [@hemanth](https://es.discourse.group/u/hemanth)\
**Replies:** 0\
**Last updated:** [May 4, 2026, 8:33pm UTC](https://es.discourse.group/t/es-codelab/2558 "2026-05-04T20:33:14Z")

</div>

An interactive, browser-based codelab covering ECMAScript features from ES2015 through ES2025 63 hands-on lessons, zero setup, running real JavaScript in the browser. :link: Live demo: eslabs.web.app Motivation The ECM…

---

## [Proposal Records (a new one)](https://es.discourse.group/t/proposal-records-a-new-one/2546)

<div class="topic-metadata">

**Author:** [@conartist6](https://es.discourse.group/u/conartist6)\
**Replies:** 16\
**Last updated:** [April 29, 2026, 4:41pm UTC](https://es.discourse.group/t/proposal-records-a-new-one/2546 "2026-04-29T16:41:26Z")

</div>

I've evolved my ideas a bit beyond where they were with Object.freezeRecord, although it might still be nice to have here. Here's the highlights: let { freeze, setPrototypeOf } = Object; // Same syntax vetted by the O…

---

## [(Champion needed) Improve handling of network data (2)](https://es.discourse.group/t/champion-needed-improve-handling-of-network-data-2/2534)

<div class="topic-metadata">

**Author:** [@Guthib-of-Dan](https://es.discourse.group/u/Guthib-of-Dan)\
**Replies:** 42\
**Last updated:** [April 26, 2026, 8:53pm UTC](https://es.discourse.group/t/champion-needed-improve-handling-of-network-data-2/2534 "2026-04-26T20:53:07Z")

</div>

To continue discussion (Champion needed) Improve handling of network data: Proposals: JSON.parseBinary and ArrayBuffer.prototype.detach I should mention that I posted them in Proposals category, while Ideas was the righ…

[Next page](https://es.discourse.group/c/ideas/7.md?page=1)
