Polyfill.io

Features and browsers supported

We test browser support with a test suite for each feature. A browser is considered compliant only if it passes all the tests, so this is a reasonably comprehensive test rather than a naive feature-detect. To view the test suite for a feature in the browser you're using right now, click the Tests link in the feature list. The results below are generated using browsers hosted by BrowserStack.

Feature list

Key: Feature missing, Feature supported with Polyfill service, Feature supported natively, Included by default

IE & Edge Firefox Chrome Safari Your browser

Array.from

  • 0.9KB
78910111314 303341424449 354042464854 5.189

Array.isArray

  • 0.2KB
78910111314 303341424449 354042464854 5.189

Array.of

  • 0.4KB
78910111314 303341424449 354042464854 5.189

Array.prototype.@@iterator

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Array.prototype.contains

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Array.prototype.entries

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Array.prototype.every

  • 0.3KB
78910111314 303341424449 354042464854 5.189

Array.prototype.fill

  • 0.5KB
78910111314 303341424449 354042464854 5.189

Array.prototype.filter

  • 0.4KB
78910111314 303341424449 354042464854 5.189

Array.prototype.find

  • 0.4KB
78910111314 303341424449 354042464854 5.189

Array.prototype.findIndex

  • 0.4KB
78910111314 303341424449 354042464854 5.189

Array.prototype.forEach

  • 0.3KB
78910111314 303341424449 354042464854 5.189

Array.prototype.includes

  • 0.2KB
78910111314 303341424449 354042464854 5.189

Array.prototype.indexOf

  • 0.3KB
78910111314 303341424449 354042464854 5.189

Array.prototype.keys

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Array.prototype.lastIndexOf

  • 0.3KB
78910111314 303341424449 354042464854 5.189

Array.prototype.map

  • 0.4KB
78910111314 303341424449 354042464854 5.189

Array.prototype.reduce

  • 0.5KB
78910111314 303341424449 354042464854 5.189

Array.prototype.reduceRight

  • 0.5KB
78910111314 303341424449 354042464854 5.189

Array.prototype.some

  • 0.4KB
78910111314 303341424449 354042464854 5.189

Array.prototype.values

  • 0.1KB
78910111314 303341424449 354042464854 5.189

AudioContext

  • 0.9KB
78910111314 303341424449 354042464854 5.189

CustomEvent

  • 0.5KB
78910111314 303341424449 354042464854 5.189

DOMTokenList

  • 0.3KB
78910111314 303341424449 354042464854 5.189

DOMTokenList.prototype.@@iterator

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Date.now

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Date.prototype.toISOString

  • 0.3KB
78910111314 303341424449 354042464854 5.189

Document

  • 0.2KB
78910111314 303341424449 354042464854 5.189

Element

  • 1.3KB
78910111314 303341424449 354042464854 5.189

Element.prototype.after

  • 0.2KB
78910111314 303341424449 354042464854 5.189

Element.prototype.append

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Element.prototype.before

  • 0.2KB
78910111314 303341424449 354042464854 5.189

Element.prototype.classList

  • 1.0KB
78910111314 303341424449 354042464854 5.189

Element.prototype.cloneNode

  • 0.2KB
78910111314 303341424449 354042464854 5.189

Element.prototype.closest

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Element.prototype.dataset

  • 0.5KB
78910111314 303341424449 354042464854 5.189

Element.prototype.matches

  • 0.3KB
78910111314 303341424449 354042464854 5.189

Element.prototype.placeholder

  • 1.3KB
78910111314 303341424449 354042464854 5.189

Element.prototype.prepend

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Element.prototype.remove

  • 0.2KB
78910111314 303341424449 354042464854 5.189

Element.prototype.replaceWith

  • 0.2KB
78910111314 303341424449 354042464854 5.189

Event

  • 3.2KB
78910111314 303341424449 354042464854 5.189
  • Where necessary, also adds the EventTarget methods addEventListener, removeEventListener and dispatchEvent.

Event.focusin

  • 0.2KB
78910111314 303341424449 354042464854 5.189

Event.hashchange

  • 0.2KB
78910111314 303341424449 354042464854 5.189

Function.name

  • 0.3KB
78910111314 303341424449 354042464854 5.189
  • A polyfill for the basic functionality of the Function.name accessor property in its pre-ES6 form.

  • This polyfilled Function.name accessor property can provide you with the name of a named function definition (either a named function declaration or a named function expression).

  • Unlike other browsers with a similar support level for the pre-ES6 form, this polyfilled name accessor property is also intentionally marked as configurable.

  • When polyfilling for Chrome <5, the accessor property will be both configurable (expected) AND enumerable (unexpected) due to having to implement it using Object.prototype.__defineGetter__ instead of Object.defineProperty.

Function.prototype.bind

  • 1.0KB
78910111314 303341424449 354042464854 5.189

HTMLCanvasElement.protoype.toBlob

  • 0.3KB
78910111314 303341424449 354042464854 5.189

HTMLDocument

  • 0.1KB
78910111314 303341424449 354042464854 5.189

HTMLPictureElement

  • 16.9KB
78910111314 303341424449 354042464854 5.189

IntersectionObserver

  • 6.1KB
78910111314 303341424449 3540424648 5.189

Intl

  • 40.3KB
78910111314 303341424449 354042464854 5.189
  • Locales must be specified separately by prefixing the locale name with Intl.~locale, eg Intl.~locale.en-GB.

JSON

  • 7.6KB
78910111314 303341424449 354042464854 5.189

Map

  • 1.7KB
78910111314 303341424449 354042464854 5.189
  • For compatibility with very old engines, Map.prototype.delete must be accessed using square bracket notation because 'delete' is a reserved word. myMap.delete() is an error in IE8. Use myMap['delete']() instead.

  • The test suite for this polyfill is derived from work of Andrea Giammarchi which is published under an MIT licence

Math.acosh

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Math.asinh

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Math.atanh

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Math.cbrt

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Math.clz32

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Math.cosh

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Math.expm1

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Math.hypot

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Math.imul

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Math.log10

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Math.log1p

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Math.log2

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Math.sign

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Math.sinh

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Math.tanh

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Math.trunc

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Node.prototype.contains

  • 0.3KB
78910111314 303341424449 354042464854 5.189

NodeList.prototype.@@iterator

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Number.MAX_SAFE_INTEGER

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Number.MIN_SAFE_INTEGER

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Number.isFinite

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Number.isInteger

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Number.isNaN

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Object.assign

  • 0.2KB
78910111314 303341424449 354042464854 5.189

Object.create

  • 0.4KB
78910111314 303341424449 354042464854 5.189

Object.defineProperties

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Object.defineProperty

  • 1.0KB
78910111314 303341424449 354042464854 5.189
  • In browsers that have no hooks to define getter functions (notably IE <= 8), attempting to defineProperty with a getter or setter function will fail. Since failing silently would likely break your application, we throw an exception. In IE8, this can be hard to diagnose because the console will just say 'Exception thrown and not caught'

Object.getOwnPropertyDescriptor

  • 0.9KB
78910111314 303341424449 354042464854 5.189

Object.getOwnPropertyNames

  • 0.4KB
78910111314 303341424449 354042464854 5.189

Object.getPrototypeOf

  • 0.2KB
78910111314 303341424449 354042464854 5.189

Object.is

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Object.keys

  • 0.5KB
78910111314 303341424449 354042464854 5.189

Object.setPrototypeOf

  • 0.6KB
78910111314 303341424449 354042464854 5.189

Promise

  • 4.5KB
78910111314 303341424449 354042464854 5.189
  • In IE8, the catch & finally method cannot be invoked directly since they are reserved words. Instead, use ["catch"] and ["finally"] if intend to run your code in IE8

Set

  • 1.4KB
78910111314 303341424449 354042464854 5.189
  • For compatibility with very old engines, Set.prototype.delete must be accessed using square bracket notation because 'delete' is a reserved word. mySet.delete() is an error in IE8. Use mySet['delete']() instead.

  • The test suite for this polyfill is derived from work of Andrea Giammarchi which is published under an MIT licence

String.prototype.contains

  • 0.1KB
78910111314 303341424449 354042464854 5.189

String.prototype.endsWith

  • 0.1KB
78910111314 303341424449 354042464854 5.189

String.prototype.includes

  • 0.2KB
78910111314 303341424449 354042464854 5.189

String.prototype.repeat

  • 0.3KB
78910111314 303341424449 354042464854 5.189

String.prototype.startsWith

  • 0.1KB
78910111314 303341424449 354042464854 5.189

String.prototype.trim

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Symbol

  • 2.4KB
78910111314 303341424449 354042464854 5.189

Symbol.hasInstance

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Symbol.isConcatSpreadable

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Symbol.iterator

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Symbol.match

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Symbol.replace

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Symbol.species

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Symbol.split

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Symbol.toPrimitive

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Symbol.toStringTag

  • 0.1KB
