LibWeb: Update spec comments using "Type(Foo)" -> "is a Foo"

This commit is contained in:
Sam Atkins 2024-10-31 11:34:22 +00:00 committed by Alexander Kalenik
parent 00e613c7df
commit f31c18756b
Notes: github-actions[bot] 2024-10-31 13:02:41 +00:00
5 changed files with 12 additions and 12 deletions

View file

@ -169,7 +169,7 @@ public:
auto deep = false;
bool return_primitive_type = true;
// 4. If Type(value) is Undefined, Null, Boolean, Number, BigInt, or String, then return { [[Type]]: "primitive", [[Value]]: value }.
// 4. If value is undefined, null, a Boolean, a Number, a BigInt, or a String, then return { [[Type]]: "primitive", [[Value]]: value }.
if (value.is_undefined()) {
serialize_enum(m_serialized, ValueTag::UndefinedPrimitive);
} else if (value.is_null()) {
@ -193,7 +193,7 @@ public:
if (return_primitive_type)
return m_serialized;
// 5. If Type(value) is Symbol, then throw a "DataCloneError" DOMException.
// 5. If value is a Symbol, then throw a "DataCloneError" DOMException.
if (value.is_symbol())
return WebIDL::DataCloneError::create(*m_vm.current_realm(), "Cannot serialize Symbol"_string);