Ticket #3742 (closed defect: fixed)

Opened 17 months ago

Last modified 17 months ago

Add support for Safari3's native array iteration methods

Reported by: blowery Owned by: blowery
Priority: normal Milestone: 0.9
Component: General Version: 0.9
Severity: normal Keywords:
Cc:

Description

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

Changed 17 months ago by blowery

  • status changed from new to closed
  • resolution set to fixed

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

Changed 17 months ago by blowery

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

Changed 17 months ago by blowery

(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.