See also: T89721: Static methods can't know which class they belong to or which class they're called with
In order to migrate from our .static container to native properties on the function object. The most common one is name, like in OO.ui.Dialog.static.name.
Here is a complete list of reserved static property names (most of which we are not using, so that's good).
Unsafe:
- Function (used to interact with class and constructor)
- fn.constructor
- fn.prototype
- fn.length
- fn.name
- fn.toString
Safe (can be overridden as own properties, where needed methods can and should never be called on foreign objects anyway)
- Object
- toLocaleString
- valueOf
- hasOwnProperty
- isPrototypeOf
- propertyIsEnumerable
- Function
- fn.apply
- fn.call
- fn.bind
fn.arity(obsolete, safe now)fn.displayName(obsolete, safe now)fn.toSource(old Firefox, safe now)fn.isGenerator(old Firefox, safe now)fn.arguments(obsolete, safe now)fn.caller(obsolete, safe now)