|
@@ -379,9 +379,11 @@ impl VirtualDom {
|
|
|
let template = unsafe { el_ref.unwrap().as_ref() };
|
|
|
let node_template = template.template.get();
|
|
|
let target_path = path.path;
|
|
|
+ println!("handle_event: {:?} ({:?})", target_path, template);
|
|
|
|
|
|
for (idx, attr) in template.dynamic_attrs.iter().enumerate() {
|
|
|
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
|
|
|
if attr.name.trim_start_matches("on") == name
|
|
@@ -401,6 +403,7 @@ impl VirtualDom {
|
|
|
// 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
|
|
|
for listener in listeners.drain(..).rev() {
|
|
|
+ println!("handle_event: {:?}", listener);
|
|
|
if let AttributeValue::Listener(listener) = listener {
|
|
|
let origin = path.scope;
|
|
|
self.runtime.scope_stack.borrow_mut().push(origin);
|