Skip to content

Commit 58cc201

Browse files
committed
Rename get_document_id -> document_node_id
1 parent 23e8159 commit 58cc201

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/ferrum/page.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def reset
4343
attr_accessor :referrer
4444
attr_reader :target_id, :browser,
4545
:headers, :cookies, :network,
46-
:mouse, :keyboard, :event, :document_id
46+
:mouse, :keyboard, :event
4747

4848
def initialize(target_id, browser)
4949
@frames = {}
@@ -280,7 +280,7 @@ def prepare_page
280280
# occurs and thus search for nodes cannot be completed. Here we check
281281
# the history and if the transitionType for example `link` then
282282
# content is already loaded and we can try to get the document.
283-
get_document_id
283+
document_node_id
284284
end
285285

286286
def inject_extensions
@@ -321,8 +321,8 @@ def combine_url!(url_or_path)
321321
(nil_or_relative ? @browser.base_url.join(url.to_s) : url).to_s
322322
end
323323

324-
def get_document_id
325-
@document_id = command("DOM.getDocument", depth: 0).dig("root", "nodeId")
324+
def document_node_id
325+
command("DOM.getDocument", depth: 0).dig("root", "nodeId")
326326
end
327327
end
328328
end

lib/ferrum/page/frames.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def frames_subscribe
4747
# node will change the id and all subsequent nodes have to change id too.
4848
if @main_frame.id == params["frameId"]
4949
@event.set if idling?
50-
get_document_id
50+
document_node_id
5151
end
5252

5353
frame = @frames[params["frameId"]]

0 commit comments

Comments
 (0)