1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 16:37:47 +00:00

js: Allow for completion of lexically declared variables

This does require us to have a method which lists all the bindings in
a declarative environment which is not in the spec.
This commit is contained in:
davidot 2021-10-03 13:20:15 +02:00 committed by Andreas Kling
parent 0be0e7ea6e
commit f4f1397735
3 changed files with 18 additions and 0 deletions

View file

@ -31,6 +31,9 @@ public:
void initialize_or_set_mutable_binding(Badge<ScopeNode>, GlobalObject& global_object, FlyString const& name, Value value);
// This is not a method defined in the spec! Do not use this in any LibJS (or other spec related) code.
[[nodiscard]] Vector<String> bindings() const;
protected:
virtual void visit_edges(Visitor&) override;