Skip to content

Conversation

@sadym-chromium
Copy link
Contributor

@sadym-chromium sadym-chromium commented Nov 4, 2025

Based on #11441. The bare minimal required changes.

  • Enable scripting disabled emulation via WebDriver BiDi. Required for WebDriver BiDi command emulation.setScriptingEnabled.
  • Allow bypassDisabledScripting to force-run scripts. Required for some automation scenarios like WebDriver BiDi command script.evaluate.

The following nuances are kept untouched and should be addressed later on as a part of Based on #11441:


(See WHATWG Working Mode: Changes for more details.)


/infrastructure.html ( diff )
/webappapis.html ( diff )

@sadym-chromium sadym-chromium changed the title [WebDriver BiDi] enable and disable scripting via BiDi [WebDriver BiDi] respect "WebDriver BiDi scripting is enabled" Nov 4, 2025
@sadym-chromium
Copy link
Contributor Author

@foolip @zcorpan WDYT if we split the original PR?

Copy link
Member

@foolip foolip left a comment

Choose a reason for hiding this comment

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

This makes sense to me, but review from @zcorpan would also be good too.

Based on whatwg#11441. The bare minimal required changes.

# Conflicts:
#	source
@sadym-chromium sadym-chromium force-pushed the sadym/emulation.setDisableScriptingOverride-minimal branch from 41826cb to 2699091 Compare November 19, 2025 08:42
@zcorpan
Copy link
Member

zcorpan commented Nov 19, 2025

Is this subset something that can be shipped in implementations and still be useful?

@sadym-chromium
Copy link
Contributor Author

sadym-chromium commented Nov 19, 2025

Is this subset something that can be shipped in implementations and still be useful?

Yes:

  1. It allows for user agents to disable JS via WebDriver BiDi.
  2. It allows for WebDriver BiDi users to evaluate JS (with very limited capabilities) even if the JS is disabled.

The extending available JS capabilities to inline with actual implementations is discussed in #11874 and partly implemented in the original #11441.

Copy link
Contributor Author

@sadym-chromium sadym-chromium left a comment

Choose a reason for hiding this comment

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

@annevk I addressed your comments

@annevk
Copy link
Member

annevk commented Nov 20, 2025

Thanks, it seems that @zcorpan asked some questions in #11874 (comment) that probably need to be answered. I'll defer to him as to how to move this forward.

@sadym-chromium
Copy link
Contributor Author

Thanks, it seems that @zcorpan asked some questions in #11874 (comment) that probably need to be answered. I'll defer to him as to how to move this forward.

This PR is a bare minimum to enable disabled JS emulation for WebDriver BiDi users and enable some scripting. Regardless of the discussions in #11874 outcome, this PR still seem to make sense.

@juliandescottes
Copy link

While I agree the PR makes sense as an incremental step, the current implementations of disabling script via remote protocols, in Chrome and Firefox, are rather aligned with #11441 .

So while it's fine to go ahead and merge this, we will need to decide relatively quickly if we are ultimately going to allow promises/weakmap finalization for BiDi evaluated script or if that seems too complicated to specify. Because if not, we will need to start modifying our implementations to match that, knowing that we probably can't break eg devtools' behavior for legacy reasons.

@sadym-chromium do you plan on enforcing the limitations related to this PR for Chrome or are you waiting until we get an agreement for #11441 to do any implementation changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants