Skip to content

Commit d4d4e9d

Browse files
committed
Fix Target.targetCreated handler for existing targets
1 parent 180f292 commit d4d4e9d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/ferrum/contexts.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def subscribe
9696

9797
if info["type"] == "iframe" &&
9898
(target = @contexts[context_id].find_target { |t| t.connected? && t.page.frame_by(id: info["targetId"]) })
99-
@contexts[context_id]&.add_target(session_id: target.page.client.session_id, params: info)
99+
@contexts[context_id]&.add_target(session_id: target.session_id, params: info)
100100
else
101101
@contexts[context_id]&.add_target(params: info)
102102
end

0 commit comments

Comments
 (0)