Skip to content
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

@@toStringTag property attributes + general semantics #54

Closed
caitp opened this issue Jul 3, 2015 · 5 comments
Closed

@@toStringTag property attributes + general semantics #54

caitp opened this issue Jul 3, 2015 · 5 comments
Labels
☕☕☕ difficulty:hard Excruciating ⌛⌛ duration:medium Shouldn't be too long to fix

Comments

@caitp
Copy link
Contributor

caitp commented Jul 3, 2015

Editorial note
Should define whether @@toStringTag is writable, enumerable and configurable. All @@toStringTag properties in the ES6 spec are non-writable and non-enumerable, and configurable.

I think we really need to define these. Matching the values on the builtin properties is probably good, because fewer inconsistencies between DOM & JS is good.

The other issue with these properties, is making InterfacePrototype.@@toStringTag === "InterfacePrototype" while Interface.@@toStringTag === "Interface" --- I don't believe we want to give Interface an instance property @@toStringTag, so the alternative is making @@toStringTag a getter which returns a distinct value depending on the receiver --- but this kind of sucks?

So yeah, I don't think we have a good answer for these semantics right now. It's probably worth discussing it a bit

@caitp caitp changed the title @@toStringTag property attributes @@toStringTag property attributes + general semantics Jul 3, 2015
@bzbarsky
Copy link
Collaborator

bzbarsky commented Jul 6, 2015

The interface vs interface prototype issue is covered by https://www.w3.org/Bugs/Public/show_bug.cgi?id=28244

@caitp
Copy link
Contributor Author

caitp commented Jul 6, 2015

I guess we'll try Erik's idea and see if it breaks anything

@caitp
Copy link
Contributor Author

caitp commented Jul 11, 2015

Tangentially related to this thread:

@bzbarsky given what you're saying in https://lists.w3.org/Archives/Public/public-script-coord/2015JulSep/0022.html --- Maybe Window (or just WindowProxy, but I don't think that works well for Blink atm) needs an [Unforgeable] readonly toStringTag/isConcatSpreadable, with a primitive value.

Does that seem sensible, or too restrictive on same-origin objects?

@bzbarsky
Copy link
Collaborator

I don't see why we need anything unforgeable on Window at all. You do need something on cross-origin WindowProxy instances, of course.

I think making same-origin access not do the right thing here would be quite confusing to consumers....

@annevk
Copy link
Member

annevk commented May 14, 2020

This got fixed in #357.

@annevk annevk closed this as completed May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
☕☕☕ difficulty:hard Excruciating ⌛⌛ duration:medium Shouldn't be too long to fix
Development

No branches or pull requests

4 participants