Doc + little CSS adjustement
This commit is contained in:
parent
58e299b337
commit
2b7e88ae95
4 changed files with 19 additions and 5 deletions
|
|
@ -22,7 +22,13 @@ use crate::{
|
|||
pub fn setup_page(recipe_id: i64) {
|
||||
// Title.
|
||||
{
|
||||
let title: HtmlInputElement = by_id("input-title");
|
||||
// Here we check if the first element exists,
|
||||
// if not, the recipe edit page hasn't been loaded
|
||||
// and we return from the function without panicking.
|
||||
let title = match document().get_element_by_id("input-title") {
|
||||
Some(e) => e.dyn_into::<HtmlInputElement>().unwrap(),
|
||||
None => return,
|
||||
};
|
||||
|
||||
// Check if the recipe has been loaded.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue