Closed Bug 1294635 Opened 8 years ago Closed 7 years ago

Polyfills from site are not working properly in IE11

Categories

(Developer Documentation Graveyard :: JavaScript, defect, P5)

All
Other
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: llamerr, Unassigned)

Details

:: Developer Documentation Request

      Request Type: Correction
     Gecko Version: unspecified
 Technical Contact: 

:: Details

I copied polyfill for Array.find from documentation and now discovered that IE11 iterates over them when I iterate over array with for..in. When I defined polyfill with 

Object.defineProperty(Array.prototype, 'find', {
      enumerable: false,

it started working properly. I seen this form of polyfill used in multiple places before, but it seems only way it can affect IE11 is through arrays with for..in, so it might apply only to array polyfills. Should I just update documentation polyfills for it manually or is there some way to confirm it/apply it globally?
this is the polyfill I used https://jsfiddle.net/77pm6exf/
Component: General → JavaScript
The Polyfill has been updated several times now, uses Object.defineProperty, and aims to closely follow the spec: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find#Polyfill
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.