feat: allow header injection for liveview

This commit is contained in:
Jonathan Kelley committed 2022-04-19 23:48:17 -04:00
1 parent 1f6c0593b4
commit a1c644d80b
2 files changed
+3 -4

No files matched your search

+2 -3
View File
@@ -31,14 +31,13 @@ pub struct Liveview {
}
impl Liveview {
pub fn body(&self) -> String {
pub fn body(&self, header: &str) -> String {
format!(
r#"
<!DOCTYPE html>
<html>
<head>
<title>Dioxus app</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
{header}
</head>
<body>
<div id="main"></div>