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

  • 3.1KB
7891011131415 30334142444953 354042464858 5.1678910

Array.isArray

  • 0.2KB
7891011131415 30334142444953 354042464858 5.1678910

Array.of

  • 0.4KB
7891011131415 30334142444953 354042464858 5.1678910

Array.prototype.@@iterator

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Array.prototype.contains

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Array.prototype.copyWithin

  • 0.9KB
7891011131415 30334142444953 354042464858 5.1678910

Array.prototype.entries

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Array.prototype.every

  • 0.3KB
7891011131415 30334142444953 354042464858 5.1678910

Array.prototype.fill

  • 0.5KB
7891011131415 30334142444953 354042464858 5.1678910

Array.prototype.filter

  • 0.4KB
7891011131415 30334142444953 354042464858 5.1678910

Array.prototype.find

  • 0.4KB
7891011131415 30334142444953 354042464858 5.1678910

Array.prototype.findIndex

  • 0.4KB
7891011131415 30334142444953 354042464858 5.1678910

Array.prototype.forEach

  • 0.3KB
7891011131415 30334142444953 354042464858 5.1678910

Array.prototype.includes

  • 0.3KB
7891011131415 30334142444953 354042464858 5.1678910

Array.prototype.indexOf

  • 0.3KB
7891011131415 30334142444953 354042464858 5.1678910

Array.prototype.keys

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Array.prototype.lastIndexOf

  • 0.3KB
7891011131415 30334142444953 354042464858 5.1678910

Array.prototype.map

  • 0.4KB
7891011131415 30334142444953 354042464858 5.1678910

Array.prototype.reduce

  • 0.5KB
7891011131415 30334142444953 354042464858 5.1678910

Array.prototype.reduceRight

  • 0.5KB
7891011131415 30334142444953 354042464858 5.1678910

Array.prototype.some

  • 0.4KB
7891011131415 30334142444953 354042464858 5.1678910

Array.prototype.values

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

AudioContext

  • 0.9KB
7891011131415 30334142444953 354042464858 5.1678910

CustomEvent

  • 0.5KB
7891011131415 30334142444953 354042464858 5.1678910

DOMTokenList

  • 1.2KB
7891011131415 30334142444953 354042464858 5.1678910

DOMTokenList.prototype.@@iterator

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Date.now

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Date.prototype.toISOString

  • 0.3KB
7891011131415 30334142444953 354042464858 5.1678910

Document

  • 0.3KB
7891011131415 30334142444953 354042464858 5.1678910

DocumentFragment

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

DocumentFragment.prototype.append

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

DocumentFragment.prototype.prepend

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Element

  • 1.3KB
7891011131415 30334142444953 354042464858 5.1678910

Element.prototype.after

  • 0.3KB
7891011131415 30334142444953 354042464858 5.1678910

Element.prototype.append

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Element.prototype.before

  • 0.4KB
7891011131415 30334142444953 354042464858 5.1678910

Element.prototype.classList

  • 0.8KB
7891011131415 30334142444953 354042464858 5.1678910

Element.prototype.cloneNode

  • 0.2KB
7891011131415 30334142444953 354042464858 5.1678910

Element.prototype.closest

  • 0.2KB
7891011131415 30334142444953 354042464858 5.1678910

Element.prototype.dataset

  • 0.5KB
7891011131415 30334142444953 354042464858 5.1678910

Element.prototype.matches

  • 0.3KB
7891011131415 30334142444953 354042464858 5.1678910

Element.prototype.placeholder

  • 1.3KB
7891011131415 30334142444953 354042464858 5.1678910

Element.prototype.prepend

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Element.prototype.remove

  • 0.2KB
7891011131415 30334142444953 354042464858 5.1678910

Element.prototype.replaceWith

  • 0.2KB
7891011131415 30334142444953 354042464858 5.1678910

Event

  • 3.3KB
7891011131415 30334142444953 354042464858 5.1678910
  • Where necessary, also adds the EventTarget methods addEventListener, removeEventListener and dispatchEvent.

Event.focusin

  • 0.2KB
7891011131415 30334142444953 354042464858 5.1678910

Event.hashchange

  • 0.2KB
7891011131415 30334142444953 354042464858 5.1678910

EventSource

  • 10.0KB
7891011131415 30334142444953 354042464858 5.1678910

Function.name

  • 0.3KB
7891011131415 30334142444953 354042464858 5.1678910
  • 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
7891011131415 30334142444953 354042464858 5.1678910

HTMLCanvasElement.prototype.toBlob

  • 0.3KB
7891011131415 30334142444953 354042464858 5.1678910

HTMLDocument

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

