mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 02:09:24 +00:00
LibJS: Integrate Symbols into objects as valid keys
This allows objects properties to be created for symbol keys in addition to just plain strings/numbers
This commit is contained in:
parent
9783a4936c
commit
7a1d485b19
Notes:
sideshowbarker
2024-07-19 04:59:39 +09:00
Author: https://github.com/mattco98
Commit: 7a1d485b19
Pull-request: https://github.com/SerenityOS/serenity/pull/2744
14 changed files with 424 additions and 154 deletions
|
@ -41,13 +41,13 @@ public:
|
|||
|
||||
const String& description() const { return m_description; }
|
||||
bool is_global() const { return m_is_global; }
|
||||
const String to_string() const { return String::format("Symbol(%s)", description().characters()); }
|
||||
String to_string() const { return String::format("Symbol(%s)", description().characters()); }
|
||||
|
||||
private:
|
||||
virtual const char* class_name() const override { return "Symbol"; }
|
||||
|
||||
const String m_description;
|
||||
const bool m_is_global;
|
||||
String m_description;
|
||||
bool m_is_global;
|
||||
};
|
||||
|
||||
Symbol* js_symbol(Heap&, String description, bool is_global);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue