Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escape JS text in AppDriver$wait_for_js() #258

Merged
merged 12 commits into from
Sep 14, 2022
Merged

Escape JS text in AppDriver$wait_for_js() #258

merged 12 commits into from
Sep 14, 2022

Conversation

schloerke
Copy link
Collaborator

@schloerke schloerke commented Sep 12, 2022

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
@schloerke
Copy link
Collaborator Author

schloerke commented Sep 12, 2022

  • tryCatch

@jcheng5
Copy link
Member

jcheng5 commented Sep 14, 2022

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

@schloerke
Copy link
Collaborator Author

schloerke commented Sep 14, 2022

  • Move try catch and reject on error

@schloerke
Copy link
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