mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
LibJS: Make section URLs more consistent
- Drop index.html - Include trailing slash before anchor - Don't use multipage spec URLs
This commit is contained in:
parent
ad294ff2ee
commit
905b8bd545
Notes:
sideshowbarker
2024-07-18 00:43:00 +09:00
4 changed files with 9 additions and 9 deletions
|
@ -80,7 +80,7 @@ void ArrayPrototype::initialize(GlobalObject& global_object)
|
|||
define_direct_property(*vm.well_known_symbol_iterator(), get_without_side_effects(vm.names.values), attr);
|
||||
|
||||
// 23.1.3.35 Array.prototype [ @@unscopables ], https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
||||
// With proposal, https://tc39.es/proposal-array-find-from-last/index.html#sec-array.prototype-@@unscopables
|
||||
// With proposal, https://tc39.es/proposal-array-find-from-last/#sec-array.prototype-@@unscopables
|
||||
auto* unscopable_list = Object::create(global_object, nullptr);
|
||||
MUST(unscopable_list->create_data_property_or_throw(vm.names.at, Value(true)));
|
||||
MUST(unscopable_list->create_data_property_or_throw(vm.names.copyWithin, Value(true)));
|
||||
|
@ -1174,7 +1174,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::find_index)
|
|||
return Value(-1);
|
||||
}
|
||||
|
||||
// 1 Array.prototype.findLast ( predicate [ , thisArg ] ), https://tc39.es/proposal-array-find-from-last/index.html#sec-array.prototype.findlast
|
||||
// 1 Array.prototype.findLast ( predicate [ , thisArg ] ), https://tc39.es/proposal-array-find-from-last/#sec-array.prototype.findlast
|
||||
JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::find_last)
|
||||
{
|
||||
auto predicate = vm.argument(0);
|
||||
|
@ -1213,7 +1213,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::find_last)
|
|||
return js_undefined();
|
||||
}
|
||||
|
||||
// 2 Array.prototype.findLastIndex ( predicate [ , thisArg ] ), https://tc39.es/proposal-array-find-from-last/index.html#sec-array.prototype.findlastindex
|
||||
// 2 Array.prototype.findLastIndex ( predicate [ , thisArg ] ), https://tc39.es/proposal-array-find-from-last/#sec-array.prototype.findlastindex
|
||||
JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::find_last_index)
|
||||
{
|
||||
auto predicate = vm.argument(0);
|
||||
|
@ -1342,7 +1342,7 @@ JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::every)
|
|||
return Value(true);
|
||||
}
|
||||
|
||||
// 23.1.3.29 Array.prototype.splice ( start, deleteCount, ...items ), https://tc39.es/ecma262#sec-array.prototype.splice
|
||||
// 23.1.3.29 Array.prototype.splice ( start, deleteCount, ...items ), https://tc39.es/ecma262/#sec-array.prototype.splice
|
||||
JS_DEFINE_NATIVE_FUNCTION(ArrayPrototype::splice)
|
||||
{
|
||||
auto* this_object = TRY(vm.this_value(global_object).to_object(global_object));
|
||||
|
|
|
@ -282,7 +282,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::find_index)
|
|||
return Value(result_index);
|
||||
}
|
||||
|
||||
// 4 %TypedArray%.prototype.findLast ( predicate [ , thisArg ] ), https://tc39.es/proposal-array-find-from-last/index.html#sec-%typedarray%.prototype.findlast
|
||||
// 4 %TypedArray%.prototype.findLast ( predicate [ , thisArg ] ), https://tc39.es/proposal-array-find-from-last/#sec-%typedarray%.prototype.findlast
|
||||
JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::find_last)
|
||||
{
|
||||
auto result = js_undefined();
|
||||
|
@ -296,7 +296,7 @@ JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::find_last)
|
|||
return result;
|
||||
}
|
||||
|
||||
// 5 %TypedArray%.prototype.findLastIndex ( predicate [ , thisArg ] ), https://tc39.es/proposal-array-find-from-last/index.html#sec-%typedarray%.prototype.findlastindex
|
||||
// 5 %TypedArray%.prototype.findLastIndex ( predicate [ , thisArg ] ), https://tc39.es/proposal-array-find-from-last/#sec-%typedarray%.prototype.findlastindex
|
||||
JS_DEFINE_NATIVE_FUNCTION(TypedArrayPrototype::find_last_index)
|
||||
{
|
||||
auto result_index = -1;
|
||||
|
|
|
@ -539,14 +539,14 @@ ThrowCompletionOr<BigInt*> Value::to_bigint(GlobalObject& global_object) const
|
|||
}
|
||||
}
|
||||
|
||||
// 7.1.15 ToBigInt64 ( argument ), https://tc39.es/ecma262/multipage/abstract-operations.html#sec-tobigint64
|
||||
// 7.1.15 ToBigInt64 ( argument ), https://tc39.es/ecma262/#sec-tobigint64
|
||||
ThrowCompletionOr<i64> Value::to_bigint_int64(GlobalObject& global_object) const
|
||||
{
|
||||
auto* bigint = TRY(to_bigint(global_object));
|
||||
return static_cast<i64>(bigint->big_integer().to_u64());
|
||||
}
|
||||
|
||||
// 7.1.16 ToBigUint64 ( argument ), https://tc39.es/ecma262/multipage/abstract-operations.html#sec-tobiguint64
|
||||
// 7.1.16 ToBigUint64 ( argument ), https://tc39.es/ecma262/#sec-tobiguint64
|
||||
ThrowCompletionOr<u64> Value::to_bigint_uint64(GlobalObject& global_object) const
|
||||
{
|
||||
auto* bigint = TRY(to_bigint(global_object));
|
||||
|
|
|
@ -204,7 +204,7 @@ String Token::string_value(StringValueStatus& status) const
|
|||
return builder.to_string();
|
||||
}
|
||||
|
||||
// 12.8.6.2 Static Semantics: TRV, https://tc39.es/ecma262/multipage/ecmascript-language-lexical-grammar.html#sec-static-semantics-trv
|
||||
// 12.8.6.2 Static Semantics: TRV, https://tc39.es/ecma262/#sec-static-semantics-trv
|
||||
String Token::raw_template_value() const
|
||||
{
|
||||
return value().replace("\r\n", "\n", true).replace("\r", "\n", true);
|
||||
|
|
Loading…
Reference in a new issue