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

Allows disable javascript from HTML source in the page #407

Merged
merged 2 commits into from
Sep 26, 2023
Merged

Allows disable javascript from HTML source in the page #407

merged 2 commits into from
Sep 26, 2023

Conversation

erickgskovik
Copy link
Contributor

Additional security measure for users not needing JavaScript.

Fixes #389

# This doesn't prevent users evaluate JavaScript with Ferrum.
#
def disable_javascript
command("Emulation.setScriptExecutionDisabled", slowmoable: false, value: true)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

slowmo is false by default.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@route
Copy link
Member

route commented Sep 26, 2023

Oh a couple things to add, we need to add Changelog entry and a line to README about this new method.

@erickgskovik
Copy link
Contributor Author

@route Ah, right! I assume that you will delegate the function from browser to the page as well.

@route route merged commit 986e3e2 into rubycdp:main Sep 26, 2023
@route
Copy link
Member

route commented Sep 26, 2023

Yep, all good, merged.

@erickgskovik erickgskovik deleted the disable-js branch September 26, 2023 11:59
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.

Send Emulation commands to Page
2 participants