|
@@ -45,7 +45,16 @@ impl WebsysDom {
|
|
|
let document = load_document();
|
|
|
let root = match document.get_element_by_id(&cfg.rootname) {
|
|
|
Some(root) => root,
|
|
|
- None => document.create_element("body").ok().unwrap(),
|
|
|
+ None => {
|
|
|
+ web_sys::console::error_1(
|
|
|
+ &format!(
|
|
|
+ "element '#{}' not found. mounting to the body.",
|
|
|
+ cfg.rootname
|
|
|
+ )
|
|
|
+ .into(),
|
|
|
+ );
|
|
|
+ document.create_element("body").ok().unwrap()
|
|
|
+ }
|
|
|
};
|
|
|
let interpreter = Channel::default();
|
|
|
|