-
Notifications
You must be signed in to change notification settings - Fork 3.1k
[WebDriver BiDi] respect "WebDriver BiDi scripting is enabled" #11884
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
base: main
Are you sure you want to change the base?
[WebDriver BiDi] respect "WebDriver BiDi scripting is enabled" #11884
Conversation
foolip
left a comment
There was a problem hiding this 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
41826cb to
2699091
Compare
|
Is this subset something that can be shipped in implementations and still be useful? |
Yes:
The extending available JS capabilities to inline with actual implementations is discussed in #11874 and partly implemented in the original #11441. |
sadym-chromium
left a comment
There was a problem hiding this 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
|
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. |
|
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? |
Based on #11441. The bare minimal required changes.
emulation.setScriptingEnabled.bypassDisabledScriptingto force-run scripts. Required for some automation scenarios like WebDriver BiDi commandscript.evaluate.The following nuances are kept untouched and should be addressed later on as a part of Based on #11441:
FinalizationRegistrywill not work even for scripts created withbypassDisabledScriptingflag.
FinalizationRegistrywill not work even for scripts created withbypassDisabledScriptingflag.
emulation.setScriptingEnabledweb-platform-tests/wpt#54289emulation.setScriptingEnabledcommand GoogleChromeLabs/chromium-bidi#3566(See WHATWG Working Mode: Changes for more details.)
/infrastructure.html ( diff )
/webappapis.html ( diff )