[Webkit-unassigned] [Bug 20261] Support Array and String generic shorthands
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Dec 4 10:02:24 PST 2009
https://bugs.webkit.org/show_bug.cgi?id=20261
--- Comment #3 from Erik Arvidsson <arv at chromium.org> 2009-12-04 10:02:24 PST ---
(In reply to comment #2)
> (In reply to comment #1)
> > Re-titling to (hopefully) better match terminology found in aforementioned
> > developer.mozilla.org article. We do support generics, just not the new funny
> > syntax for them.
>
> Just to be clear - I had to try it in a console to be sure - you can call the
> existing Array methods via Array.prototype.[method].call() and pass Strings.
>
> > Array.prototype.slice.call("123")
> < ["1", "2", "3"]
Yes, but it is a verbose and confusing compared to:
Array.slice('123')
That is exactly why Mozilla added these to JS in Firefox 1.5 (?).
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list