File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 43
43
#include < LibWeb/Layout/LayoutNode.h>
44
44
#include < LibWeb/Layout/LayoutText.h>
45
45
46
+ // #define EVENT_DEBUG
47
+
46
48
namespace Web {
47
49
48
50
Node::Node (Document& document, NodeType type)
@@ -130,9 +132,13 @@ void Node::dispatch_event(NonnullRefPtr<Event> event)
130
132
for (auto & listener : listeners ()) {
131
133
if (listener.event_name == event->name ()) {
132
134
auto * function = const_cast <EventListener&>(*listener.listener ).function ();
135
+ #ifdef EVENT_DEBUG
133
136
static_cast <const JS::ScriptFunction*>(function)->body ().dump (0 );
137
+ #endif
134
138
auto * this_value = wrap (function->heap (), *this );
139
+ #ifdef EVENT_DEBUG
135
140
dbg () << " calling event listener with this=" << this_value;
141
+ #endif
136
142
auto * event_wrapper = wrap (function->heap (), *event);
137
143
document ().interpreter ().call (function, this_value, { event_wrapper });
138
144
}
You can’t perform that action at this time.
0 commit comments