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
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.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.2KB
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

  • 0.3KB
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.2KB
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

  • 1.0KB
7891011131415 30334142444953 354042464858 5.1678910

Element.prototype.cloneNode

  • 0.2KB
7891011131415 30334142444953 354042464858 5.1678910

Element.prototype.closest

  • 0.1KB
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

  • 1.9KB
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.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.parseFloat

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Number.parseInt

  • 0.1KB
7891011131415 30334142444953 354042464858 5.1678910

Object.assign

  • 0.2KB
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.getOwnPropertyDescriptor

  • 0.9KB
7891011131415 30334142444953 354042464858 5.1678910

Object.getOwnPropertyNames

  • 0.3KB
7891011131415 30334142444953 354042464858 5.1678910

Object.getPrototypeOf

  • 0.2KB
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.

Set

  • 1.4KB
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.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.1KB
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.1KB
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.1KB
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.

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)
chrome3544.7KB19.3KB5.8KB
chrome4030.7KB13.5KB4.1KB
chrome4229.4KB12.9KB3.9KB
chrome4623.8KB10.9KB3.2KB
chrome4820.4KB9.2KB2.7KB
chrome580.2KB0.1KB0.1KB
firefox3015.1KB6.4KB2.2KB
firefox3311.1KB4.9KB1.7KB
firefox416.1KB2.5KB0.8KB
firefox426.1KB2.5KB0.8KB
firefox446.1KB2.5KB0.8KB
firefox491.2KB0.6KB0.3KB
firefox530.7KB0.4KB0.2KB
ie7122.2KB41.2KB13.4KB
ie887.1KB39.1KB12.3KB
ie969.5KB34.8KB11.3KB
ie1060.8KB29.6KB9.4KB
ie1156.8KB27.6KB8.8KB
ie1327.5KB12.5KB3.8KB
ie1420.8KB9.5KB2.7KB
ie1520.8KB9.5KB2.7KB
safari661.6KB30.0KB9.5KB
safari757.3KB27.9KB8.9KB
safari844.0KB18.9KB5.6KB
safari922.0KB9.8KB2.8KB
safari1015.6KB7.3KB2.2KB
safari5.169.5KB31.1KB9.8KB
android542.7KB18.3KB5.4KB
android628.7KB12.5KB3.8KB
android728.7KB12.5KB3.8KB
android7.128.7KB12.5KB3.8KB
android5.128.7KB12.5KB3.8KB
android4.452.3KB24.2KB7.7KB
ios_saf460.3KB26.3KB8.3KB
ios_saf560.3KB26.3KB8.3KB
ios_saf652.8KB25.3KB8.0KB
ios_saf750.8KB24.3KB7.8KB
ios_saf844.5KB19.0KB5.7KB
ios_saf10.315.6KB7.3KB2.2KB
ios_saf9.120.4KB9.2KB2.7KB

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