mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-12 14:12:52 +00:00
LibWeb: Update spec comments using "Type(Foo)" -> "is a Foo"
This commit is contained in:
parent
00e613c7df
commit
f31c18756b
Notes:
github-actions[bot]
2024-10-31 13:02:41 +00:00
Author: https://github.com/AtkinsSJ
Commit: f31c18756b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2079
5 changed files with 12 additions and 12 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue