fix(runtime): support native user interactions

req: examples/005

req: form/002

req: convention/004

req: dx/008
This commit is contained in:
slhx agent
2026-05-11 08:26:13 +02:00
parent 2db7ed7a3c
commit 5c1dc853d8
5 changed files with 39 additions and 45 deletions
+7 -2
View File
@@ -346,11 +346,16 @@ fn __slhx_lower_html(html: &str, table: &[(&str, &str, u32)]) -> ::std::string::
}
fn __slhx_replace_attr(mut html: ::std::string::String, attr: &str, name: &str, runtime_attr: &str, id: u32) -> ::std::string::String {
let replacement = ::std::format!("{runtime_attr}=\"{id}\"");
let replacement = if runtime_attr == "value" {
::std::format!("{attr}=\"{name}\" {runtime_attr}=\"{id}\"")
} else {
::std::format!("{runtime_attr}=\"{id}\"")
};
let double = ::std::format!("{attr}=\"{name}\"");
html = html.replace(&double, &replacement);
let single_replacement = replacement.replace('"', "'");
let single = ::std::format!("{attr}='{name}'");
html.replace(&single, &replacement)
html.replace(&single, &single_replacement)
}
fn __slhx_lower_static_attr(mut html: ::std::string::String, attr: &str, runtime_attr: &str) -> ::std::string::String {