mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-21 09:49:21 +00:00
LibJS: Support deleting local variables with operator delete
To make this cleaner i also moved the logic into Reference::delete_.
This commit is contained in:
parent
af58779def
commit
064ed8279e
Notes:
sideshowbarker
2024-07-18 22:57:59 +09:00
Author: https://github.com/IdanHo
Commit: 064ed8279e
Pull-request: https://github.com/SerenityOS/serenity/pull/7905
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/linusg
14 changed files with 82 additions and 10 deletions
|
@ -290,6 +290,11 @@ void GlobalObject::put_to_scope(const FlyString& name, Variable variable)
|
|||
put(name, variable.value);
|
||||
}
|
||||
|
||||
bool GlobalObject::delete_from_scope(FlyString const& name)
|
||||
{
|
||||
return delete_property(name);
|
||||
}
|
||||
|
||||
bool GlobalObject::has_this_binding() const
|
||||
{
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue