I think this is a mistake (according to the comment below).
It seems that specifying an explicit constructor shows the correct behavior in Firefox (even the latest version 48).
class MyClassWithConstructor { constructor() { console.log("Explicit Constructor") } } class MyClassWithoutConstructor {} $('#with').click(function() { let tmp = new MyClassWithConstructor(); alert("MyClassWithConstructor name = " + tmp.constructor.name); }) $('#without').click(function() { let tmp = new MyClassWithoutConstructor(); alert("MyClassWithConstructor name = " + tmp.constructor.name); })
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <button id=with>With Constructor</button> <button id=without>Without Constructor</button>
Here's a link to JSFiddle: https://jsfiddle.net/jc7g5crp/
source share