Skip to content

Commit d42fa91

Browse files
committed
Inspector is not exposed by Chromote
1 parent 7868180 commit d42fa91

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

R/chromote.R

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -302,13 +302,6 @@ Chromote <- R6Class(
302302
private$sessions[[sid]] <- NULL
303303
session$mark_closed()
304304
})
305-
306-
# When a target crashes, raise a warning.
307-
# The session cannot be closed because no session id is returned by the
308-
# Inspector.targetCrashed event
309-
self$protocol$Inspector$targetCrashed(function(msg) {
310-
warning("Chromote has received a Inspector.targetCrashed event. This means that the ChromoteSession has probably crashed.")
311-
})
312305
},
313306

314307
# =========================================================================

R/chromote_session.R

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,16 @@ ChromoteSession <- R6Class(
8585
private$pixel_ratio <- value$result$value
8686
})
8787

88+
# When a target crashes, raise a warning.
89+
# The session cannot be closed because no session id is returned by the
90+
# Inspector.targetCrashed event
91+
p <- p$
92+
then(function(value) {
93+
self$Inspector$targetCrashed(timeout_ = NULL, wait_ = FALSE, function(value) {
94+
warning("Chromote has received a Inspector.targetCrashed event. This means that the ChromoteSession has probably crashed.")
95+
})
96+
})
97+
8898
if (wait_) {
8999
self$wait_for(p)
90100
} else {

0 commit comments

Comments
 (0)