dawn_node: Make StaticValues property-like

Makes them appear in Object methods like length().

Fixes a number of webgpu:idl,constants,flags tests.

Bug: dawn:1123
Change-Id: I2f1baf9c3c51915ce0b0a5dc392cf86aac761676
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65661
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
Ben Clayton 2021-10-05 16:33:19 +00:00 committed by Dawn LUCI CQ
parent 37144dee3c
commit 2c9fe21308
1 changed files with 1 additions and 1 deletions

View File

@ -154,7 +154,7 @@ Wrappers* Wrappers::instance = nullptr;
),
{{- end}}
{{- range $c := ConstantsOf $}}
StaticValue("{{$c.Name}}", ToJS(env, {{$.Name}}::{{$c.Name}})),
StaticValue("{{$c.Name}}", ToJS(env, {{$.Name}}::{{$c.Name}}), napi_default_jsproperty),
{{- end}}
});
}