mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2024-12-25 19:11:45 +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 {
|
if import.structural {
|
||||||
format!(
|
format!(
|
||||||
"function() {{
|
"function() {{
|
||||||
return this.{};
|
return {}.{};
|
||||||
}}",
|
}}",
|
||||||
|
if is_static { &class } else { "this" },
|
||||||
g
|
g
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
@ -1835,8 +1836,9 @@ impl<'a, 'b> SubContext<'a, 'b> {
|
|||||||
if import.structural {
|
if import.structural {
|
||||||
format!(
|
format!(
|
||||||
"function(y) {{
|
"function(y) {{
|
||||||
this.{} = y;
|
{}.{} = y;
|
||||||
}}",
|
}}",
|
||||||
|
if is_static { &class } else { "this" },
|
||||||
s
|
s
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user