Skip to content

Allows disable javascript from HTML source in the page#407

Merged
route merged 2 commits intorubycdp:mainfrom
erickgskovik:disable-js
Sep 26, 2023
Merged

Allows disable javascript from HTML source in the page#407
route merged 2 commits intorubycdp:mainfrom
erickgskovik:disable-js

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

@erickgskovik erickgskovik requested a review from route September 25, 2023 10:46
@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