Add support for Symbol.toStringTag (closes #21).#36
Add support for Symbol.toStringTag (closes #21).#36droooney wants to merge 3 commits intojsdom:masterfrom
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.
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.