Ticket #2167 (closed feature: fixed)

Opened 4 years ago

Last modified 3 years ago

use indexOf native function when available

Reported by: arno Owned by:
Priority: minor Milestone: 2.9 Release
Component: general Version: 2.8
Keywords: Cc:
State: Complete

Description

Hi, as internet explorer does not support indexOf method for arrays, openlayers implement a custom function OpenLayers.Util.indexOf. But executing this javascript function in probably slower than native methods on browser implementing indexOf natively.

So, what about checking if indexOf is defined and executing it's defined ?

Attachments

2167.patch Download (1.0 KB) - added by arno 4 years ago.
patch v1

Change History

Changed 4 years ago by arno

patch v1

Changed 4 years ago by arno

  • keywords review added

Changed 3 years ago by fredj

  • keywords review removed
  • state set to Review

Changed 3 years ago by ahocevar

  • state changed from Review to Commit

Looks good to me. Please commit if you can confirm that tests still pass.

Changed 3 years ago by fredj

tests pass on FF, Chrome and IE7

Changed 3 years ago by fredj

  • status changed from new to closed
  • state changed from Commit to Complete
  • resolution set to fixed

fixed in r9859

Note: See TracTickets for help on using tickets.