Re: [heycam/webidl] Class string of default iterator object seems to have been accidentally changed? (#419)

So this is predictably messy.

Given:

```
const it = new URLSearchParams().values();
const itProto = Object.getPrototypeOf(it);
```

|                                        | FF Nightly                                     | Chrome Canary          |
| ------------------------------------------- | ---------------------------------------------- | ---------------------- |
| `it[Symbol.toStringTag];`                   | undefined                                      | "Iterator"             |
| `Object.prototype.toString.apply(it);`      | [object URLSearchParamsIterator]          | [object Iterator] |
| `itProto[Symbol.toStringTag];`              | undefined                                      | "Iterator"             |
| `Object.prototype.toString.apply(itProto);` | [object URLSearchParamsIteratorPrototype] | [object Iterator] |

In contrast, given:

```
const m = new Map().values();
const mProto = Object.getPrototypeOf(m);
```

|                                       | FF Nightly                      | Chrome Canary                   |
| ------------------------------------------ | ------------------------------- | ------------------------------- |
| `m[Symbol.toStringTag];`                   | "Map Iterator"                  | "Map Iterator"                  |
| `Object.prototype.toString.apply(m);`      | [object Map Iterator] | [object Map Iterator] |
| `mProto[Symbol.toStringTag];`              | "Map Iterator"                  | "Map Iterator"                  |
| `Object.prototype.toString.apply(mProto);` | [object Map Iterator] | [object Map Iterator] |



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/issues/419#issuecomment-323758107

Received on Monday, 21 August 2017 14:33:05 UTC