File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,23 @@ fn performSearch(cmd: anytype) !void {
7676
7777 const search = try bc .node_search_list .create (list .nodes .items );
7878
79+ // dispatch setChildNodesEvents to inform the client of the subpart of node
80+ // tree covering the results.
81+ for (list .nodes .items ) | n | {
82+ // retrieve the node's parent
83+ if (try parser .nodeParentNode (n )) | p | {
84+ // Register the parent and send the node.
85+ const parent_node = try bc .node_registry .register (p );
86+ const node = bc .node_registry .lookup_by_node .get (n ) orelse unreachable ;
87+ // Should-we return one DOM.setChildNodes event per parentId
88+ // containing all its children in the nodes array?
89+ try cmd .sendEvent ("DOM.setChildNodes" , .{
90+ .parentId = parent_node .id ,
91+ .nodes = .{bc .nodeWriter (node , .{})},
92+ }, .{});
93+ }
94+ }
95+
7996 return cmd .sendResult (.{
8097 .searchId = search .name ,
8198 .resultCount = @as (u32 , @intCast (search .node_ids .len )),
You can’t perform that action at this time.
0 commit comments