We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a7f4cb commit 385b8c2Copy full SHA for 385b8c2
lib/ferrum/client.rb
@@ -64,7 +64,7 @@ class Client
64
delegate %i[timeout timeout=] => :options
65
66
attr_reader :ws_url, :options, :subscriber
67
-
+ attr_accessor :on_syncronous_message
68
def initialize(ws_url, options)
69
@command_id = 0
70
@ws_url = ws_url
@@ -96,6 +96,9 @@ def send_message(message, async:)
96
raise TimeoutError unless data
97
98
error, response = data.values_at("error", "result")
99
+ if on_syncronous_message
100
+ on_syncronous_message.call(message:, error:, response:)
101
+ end
102
raise_browser_error(error) if error
103
response
104
end
0 commit comments