-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why does this spec use dictionaries containing FrozenArray<>s, instead of sequence<>s? #100
Comments
I recall some old guidance around using frozen arrays in return values. It might've been misapplied here. Is there any compat risk in changing this? |
The IDL issue calls out the plausible use case of "The exception is if some of these APIs are caching the FrozenArray<>s to avoid creating new JS Array values each time, for performance reasons." - a quick glance at the Chromium impl it doesn't look like we're caching. The compat risk should be minimal - it would depend on a caller receiving the array via the output dictionary, and relying on it being immutable. Not impossible, but unlikely. |
We're hoping to remove support for dictionaries containing frozen arrays, in whatwg/webidl#1399. It's not clear why this spec makes the array objects immutable, when the dictionaries themselves are (like all dictionaries) mutable.
The text was updated successfully, but these errors were encountered: