This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Should the code, `Array.prototype.slice.call(TTObj, 0)`, be able to convert either TextTrackLists or TextTrackCueLists to arrays? Currently this works on Chrome, but not on Firefox. If so, can there be some clarification added to the spec on whether or not this should work.
> Currently this works on Chrome, but not on Firefox. It seems to work just fine in Firefox, as expected. Why do you think it doesn't work?
(In reply to Boris Zbarsky from comment #1) > It seems to work just fine in Firefox, as expected. Why do you think it > doesn't work? Yeah, you're right Boris... It seems like I've been testing this wrong. I didn't understand the issue clearly. Should we still add clarification to the spec around this? I'm not sure what objects count as `able to be converted to an array`, that's kind of vague to me, unless I'm missing something. It's also unclear to me that TextTrack(Cue)Lists should be able to do this.
> I'm not sure what objects count as `able to be converted to an array` See the spec for Array.prototype.slice at http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype.slice Basically, as long as it has a "length" property and then has numbered properties from 0 to length-1, slice() will produce an array from it. That's obviously true for these objects, given their .length and indexed getter.
(In reply to Boris Zbarsky from comment #3) > See the spec for Array.prototype.slice at > http://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.prototype. > slice > > Basically, as long as it has a "length" property and then has numbered > properties from 0 to length-1, slice() will produce an array from it. > > That's obviously true for these objects, given their .length and indexed > getter. Okay, that makes sense. That's why it just works. Thanks! Closing this as invalid.