This is an important feature for OOP libraries: typically classes are emulated using functions, hence class *static* properties are properties of the function object that represents the class. Since '.name' and '.length' properties are read-only and non-configurable for functions, there is no way to have '.name' and '.length' static properties for classes. This is something that has already been fixed in Chrome and Firefox: - https://bugzilla.mozilla.org/show_bug.cgi?id=1084019 - https://chromium.googlesource.com/v8/v8/+/f6cd009efd7a032907b11265e74102b0d45207a1%5E!/ And InternetExplorer doesn't have any restrictions on these properties, which leaves WebKit/Safari the only browser that doesn't support this.
In short, the following should work: function f(){}; Object.defineProperty(f, 'name', {value: 'g'});
*** Bug 158062 has been marked as a duplicate of this bug. ***
Test for "length" in test262 at https://github.com/tc39/test262/blob/83b27c9beb7b3ea78b319148b5c82a5411a333b1/test/language/statements/function/13.2-15-1.js#L19
This is already fixed in ToT. You can verify this for yourself using Safari Technology Preview or a WebKit Nightly build (https://webkit.org/downloads/).