-
Notifications
You must be signed in to change notification settings - Fork 165
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
"Dictionaries must not be used as the type of an attribute or constant" -- why? #981
Comments
You'd have to keep them alive for the lifetime of the object the attribute is associated with, which isn't necessarily great as it would just be a normal mutable JavaScript object not necessarily representing the actual state of things (even if the actual state of things is immutable, say, as the object could be modified by any caller). |
Also, a new copy would get created every time the getter steps run (when you convert the Web IDL dictionary into a JS object), so you'd have |
That we could mitigate with an improved (tm) [SameObject], aka [Cached]. To me the mutability is the main downside of this. It might well be that sanitizer would be better off exposing these as getters though, that's how we often expose such settings (e.g., on |
Wouldn't what @domenic said be true with a getter though? That you'd have |
@LeaVerou you'd have a getter per setting. E.g., |
@annevk In this case, the object properties are also objects though… |
It seems |
I recently observed a case where an API became less usable because of this, so I was curious what's the rationale?
The text was updated successfully, but these errors were encountered: