Feat: begin WIP on html macro

This commit is contained in:
Jonathan Kelley committed 2021-02-26 12:58:03 -05:00
1 parent b0a87e5d73
commit a8b1225c48
11 files changed
+255 -102

No files matched your search

+20 -1
View File
@@ -219,10 +219,29 @@ impl ActiveFrame {
}
}
#[cfg(test)]
// #[cfg(test)]
mod tests {
use super::*;
static ListenerTest: FC<()> = |ctx, props| {
ctx.view(html! {
<div onclick={|_| println!("Hell owlrld")}>
"hello"
</div>
})
};
#[test]
fn check_listeners() -> Result<()> {
let mut scope = Scope::new::<(), ()>(ListenerTest, (), None);
scope.run::<()>();
let nodes = scope.new_frame();
dbg!(nodes);
Ok(())
}
#[test]
fn test_scope() {
let example: FC<()> = |ctx, props| {