Testing

ES6 Class: Browser Support, Features, Known Issues

ES6 classes work in Chrome 49+, Edge 13+, Firefox 45+, Safari 9+ on macOS and iOS, Opera 36+, and Samsung Internet 5+. Learn ES6 class browser support, features, and known issues.

Author

Prince Dewani

May 1, 2026

ES6 Class is JavaScript syntax that Ecma TC39 added in ECMAScript 2015 to declare object templates with constructors, methods, and prototype-based inheritance. It works in Chrome 49+, Edge 13+, Firefox 45+, Safari 9+ on macOS and iOS, Opera 36+, and Samsung Internet 5+, while Internet Explorer never added support.

This guide covers what ES6 Class is, the browsers that support it, the key features, how to check support, the difference between ES6 classes and ES5 prototypes, and the known issues.

What is ES6 Class?

ES6 Class is the class declaration syntax in ECMAScript 2015, the sixth edition of the ECMA-262 standard published by Ecma International's TC39 committee. It uses the class keyword to declare object templates with a constructor, instance methods, static methods, getters and setters, and prototype-based inheritance through extends and super.

Which browsers does ES6 Class support?

ES6 classes work in every modern desktop and mobile browser by default, with Chrome, Edge, Firefox, Safari, Opera, and Samsung Internet all shipping the full class declaration syntax. Internet Explorer is the only major holdout, and it does not parse the class keyword in any version.

Loading browser compatibility data...

ES6 Class compatibility in Chrome

Chrome supports ES6 classes from Chrome 49 on Windows, macOS, Linux, ChromeOS, and Android. Chrome 42 to 48 had partial support behind the Experimental JavaScript flag at chrome://flags. Chrome 4 to 41 did not parse the class keyword. Chrome for Android matches desktop Chrome from Chrome 49 on Android 4.1 and later.

ES6 Class compatibility in Edge

Microsoft Edge supports ES6 classes from Edge 13 on Windows 10, the EdgeHTML release that completed the class declaration parser. Edge 12 did not parse the class keyword. Chromium-based Edge from Edge 79 inherits Chrome's full class support on Windows, macOS, Linux, and Android.

ES6 Class compatibility in Firefox

Firefox supports ES6 classes from Firefox 45 on Windows, macOS, Linux, and Android. Firefox 1 to 44 threw a SyntaxError on any class declaration. Firefox for Android shipped class support in the same Firefox 45 release, and the version numbers for desktop Firefox and Firefox for Android have stayed in sync ever since.

ES6 Class compatibility in Safari

Safari supports ES6 classes from Safari 9 on macOS El Capitan and from Safari 9 on iOS 9. WebKit shipped most class plumbing in Safari 9.1 and finished the spec in Safari 10, including subclassing built-ins like Array and Error. Safari 8 and earlier do not parse the class keyword on either macOS or iOS.

ES6 Class compatibility in Opera

Opera supports ES6 classes from Opera 36, which tracks the same Chromium engine as Chrome 49. Opera 29 to 35 had partial support behind the experimental flag, mirroring Chromium's progress. Opera Mobile 36 and later support classes on Android. Opera 12 and earlier on the Presto engine do not parse the class keyword.

ES6 Class compatibility in Samsung Internet

Samsung Internet supports ES6 classes from Samsung Internet 5 on Galaxy phones and tablets. Samsung Internet 4 did not support classes. The browser is built on Chromium, so the class rollout matches Chrome for Android from version 5 on, including support for extends and super.

ES6 Class compatibility in Android Browser

Chrome for Android supports ES6 classes from Chrome 49 on Android 4.1 and later. The legacy stock Android Browser shipped with Android 4.4 and earlier does not parse the class keyword. Modern Android phones use Chrome for Android, Samsung Internet, or Firefox for Android, all of which support ES6 classes by default.

ES6 Class compatibility in Internet Explorer

Internet Explorer does not support ES6 classes in any version. IE 9, 10, and 11 throw a SyntaxError on the class keyword and stop parsing the rest of the script. Microsoft has retired Internet Explorer, so any new ES6 class work targets Edge or another modern browser. Sites that still serve IE 11 traffic must compile classes to ES5 prototype code with Babel or TypeScript.

Note

Note: ES6 class syntax breaks across Internet Explorer and legacy mobile WebViews. Test it on real browsers and OS with TestMu AI. Try TestMu AI free!

What are the key features of ES6 classes?

ES6 classes formalize the JavaScript pattern of building constructor functions and prototype chains by hand. The class keyword wraps every important piece of object-oriented JavaScript, including instance state, methods, static members, accessors, private fields, and inheritance.

  • Constructor: The constructor() method runs once per new call and initialises instance state. Subclass constructors must call super() before they touch this.
  • Instance methods: Methods declared inside the class body live on the prototype, so every instance shares one copy. Methods can be regular, async, or generator functions.
  • Static methods and fields: The static keyword attaches methods or fields to the class itself, not the instance. Useful for factories, helpers, and constants tied to the type.
  • Getters and setters: The get and set accessors let you expose computed properties that read or write through plain property access, instead of explicit method calls.
  • Private fields and methods: A leading hash on a name marks a field or method as private. Outside code that touches instance.#name throws a SyntaxError at parse time.
  • Inheritance with extends: The extends keyword builds the prototype chain between parent and child. The child can call super.method() to reach the parent's implementation, including from inside the constructor.
  • Strict mode by default: The class body always runs in strict mode, so this is undefined inside a method called without a receiver, and silent assignment errors become real exceptions.
  • Hoisting and TDZ: Class declarations are hoisted to the top of the block but stay in the temporal dead zone until execution reaches them. Touching the class name above the declaration throws a ReferenceError.