HTMLPictureElement

  • 16.8KB
7891011131415 30334142444953 354042464858 5.1678910

IntersectionObserver

  • 6.4KB
7891011131415 30334142444953 354042464858 5.1678910

IntersectionObserverEntry

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Intl

  • 40.3KB
7891011131415 30334142444953 354042464858 5.1678910
  • Locales must be specified separately by prefixing the locale name with Intl.~locale, eg Intl.~locale.en-GB.

JSON

  • 7.8KB
7891011131415 30334142444953 354042464858 5.1678910

Map

  • 9.0KB
7891011131415 30334142444953 354042464858 5.1678910
  • 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
7891011131415 30334142444953 354042464858 5.1678910

Math.asinh

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Math.atanh

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Math.cbrt

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Math.clz32

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Math.cosh

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Math.expm1

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Math.hypot

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Math.imul

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Math.log10

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Math.log1p

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Math.log2

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Math.sign

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Math.sinh

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Math.tanh

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Math.trunc

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

MutationObserver

  • 3.9KB
7891011131415 30334142444953 354042464858 5.1678910

Node.prototype.contains

  • 0.3KB
7891011131415 30334142444953 354042464858 5.1678910

NodeList.prototype.@@iterator

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Number.Epsilon

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Number.MAX_SAFE_INTEGER

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Number.MIN_SAFE_INTEGER

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Number.isFinite

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Number.isInteger

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Number.isNaN

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Number.isSafeInteger

  • 0.3KB
7891011131415 30334142444953 354042464858 5.1678910

Number.parseFloat

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Number.parseInt

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Object.assign

  • 0.5KB
7891011131415 30334142444953 354042464858 5.1678910

Object.create

  • 0.4KB
7891011131415 30334142444953 354042464858 5.1678910

Object.defineProperties

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Object.defineProperty

  • 1.1KB
7891011131415 30334142444953 354042464858 5.1678910
  • 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.entries

  • 0.2KB
91011131415 30334142444953 354042464858 5.1678910

Object.freeze

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Object.getOwnPropertyDescriptor

  • 0.9KB
7891011131415 30334142444953 354042464858 5.1678910

Object.getOwnPropertyNames

  • 0.3KB
7891011131415 30334142444953 354042464858 5.1678910

Object.getPrototypeOf

  • 0.3KB
7891011131415 30334142444953 354042464858 5.1678910

Object.is

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Object.keys

  • 1.7KB
7891011131415 30334142444953 354042464858 5.1678910

Object.setPrototypeOf

  • 0.6KB
7891011131415 30334142444953 354042464858 5.1678910

Object.values

  • 0.2KB
7891011131415 30334142444953 354042464858 5.1678910

Promise

  • 4.5KB
7891011131415 30334142444953 354042464858 5.1678910
  • 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

Promise.prototype.finally

  • 0.9KB
7891011131415 30334142444953 354042464858 5.1678910
  • The Promise polyfill includes Promise.prototype.finally, to avoid needlessly serving this polyfill to those browsers, we have configured the browser targets for this polyfill to not include those configured in the Promise polyfill.

RegExp.prototype.flags

  • 0.3KB
7891011131415 30334142444953 354042464858 5.1678910

Set

  • 1.5KB
7891011131415 30334142444953 354042464858 5.1678910
  • 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.fromCodePoint

  • 0.6KB
7891011131415 30334142444953 354042464858 5.1678910

String.prototype.@@iterator

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

String.prototype.codePointAt

  • 0.5KB
7891011131415 30334142444953 354042464858 5.1678910

String.prototype.contains

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

String.prototype.endsWith

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

String.prototype.includes

  • 0.2KB
7891011131415 30334142444953 354042464858 5.1678910

String.prototype.padEnd

  • 0.3KB
7891011131415 30334142444953 354042464858 5.1678910

String.prototype.padStart

  • 0.3KB
7891011131415 30334142444953 354042464858 5.1678910

String.prototype.repeat

  • 0.3KB
7891011131415 30334142444953 354042464858 5.1678910

String.prototype.startsWith

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

String.prototype.trim

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Symbol

  • 2.4KB
7891011131415 30334142444953 354042464858 5.1678910

Symbol.hasInstance

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Symbol.isConcatSpreadable

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Symbol.iterator

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Symbol.match

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Symbol.replace

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Symbol.species

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Symbol.split

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Symbol.toPrimitive

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Symbol.toStringTag

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Symbol.unscopables

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

URL

  • 7.4KB
7891011131415 30334142444953 354042464858 5.1678910
  • Polyfill requires Object getters so fails in IE < 8

UserTiming

  • 4.9KB
