Bug 1729089 Comment 2 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

It looks like, for this JS Error's purposes, "iterable" literally means "has a property called Symbol.iterator, which returns a function that can be called", per https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/is_not_iterable .
 
And indeed, this returns `Undefined` in Firefox (rather than a function):
document.fonts.keys()[Symbol.iterator]
...whereas it returns a callable function in Chrome (and if I invoke that function, it returns an Iterator).

Given that our `FontFaceSetIterator` object does have a next() function (and hence behaves like an iterator from that standpoint), maybe we just need something akin to the trivial `[Symbol.iterator]: function() { return this; }` boilerplate on that MDN page, I wonder?
It looks like, for this JS Error's purposes, "iterable" literally means "has a property called Symbol.iterator, which returns a function that can be called", per https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/is_not_iterable .
 
And indeed, this returns `Undefined` in Firefox (rather than a function):
```
document.fonts.keys()[Symbol.iterator]
```
...whereas it returns a callable function in Chrome (and if I invoke that function, it returns an Iterator).

Given that our `FontFaceSetIterator` object does have a next() function (and hence behaves like an iterator from that standpoint), maybe we just need something akin to the trivial `[Symbol.iterator]: function() { return this; }` boilerplate on that MDN page, I wonder?

Back to Bug 1729089 Comment 2