mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-25 11:02:11 +03:00
Add support getter and setter for static props
This commit is contained in:
parent
bc2eab1434
commit
e6b2a0d98c
@ -1817,8 +1817,9 @@ impl<'a, 'b> SubContext<'a, 'b> {
|
||||
if import.structural {
|
||||
format!(
|
||||
"function() {{
|
||||
return this.{};
|
||||
return {}.{};
|
||||
}}",
|
||||
if is_static { &class } else { "this" },
|
||||
g
|
||||
)
|
||||
} else {
|
||||
@ -1835,8 +1836,9 @@ impl<'a, 'b> SubContext<'a, 'b> {
|
||||
if import.structural {
|
||||
format!(
|
||||
"function(y) {{
|
||||
this.{} = y;
|
||||
{}.{} = y;
|
||||
}}",
|
||||
if is_static { &class } else { "this" },
|
||||
s
|
||||
)
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user