Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#3742 closed defect (fixed)

Add support for Safari3's native array iteration methods

Reported by: Ben Lowery Owned by: Ben Lowery
Priority: high Milestone: 0.9
Component: General Version: 0.9
Keywords: Cc:
Blocked By: Blocking:


Safari3 added the fast native array iteration methods like map, forEach, etc. However, they did not add them to the Array object as methods callable by any array, instead they're solely on the Array.prototype. Add in proper detection and delegation.

Change History (3)

comment:1 Changed 15 years ago by Ben Lowery

Resolution: fixed
Status: newclosed

(In [9615]) fixes #3742. add support for native array iteration methods for safari3

comment:2 Changed 15 years ago by Ben Lowery

(In [9616]) refs #3742. fixup little whitespace issue.

comment:3 Changed 15 years ago by Ben Lowery

(In [9675]) refs #3769, refs #3742. Revert change to enable native array iteration methods on Safari3. The change fails the existing unit tests for array.js, and it does not appear that Safari3's implementation is sufficient for dojo's forEach contract. Specifically, forEach is not defined on String objects or null / undefined values, so call against those types fail with a TypeError?.

We could insert an adapter that used the fast path on Safari3 when available and fell back to the default Dojo implementation otherwise, but we'd need to vet that technique with performance testing. For now, I'm just reverting the change and we can figure out what we'd like to do long term.. later.

Note: See TracTickets for help on using tickets.