Open OrKoN opened 1 month ago
Yes, I think this makes sense. I'm not 100% sure if Gecko can disable it per (top level) navigable, but in any case it would make sense to have a command that either allowed disabling globally or for certain top-level navigables.
I'm not 100% sure if Gecko can disable it per (top level) navigable
The BrowsingContext webidl has a allowJavascript
flag which would exactly allow us to do that on a per top-level browsing context level.
What should happen when JS is disabled yet a session wants to evaluate some JS? I believe that should still work, but it's best to confirm
@shs96c yeah, that should still work: only the scripts coming from the page should not be executed as if JS is not supported.
The BrowsingContext webidl has a
allowJavascript
flag which would exactly allow us to do that on a per top-level browsing context level.
For info that's what we use for FF DevTools' "Disable JavaScript" feature
Chrome allows disabling JavaScript for a specific page: https://pptr.dev/api/puppeteer.page.setjavascriptenabled/
Does it make sense to have this functionality in WebDriver BiDi?