-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Add support for Symbol.toStringTag (closes #21). #36
Conversation
This isn't actually compliant to the Web IDL spec, which says the prototype's @@toStringTag must be the interface's name +
Regardless, you probably should remove the existing |
Yes, I am much happier with this than the version in the Web IDL spec, which nobody implements. But yes, we need to remove the toString function that already exists. |
Should I set a getter according to the specs (add |
No, as I said, I am much happier with this version than the version in the Web IDL specs. The only change is that we need to remove the toString function that we're currently installing on every class. |
No problem :) I personally like this version more as well. |
We need to keep toString for the stringifier and impl toString method. Only the stringtag part should be removed. |
Oops, sorry... Ridiculously long commit history for such a small change :) |
@@ -365,18 +365,15 @@ Interface.prototype.generateToString = function () { | |||
} | |||
} | |||
if (!hasToString) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This condition is now flipped; it should be if (hasToString)
.
I'll fix this before merging.
I ended up doing this a bit differently; it turns out that whole generateToString() function is no longer needed. See 0590e5a. Thanks for the kick-start though! |
No problem :) Thanks for awesome jsdom! |
No description provided.