7891011131415 30334142444953 354042464858 5.1678910

WeakMap

  • 0.7KB
7891011131415 30334142444953 354042464858 5.1678910

WeakSet

  • 0.4KB
7891011131415 30334142444953 354042464858 5.1678910

WebAnimations

  • 44.6KB
7891011131415 30334142444953 354042464858 5.1678910

Window

  • 0.2KB
7891011131415 30334142444953 354042464858 5.1678910

XMLHttpRequest

  • 1.2KB
7891011131415 30334142444953 354042464858 5.1678910

atob

  • 0.8KB
7891011131415 30334142444953 354042464858 5.1678910

console

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

console.assert

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

console.clear

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

console.count

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

console.debug

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

console.dir

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

console.dirxml

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

console.error

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

console.exception

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

console.group

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

console.groupCollapsed

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

console.groupEnd

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

console.info

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

console.log

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

console.markTimeline

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

console.table

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

console.time

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

console.timeEnd

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

console.timeStamp

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

console.timeline

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

console.timelineEnd

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

console.trace

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

console.warn

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

devicePixelRatio

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910
  • 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.2KB
7891011131415 30334142444953 354042464858 5.1678910
  • 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
7891011131415 30334142444953 354042464858 5.1678910

document.head

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

document.querySelector

  • 0.7KB
7891011131415 30334142444953 354042464858 5.1678910

document.visibilityState

  • 0.3KB
7891011131415 30334142444953 354042464858 5.1678910
  • The alias PageVisibility works for this feature for backwards compatibility with the name under which it was previously (erroneously) available

fetch

  • 7.1KB
7891011131415 30334142444953 354042464858 5.1678910
  • Makes use of FormData, FileReader and Blob if they exist. Readable streams not supported. CORS (Cross Origin Resource Sharing) requests do not work in IE 9 or lower.

getComputedStyle

  • 1.9KB
7891011131415 30334142444953 354042464858 5.1678910

localStorage

  • 1.1KB
7891011131415 30334142444953 354042464858 5.1678910

location.origin

  • 0.3KB
7891011131415 30334142444953 354042464858 5.1678910

matchMedia

  • 1.5KB
7891011131415 30334142444953 354042464858 5.1678910

performance.now

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

requestAnimationFrame

  • 0.6KB
7891011131415 30334142444953 354042464858 5.1678910

screen.orientation

  • 0.9KB
7891011131415 30334142444953 354042464858 5.1678910
  • In IE <= 8 window.screen is read-only, so the orientation property is not definable

setImmediate

  • 1.5KB
7891011131415 30334142444953 354042464858 5.1678910

~html5-elements

  • 2.6KB
7891011131415 30334142444953 354042464858 5.1678910

~viewport

  • 0.7KB
7891011131415 30334142444953 354042464858 5.1678910

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)
chrome3581.5KB32.8KB8.5KB
chrome4049.9KB22.2KB6.6KB
chrome4248.6KB21.6KB6.4KB
chrome4624.2KB11.1KB3.3KB
chrome4820.9KB9.4KB2.8KB
chrome580.4KB0.2KB0.2KB
firefox3036.8KB15.4KB4.8KB
firefox3313.1KB5.4KB1.8KB
firefox416.1KB2.5KB0.8KB
firefox426.1KB2.5KB0.8KB
firefox446.1KB2.5KB0.8KB
firefox491.3KB0.6KB0.3KB
firefox530.5KB0.2KB0.2KB
ie7165.8KB56.4KB16.6KB
ie8131.8KB54.0KB15.6KB
ie9115.8KB50.3KB14.6KB
ie10109.2KB46.2KB13.0KB
ie11105.2KB44.1KB12.4KB
ie1333.1KB14.4KB4.3KB
ie1421.3KB9.7KB2.8KB
ie1521.3KB9.7KB2.8KB
safari6106.8KB45.7KB12.8KB
safari797.4KB42.0KB11.8KB
safari884.1KB33.0KB8.6KB
safari922.5KB10.0KB2.9KB
safari1016.1KB7.6KB2.3KB
safari5.1114.8KB46.9KB13.2KB
android582.9KB32.4KB8.4KB
android644.5KB19.3KB5.6KB
android744.5KB19.3KB5.6KB
android7.144.5KB19.3KB5.6KB
android5.144.5KB19.3KB5.6KB
ios_saf4100.6KB40.4KB11.2KB
ios_saf5100.6KB40.4KB11.2KB
ios_saf693.0KB39.4KB10.9KB
ios_saf791.0KB38.4KB10.7KB
ios_saf884.7KB33.1KB8.6KB
ios_saf10.316.1KB7.6KB2.3KB

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