mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-03 17:58:49 +00:00
LibJS: Add Function() and Function.prototype
This commit is contained in:
parent
4d931b524d
commit
2944039d6b
Notes:
sideshowbarker
2024-07-19 07:56:21 +09:00
Author: https://github.com/linusg
Commit: 2944039d6b
Pull-request: https://github.com/SerenityOS/serenity/pull/1622
Reviewed-by: https://github.com/awesomekling ✅
15 changed files with 463 additions and 4 deletions
|
@ -333,6 +333,8 @@ Value UnaryExpression::execute(Interpreter& interpreter) const
|
|||
case Value::Type::String:
|
||||
return js_string(interpreter, "string");
|
||||
case Value::Type::Object:
|
||||
if (lhs_result.as_object().is_function())
|
||||
return js_string(interpreter, "function");
|
||||
return js_string(interpreter, "object");
|
||||
case Value::Type::Boolean:
|
||||
return js_string(interpreter, "boolean");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue