diff --git a/Userland/Libraries/LibJS/Runtime/CommonPropertyNames.h b/Userland/Libraries/LibJS/Runtime/CommonPropertyNames.h index bc037c5ffe..2f97beebb8 100644 --- a/Userland/Libraries/LibJS/Runtime/CommonPropertyNames.h +++ b/Userland/Libraries/LibJS/Runtime/CommonPropertyNames.h @@ -24,7 +24,9 @@ namespace JS { P(LOG10E) \ P(LOG2E) \ P(MAX_SAFE_INTEGER) \ + P(MAX_VALUE) \ P(MIN_SAFE_INTEGER) \ + P(MIN_VALUE) \ P(Math) \ P(NEGATIVE_INFINITY) \ P(NaN) \ diff --git a/Userland/Libraries/LibJS/Runtime/NumberConstructor.cpp b/Userland/Libraries/LibJS/Runtime/NumberConstructor.cpp index cf53d2e4f6..57d07fb555 100644 --- a/Userland/Libraries/LibJS/Runtime/NumberConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/NumberConstructor.cpp @@ -40,6 +40,8 @@ void NumberConstructor::initialize(GlobalObject& global_object) define_property(vm.names.prototype, global_object.number_prototype(), 0); define_property(vm.names.length, Value(1), Attribute::Configurable); define_property(vm.names.EPSILON, Value(EPSILON_VALUE), 0); + define_property(vm.names.MAX_VALUE, Value(NumericLimits::max()), 0); + define_property(vm.names.MIN_VALUE, Value(NumericLimits::min()), 0); define_property(vm.names.MAX_SAFE_INTEGER, Value(MAX_SAFE_INTEGER_VALUE), 0); define_property(vm.names.MIN_SAFE_INTEGER, Value(MIN_SAFE_INTEGER_VALUE), 0); define_property(vm.names.NEGATIVE_INFINITY, js_negative_infinity(), 0);