How do you check if a browser supports ES6 classes?

You can confirm ES6 class support inside any browser by trying to compile a small block of class syntax with the Function constructor. The Function constructor throws a SyntaxError on engines that cannot parse the class keyword, which gives you a reliable yes or no answer without breaking the rest of the page.

Paste this snippet into the browser DevTools console to confirm class support and the related private-fields hook:

// Paste this into the browser DevTools console to test ES6 class support.
function supportsEs6Class() {
  try {
    new Function("class Box { constructor(v) { this.v = v; } static of(v) { return new Box(v); } }");
    new Function("class A {}; class B extends A { constructor() { super(); } }");
    return true;
  } catch (e) {
    return false;
  }
}

function supportsPrivateFields() {
  try {
    new Function("class T { #x = 1; getX() { return this.#x; } }");
    return true;
  } catch (e) {
    return false;
  }
}

console.log("ES6 class supported:", supportsEs6Class());
console.log("Private fields supported:", supportsPrivateFields());

If supportsEs6Class() returns true, the engine handles the constructor, static methods, extends, and super in a single class declaration. The supportsPrivateFields() check tells you whether the same engine accepts the hash-prefix syntax for private state, which is the gate for production code that uses #fields.

...

What is the difference between ES6 classes and ES5 prototypes?

An ES5 constructor function is a regular function called with new, with methods attached one by one to the prototype. An ES6 class wraps the same prototype machinery in a single declaration and adds static, extends, and private fields on top.

DimensionES5 prototypeES6 class
Declarationfunction Foo() with manual prototype setupclass Foo with all methods inside the body
Method definitionFoo.prototype.bar = function () Method shorthand inside the class body
InheritanceManual Object.create and Foo.prototype = ... wiringextends keyword and super() call in the constructor
Static membersFoo.staticMethod = function () attached to the functionstatic keyword inside the class body
HoistingFunction declarations hoisted with the function bodyClass declarations hoisted but stay in the temporal dead zone
Strict modeOpt-in with "use strict"Always strict inside the class body
Private stateClosure pattern or underscore convention#field private fields and #method private methods
Browser reachEvery browser including IE 9, 10, and 11Chrome 49+, Firefox 45+, Safari 9+, Edge 13+, Opera 36+, Samsung Internet 5+. IE has no support.

What are the known issues with ES6 classes?

ES6 class syntax has near-universal modern support, but a few real failure modes still bite teams that target older Windows fleets, embedded WebViews, or features layered on top of the basic class declaration. The biggest hits are Internet Explorer, late sub-features like private fields, and Babel down-compilation quirks.

  • Internet Explorer never added support: IE 9, 10, and 11 throw SyntaxError on the class keyword. Because the parse fails, the whole script fails to load, not just the class statement, so the page silently breaks.
  • Private fields shipped late: The hash-prefix private fields landed in Chrome 74, Firefox 90, and Safari 14.1. Code that uses #fields throws on older versions even when the basic class syntax works.
  • Subclassing built-ins is uneven on legacy engines: Extending Array, Error, or Map needs Reflect.construct or Object.setPrototypeOf calls in older Safari and EdgeHTML, where the prototype chain on the subclass instance comes back wrong.
  • Babel down-compilation loses sub-features: When Babel targets ES5, private fields collapse into WeakMaps, instanceof checks against subclassed built-ins return false, and static blocks lose their evaluation order.
  • No multiple inheritance: ES6 only supports single inheritance through extends. Mixins still need a manual factory function that returns a class expression, which Babel and TypeScript both compile correctly but eslint sometimes flags.
  • Hoisting gotcha: Class declarations sit in the temporal dead zone until the runtime reaches the declaration, so any reference above the line throws a ReferenceError. This trips developers used to function declarations being callable above their definition.
  • this binding inside methods: Class methods do not auto-bind to the instance. Passing instance.method as a callback strips this, which is the most common runtime bug in React class components and event handlers.

In my experience, the most surprising failure happens on enterprise Windows fleets where IE 11 still loads in compatibility mode for one internal app. A single inline class declaration in a third-party widget script crashes the whole page with "Object doesn't support this property or method", and the error never surfaces in dev tools because IE silently skips the rest of the script. Always wrap third-party widgets in a feature detect or a Babel build before shipping to a Windows enterprise audience.

...

Citations

All ES6 class version numbers and feature notes in this guide come from these primary sources:

Author

Prince Dewani is a Community Contributor at TestMu AI, where he manages content strategies around software testing, QA, and test automation. He is certified in Selenium, Cypress, Playwright, Appium, Automation Testing, and KaneAI. Prince has also presented academic research at the international conference PBCON-01. He further specializes in on-page SEO, bridging marketing with core testing technologies. On LinkedIn, he is followed by 4,300+ QA engineers, developers, DevOps experts, tech leaders, and AI-focused practitioners in the global testing community.

Open in ChatGPT Icon

Open in ChatGPT

Open in Claude Icon

Open in Claude

Open in Perplexity Icon

Open in Perplexity

Open in Grok Icon

Open in Grok

Open in Gemini AI Icon

Open in Gemini AI

Copied to Clipboard!
...

3000+ Browsers. One Platform.

See exactly how your site performs everywhere.

Try it free
...

Write Tests in Plain English with KaneAI

Create, debug, and evolve tests using natural language.

Try for free

Frequently asked questions

Did you find this page helpful?

More Related Hubs

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests