#48447: docs: clarify optional args in webFrame.executeJavaScript()
Merged
Description of Change
Fix a small documentation bug for the optional arguments in webFrame.executeJavaScript()
and webFrame.executeJavaScriptInIsolatedWorld()
: the hasUserGesture
argument can be omitted, even when a callback is provided:
-### `webFrame.executeJavaScript(code[, userGesture, callback])`
+### `webFrame.executeJavaScript(code[, userGesture][, callback])`
This PR brings the docs in line with the pre-existing, tested behavior. Our tests do this in several places: 1, 2, 3, 4.
All reviews welcomed! CC @deepak1556, who reviewed a similar recent PR #48361
Checklist
- PR description included and stakeholders cc'd
-
npm test
passes - relevant API documentation, tutorials, and examples are updated and follow the documentation style guide
- PR release notes describe the change in a way relevant to app developers, and are capitalized, punctuated, and past tense.
Release Notes
Notes: none.
Backports
37-x-y
MergedPR Number
#48459Merged At
Oct 4, 2025, 11:44:51 AM
Released In
v37.6.1Release Date
Oct 7, 2025, 12:47:19 PM
38-x-y
MergedPR Number
#48460Merged At
Oct 4, 2025, 11:45:05 AM
Released In
v38.2.2Release Date
Oct 7, 2025, 11:03:07 AM
39-x-y
MergedPR Number
#48458Merged At
Oct 4, 2025, 11:44:42 AM
Released In
v39.0.0-alpha.9Release Date
Oct 6, 2025, 8:32:10 AM
Semver Impact
Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.
Semantic Versioning helps users understand the impact of updates:
- Major (X.y.z): Breaking changes that may require code modifications
- Minor (x.Y.z): New features that maintain backward compatibility
- Patch (x.y.Z): Bug fixes that don't change the API
- None: Changes that don't affect using facing parts of Electron