mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 14:54:16 +00:00
parent
9f1c09e131
commit
a9034a92b0
1 changed files with 15 additions and 0 deletions
|
@ -429,6 +429,21 @@ fn attribute_to_tokens_ssr<'a>(
|
|||
{ _ = #value; }
|
||||
});
|
||||
}
|
||||
} else if let Some(directive_name) = name.strip_prefix("use:") {
|
||||
let handler = syn::Ident::new(directive_name, attr.key.span());
|
||||
let value = attr.value();
|
||||
let value = value.map(|value| {
|
||||
quote! {
|
||||
_ = #value;
|
||||
}
|
||||
});
|
||||
exprs_for_compiler.push(quote! {
|
||||
#[allow(unused_braces)]
|
||||
{
|
||||
_ = #handler;
|
||||
#value
|
||||
}
|
||||
});
|
||||
} else if name == "inner_html" {
|
||||
return attr.value();
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue