ferrum 0.10.1 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ferrum/page/frames.rb +5 -0
- data/lib/ferrum/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2256dbc8ed2c2fca2e3209c13e29009c69b4c2ccf328e8a73ade73ed69c89f0
|
4
|
+
data.tar.gz: 8d5604f8d4f8120b699ec3e341c37f77f25e90a794d3206660ecc0465b22e7b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7aa18fd5a01f387c27ade8ecdf6aa30df8118f4e90badddc242ed979e5be49c890036049f284555a937ccc79699bcbc954d62c077f45ff0770d9eeeec255a6ea
|
7
|
+
data.tar.gz: 25c4cc92e59a297a344cf85301a21c3f9e634f25ea685eb6c9d2f4ea1896fcba2898dc5f4cfcc8f3af358001a0e451034bb79bf24981e16a17a51cdd3f07d6a3
|
data/lib/ferrum/page/frames.rb
CHANGED
@@ -71,12 +71,14 @@ module Ferrum
|
|
71
71
|
end
|
72
72
|
|
73
73
|
on("Runtime.executionContextCreated") do |params|
|
74
|
+
setting_up_main_frame = false
|
74
75
|
context_id = params.dig("context", "id")
|
75
76
|
frame_id = params.dig("context", "auxData", "frameId")
|
76
77
|
|
77
78
|
unless @main_frame.id
|
78
79
|
root_frame = command("Page.getFrameTree").dig("frameTree", "frame", "id")
|
79
80
|
if frame_id == root_frame
|
81
|
+
setting_up_main_frame = true
|
80
82
|
@main_frame.id = frame_id
|
81
83
|
@frames[frame_id] = @main_frame
|
82
84
|
end
|
@@ -85,6 +87,9 @@ module Ferrum
|
|
85
87
|
frame = @frames[frame_id] || Frame.new(frame_id, self)
|
86
88
|
frame.set_execution_id(context_id)
|
87
89
|
|
90
|
+
# Set event because `execution_id` might raise NoExecutionContextError
|
91
|
+
@event.set if setting_up_main_frame
|
92
|
+
|
88
93
|
@frames[frame_id] ||= frame
|
89
94
|
end
|
90
95
|
|
data/lib/ferrum/version.rb
CHANGED