remove logs
This commit is contained in:
1 parent
d81d3ebaef
commit
589483d892
2 files changed
-11
No files matched your search
@@ -48,8 +48,6 @@ impl VirtualDom {
|
|||||||
std::mem::transmute::<NonNull<VNode>, _>(vnode.into())
|
std::mem::transmute::<NonNull<VNode>, _>(vnode.into())
|
||||||
})));
|
})));
|
||||||
|
|
||||||
println!("next_element_ref: {:?}", new_id);
|
|
||||||
|
|
||||||
// Set this id to be dropped when the scope is rerun
|
// Set this id to be dropped when the scope is rerun
|
||||||
if let Some(scope) = self.runtime.current_scope_id() {
|
if let Some(scope) = self.runtime.current_scope_id() {
|
||||||
self.scopes[scope.0]
|
self.scopes[scope.0]
|
||||||
@@ -143,7 +141,6 @@ impl VirtualDom {
|
|||||||
let mut element_refs = self.scopes[scope_id.0].element_refs_to_drop.borrow_mut();
|
let mut element_refs = self.scopes[scope_id.0].element_refs_to_drop.borrow_mut();
|
||||||
let element_refs_slab = &mut self.element_refs;
|
let element_refs_slab = &mut self.element_refs;
|
||||||
for element_ref in element_refs.drain(..) {
|
for element_ref in element_refs.drain(..) {
|
||||||
println!("ensure_drop_safety: {:?}", element_ref);
|
|
||||||
if let Some(element_ref) = element_refs_slab.get_mut(element_ref.0) {
|
if let Some(element_ref) = element_refs_slab.get_mut(element_ref.0) {
|
||||||
*element_ref = None;
|
*element_ref = None;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -357,7 +357,6 @@ impl VirtualDom {
|
|||||||
Some(Some(el)) => el,
|
Some(Some(el)) => el,
|
||||||
_ => return,
|
_ => return,
|
||||||
};
|
};
|
||||||
println!("handle_event: {:?}", element);
|
|
||||||
let mut parent_node = self
|
let mut parent_node = self
|
||||||
.element_refs
|
.element_refs
|
||||||
.get(parent_path.template.0)
|
.get(parent_path.template.0)
|
||||||
@@ -379,11 +378,9 @@ impl VirtualDom {
|
|||||||
let template = unsafe { el_ref.unwrap().as_ref() };
|
let template = unsafe { el_ref.unwrap().as_ref() };
|
||||||
let node_template = template.template.get();
|
let node_template = template.template.get();
|
||||||
let target_path = path.path;
|
let target_path = path.path;
|
||||||
println!("handle_event: {:?} ({:?})", target_path, template);
|
|
||||||
|
|
||||||
for (idx, attr) in template.dynamic_attrs.iter().enumerate() {
|
for (idx, attr) in template.dynamic_attrs.iter().enumerate() {
|
||||||
let this_path = node_template.attr_paths[idx];
|
let this_path = node_template.attr_paths[idx];
|
||||||
println!("checking: {:?} ({:?})", this_path, attr);
|
|
||||||
|
|
||||||
// Remove the "on" prefix if it exists, TODO, we should remove this and settle on one
|
// Remove the "on" prefix if it exists, TODO, we should remove this and settle on one
|
||||||
if attr.name.trim_start_matches("on") == name
|
if attr.name.trim_start_matches("on") == name
|
||||||
@@ -403,7 +400,6 @@ impl VirtualDom {
|
|||||||
// Now that we've accumulated all the parent attributes for the target element, call them in reverse order
|
// Now that we've accumulated all the parent attributes for the target element, call them in reverse order
|
||||||
// We check the bubble state between each call to see if the event has been stopped from bubbling
|
// We check the bubble state between each call to see if the event has been stopped from bubbling
|
||||||
for listener in listeners.drain(..).rev() {
|
for listener in listeners.drain(..).rev() {
|
||||||
println!("handle_event: {:?}", listener);
|
|
||||||
if let AttributeValue::Listener(listener) = listener {
|
if let AttributeValue::Listener(listener) = listener {
|
||||||
let origin = path.scope;
|
let origin = path.scope;
|
||||||
self.runtime.scope_stack.borrow_mut().push(origin);
|
self.runtime.scope_stack.borrow_mut().push(origin);
|
||||||
@@ -421,7 +417,6 @@ impl VirtualDom {
|
|||||||
}
|
}
|
||||||
|
|
||||||
parent_node = template.parent.get().and_then(|element_ref| {
|
parent_node = template.parent.get().and_then(|element_ref| {
|
||||||
println!("handle_event: {:?}", element_ref);
|
|
||||||
self.element_refs
|
self.element_refs
|
||||||
.get(element_ref.template.0)
|
.get(element_ref.template.0)
|
||||||
.cloned()
|
.cloned()
|
||||||
@@ -607,15 +602,12 @@ impl VirtualDom {
|
|||||||
/// The mutations will be thrown out, so it's best to use this method for things like SSR that have async content
|
/// The mutations will be thrown out, so it's best to use this method for things like SSR that have async content
|
||||||
pub async fn wait_for_suspense(&mut self) {
|
pub async fn wait_for_suspense(&mut self) {
|
||||||
loop {
|
loop {
|
||||||
// println!("waiting for suspense {:?}", self.suspended_scopes);
|
|
||||||
if self.suspended_scopes.is_empty() {
|
if self.suspended_scopes.is_empty() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// println!("waiting for suspense");
|
|
||||||
self.wait_for_work().await;
|
self.wait_for_work().await;
|
||||||
|
|
||||||
// println!("Rendered immediately");
|
|
||||||
_ = self.render_immediate();
|
_ = self.render_immediate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user