78910111314 303341424449 354042464854 5.189

Symbol.unscopables

  • 0.1KB
78910111314 303341424449 354042464854 5.189

URL

  • 6.3KB
78910111314 303341424449 354042464854 5.189
  • searchParams is not iterable and has no forEach(), entries(), keys(), values() methods

  • Polyfill requires Object getters so fails in IE < 8

UserTiming

  • 5.0KB
78910111314 303341424449 354042464854 5.189

WeakMap

  • 0.7KB
78910111314 303341424449 354042464854 5.189

WeakSet

  • 0.4KB
78910111314 303341424449 354042464854 5.189

Window

  • 0.1KB
78910111314 303341424449 354042464854 5.189

XMLHttpRequest

  • 1.1KB
78910111314 303341424449 354042464854 5.189

atob

  • 0.8KB
78910111314 303341424449 354042464854 5.189

console

  • 0.1KB
78910111314 303341424449 354042464854 5.189

console.assert

  • 0.1KB
78910111314 303341424449 354042464854 5.189

console.clear

  • 0.1KB
78910111314 303341424449 354042464854 5.189

console.count

  • 0.1KB
78910111314 303341424449 354042464854 5.189

console.debug

  • 0.1KB
78910111314 303341424449 354042464854 5.189

console.dir

  • 0.1KB
78910111314 303341424449 354042464854 5.189

console.dirxml

  • 0.1KB
78910111314 303341424449 354042464854 5.189

console.error

  • 0.1KB
78910111314 303341424449 354042464854 5.189

console.exception

  • 0.1KB
78910111314 303341424449 354042464854 5.189

console.group

  • 0.1KB
78910111314 303341424449 354042464854 5.189

console.groupCollapsed

  • 0.1KB
78910111314 303341424449 354042464854 5.189

console.groupEnd

  • 0.1KB
78910111314 303341424449 354042464854 5.189

console.info

  • 0.1KB
78910111314 303341424449 354042464854 5.189

console.log

  • 0.1KB
78910111314 303341424449 354042464854 5.189

console.markTimeline

  • 0.1KB
78910111314 303341424449 354042464854 5.189

console.table

  • 0.1KB
78910111314 303341424449 354042464854 5.189

console.time

  • 0.1KB
78910111314 303341424449 354042464854 5.189

console.timeEnd

  • 0.1KB
78910111314 303341424449 354042464854 5.189

console.timeStamp

  • 0.1KB
78910111314 303341424449 354042464854 5.189

console.timeline

  • 0.1KB
78910111314 303341424449 354042464854 5.189

console.timelineEnd

  • 0.1KB
78910111314 303341424449 354042464854 5.189

console.trace

  • 0.1KB
78910111314 303341424449 354042464854 5.189

console.warn

  • 0.1KB
78910111314 303341424449 354042464854 5.189

devicePixelRatio

  • 0.1KB
78910111314 303341424449 354042464854 5.189
  • This polyfill just sets devicePixelRatio to 1 without attempting to measure it.

  • Older versions of Firefox are known to incorrectly alter the DPR on user zoom, but we don't (currently) correct for this

document.currentScript

  • 1.1KB
78910111314 303341424449 354042464854 5.189
  • This polyfill will not work in IE11 because of a critical design choice made Microsoft ("Don't Call Me IE!") [1][2][3][4] in order to avoid consumers receiving an unnecessarily downgraded experience on websites that were making logic branch and feature decisions based on browser detection rather than feature detection.

document.getElementsByClassName

  • 0.1KB
78910111314 303341424449 354042464854 5.189

document.head

  • 0.1KB
78910111314 303341424449 354042464854 5.189

document.querySelector

  • 0.7KB
78910111314 303341424449 354042464854 5.189

document.visibilityState

  • 0.3KB
78910111314 303341424449 354042464854 5.189
  • The alias PageVisibility works for this feature for backwards compatibility with the name under which it was previously (erroneously) available

fetch

  • 5.6KB
78910111314 303341424449 354042464854 5.189
  • Makes use of FormData, FileReader and Blob if they exist. Readable streams not supported.

getComputedStyle

  • 1.9KB
78910111314 303341424449 354042464854 5.189

localStorage

  • 1.1KB
78910111314 303341424449 354042464854 5.189

location.origin

  • 0.3KB
78910111314 303341424449 354042464854 5.189

matchMedia

  • 1.4KB
78910111314 303341424449 354042464854 5.189

performance.now

  • 0.1KB
78910111314 303341424449 354042464854 5.189

requestAnimationFrame

  • 0.6KB
78910111314 303341424449 354042464854 5.189

screen.orientation

  • 0.9KB
78910111314 303341424449 354042464854 5.189
  • In IE <= 8 window.screen is read-only, so the orientation property is not definable

setImmediate

  • 1.6KB
78910111314 303341424449 354042464854 5.189

~html5-elements

  • 2.6KB
78910111314 303341424449 354042464854 5.189

~viewport

  • 0.7KB
78910111314 303341424449 354042464854 5.189

Bundle sizes

The table above lists a data size for each polyfill, which is the size of the polyfill including a feature detect, after minification, and before gzip. Two very important things to remember about these sizes are:

  • Gzip gets more effective the larger the data is, so the more polyfills you include in the bundle you request, the smaller each individual polyfill is likely to be, once the bundle is gzipped.
  • Some polyfills have multiple variants. In these cases, the size of the largest variant is shown.

The following table shows the total size of the polyfill bundle for the default set, in all our test browsers:

BrowserVersionSize (raw)Size (min)Size (gzip)
chrome3535.9KB15.7KB4.7KB
chrome4022.5KB10.2KB3.1KB
chrome4221.3KB9.6KB2.9KB
chrome4616.1KB7.6KB2.2KB
chrome4816.1KB7.6KB2.2KB
chrome543.2KB1.3KB0.5KB
ios_saf9.216.1KB7.6KB2.2KB
ios_saf9.116.1KB7.6KB2.2KB
android4.254.4KB24.3KB7.8KB
android5.123.3KB10.6KB3.2KB
android4.452.7KB23.5KB7.6KB
android4.354.4KB24.3KB7.8KB
safari832.5KB14.1KB4.4KB
safari918.1KB8.3KB2.5KB
safari5.167.2KB29.2KB9.3KB
ie7117.0KB39.0KB12.7KB
ie887.4KB38.3KB12.1KB
ie966.9KB32.8KB10.7KB
ie1052.2KB26.2KB8.3KB
ie1151.6KB25.9KB8.3KB
ie1324.0KB11.2KB3.4KB
ie1416.9KB8.0KB2.4KB
firefox309.3KB3.9KB1.4KB
firefox335.7KB2.5KB0.9KB
firefox414.1KB1.7KB0.6KB
firefox424.1KB1.7KB0.6KB
firefox444.1KB1.7KB0.6KB
firefox490.8KB0.4KB0.2KB

Default sets

The alias default includes a set of polyfills that comprise features with high demands, small polyfill sizes, good performance and at least one good native implementation in a stable browser. The set evolves over time to include new features as they become a more stable part of the web platform.

Although you cannot request an immutable version of a polyfill, you can reduce the risk of future releases of the polyfill service breaking compatibility with your code by using an immutable default set. Each time we make a release, if we have changed the features included in the default set we will issue a new immutable alias for the set, which won't change when the default set changes again. The components of these sets are shown below:

AliasConstituents
default-3.3Array.isArray, Array.prototype.every, Array.prototype.filter, Array.prototype.forEach, Array.prototype.indexOf, Array.prototype.lastIndexOf, Array.prototype.map, Array.prototype.reduce, Array.prototype.reduceRight, Array.prototype.some, atob, CustomEvent, Date.now, Date.prototype.toISOString, Document, document.querySelector, document.visibilityState, DOMTokenList, Element, Element.prototype.classList, Element.prototype.cloneNode, Element.prototype.closest, Element.prototype.matches, Event, Event.DOMContentLoaded, Event.focusin, Event.hashchange, Function.prototype.bind, JSON, Object.assign, Object.create, Object.defineProperties, Object.defineProperty, Object.getOwnPropertyNames, Object.getPrototypeOf, Object.keys, requestAnimationFrame, String.prototype.includes, String.prototype.trim, Window, XMLHttpRequest, ~html5-elements
default-3.4Added Array.from, Array.of, Array.prototype.fill, Element.prototype.after, Element.prototype.append, Element.prototype.before, Element.prototype.prepend, Element.prototype.remove, Element.prototype.replaceWith, Node.prototype.contains, Number.isNaN, Promise, String.prototype.endsWith, String.prototype.startsWith, URL, location.origin
default-3.5Added Object.getOwnPropertyDescriptor
default-3.6Added Map, Set