Skip to content

Escape JS text in AppDriver$wait_for_js() - #258

Merged
schloerke merged 12 commits into
mainfrom
escape_eval_js
Sep 14, 2022
Merged

schloerke merged 12 commits into
mainfrom
escape_eval_js

Conversation

@schloerke

@schloerke schloerke commented Sep 12, 2022 •

Copy link
Copy Markdown
Collaborator

Fixes #236

TIL deparse(txt) is a great to way to escape the text string txt. Great trick! Thanks, @jcheng5


Could not use deparse1(txt) as it was introduced in R 4.0 and we currently support R 3.5, R 3.6.

@schloerke schloerke added this to the v0.2.0 milestone Sep 12, 2022
Comment thread R/chromote-methods.R Resolved
@schloerke

schloerke commented Sep 12, 2022 •

Copy link
Copy Markdown
Collaborator Author
  • tryCatch

@jcheng5

jcheng5 commented Sep 14, 2022

Copy link
Copy Markdown
Member

Are you sure you want to return false rather than reject(err)?

@schloerke

schloerke commented Sep 14, 2022 •

Copy link
Copy Markdown
Collaborator Author
  • Move try catch and reject on error

@schloerke

Copy link
Copy Markdown
Collaborator Author

Checks good. Merging

@schloerke
schloerke merged commit b0ca122 into main Sep 14, 2022
@schloerke
schloerke deleted the escape_eval_js branch September 14, 2022 13:31
schloerke added a commit that referenced this pull request Sep 14, 2022
* main:
  Escape JS text in `AppDriver$wait_for_js()` (#258)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AppDriver$wait_for_js() does not quote script input

2 participants