Skip to content

Commit

Permalink
Merge d7ecc9e into b514564
Browse files Browse the repository at this point in the history
  • Loading branch information
HalidOdat authored May 4, 2021
2 parents b514564 + d7ecc9e commit 0552c82
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions boa/src/builtins/json/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@ impl BuiltIn for Json {
fn init(context: &mut Context) -> (&'static str, Value, Attribute) {
let _timer = BoaProfiler::global().start_event(Self::NAME, "init");

let to_string_tag = context.well_known_symbols().to_string_tag_symbol();

let attribute = Attribute::READONLY | Attribute::NON_ENUMERABLE | Attribute::CONFIGURABLE;

let json_object = ObjectInitializer::new(context)
.property(to_string_tag, "JSON", attribute)
.function(Self::parse, "parse", 2)
.function(Self::stringify, "stringify", 3)
.build();
Expand Down

0 comments on commit 0552c82

Please sign in to comment.