From e3df5e03ded561c54086a789349f42aed09b5fb0 Mon Sep 17 00:00:00 2001 From: Manuel Beck Date: Tue, 23 Jun 2026 12:11:38 +0200 Subject: [PATCH 1/5] doc(statusbar.js): document `setBackgroundColor()` --- cordova-js-src/plugin/android/statusbar.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cordova-js-src/plugin/android/statusbar.js b/cordova-js-src/plugin/android/statusbar.js index 131c01394..a437504a7 100644 --- a/cordova-js-src/plugin/android/statusbar.js +++ b/cordova-js-src/plugin/android/statusbar.js @@ -52,6 +52,14 @@ Object.defineProperty(statusBar, 'visible', { } }); +/** + * Sets the background color of the status bar, which will visually only have an impact, + * if the status bar is visible. The supported format is any valid CSS color value, + * like `rebeccapurple`, `#RRGGBBAA`, `rgb(255 0 153)`. + * If cordova-plugin-statusbar is installed, the call will be forwarded to + * `window.StatusBar.backgroundColorByHexString`, where alpha is only supported if + * `StatusBar.overlaysWebView` is set to `true`. + */ Object.defineProperty(statusBar, 'setBackgroundColor', { configurable: false, enumerable: false, From 4e37382d1a810869b7cb893adb2a718506285d1d Mon Sep 17 00:00:00 2001 From: Manuel Beck Date: Tue, 23 Jun 2026 22:06:15 +0200 Subject: [PATCH 2/5] doc(statusbar.js): add documentation for `visible` property --- cordova-js-src/plugin/android/statusbar.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cordova-js-src/plugin/android/statusbar.js b/cordova-js-src/plugin/android/statusbar.js index a437504a7..e0ae044ae 100644 --- a/cordova-js-src/plugin/android/statusbar.js +++ b/cordova-js-src/plugin/android/statusbar.js @@ -26,6 +26,12 @@ var statusBar = {}; const statusBarScript = document.createElement('script'); document.head.appendChild(statusBarScript); +/** + * Sets the visibility of the status bar, which will only work if Android EdgeToEdge is disabled. + * If cordova-plugin-statusbar is used, it works also on Android EdgeToEdge. + * If the plugin is used, the call will be forwarded to `window.StatusBar.show` or + * `window.StatusBar.hide` of the plugin. + */ Object.defineProperty(statusBar, 'visible', { configurable: false, enumerable: true, From 9ad8ca17f89b3c8c2f2f32c572f1b7b7d3a02078 Mon Sep 17 00:00:00 2001 From: Manuel Beck Date: Tue, 23 Jun 2026 22:38:05 +0200 Subject: [PATCH 3/5] update documentation for visible - It will also not work with Android EdgeToEdge and the plugin on Android 14/15/16. It worked on Android 9/10 but maybe this is not worth to mention --- cordova-js-src/plugin/android/statusbar.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cordova-js-src/plugin/android/statusbar.js b/cordova-js-src/plugin/android/statusbar.js index e0ae044ae..d5dbd4ae0 100644 --- a/cordova-js-src/plugin/android/statusbar.js +++ b/cordova-js-src/plugin/android/statusbar.js @@ -28,8 +28,7 @@ document.head.appendChild(statusBarScript); /** * Sets the visibility of the status bar, which will only work if Android EdgeToEdge is disabled. - * If cordova-plugin-statusbar is used, it works also on Android EdgeToEdge. - * If the plugin is used, the call will be forwarded to `window.StatusBar.show` or + * If cordova-plugin-statusbar the call will be forwarded to `window.StatusBar.show` or * `window.StatusBar.hide` of the plugin. */ Object.defineProperty(statusBar, 'visible', { From c8d47914f56272755f7b5dbf67c991972b6a107e Mon Sep 17 00:00:00 2001 From: Manuel Beck Date: Tue, 23 Jun 2026 22:39:51 +0200 Subject: [PATCH 4/5] small wording update for visible documentation --- cordova-js-src/plugin/android/statusbar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cordova-js-src/plugin/android/statusbar.js b/cordova-js-src/plugin/android/statusbar.js index d5dbd4ae0..17cdcb8df 100644 --- a/cordova-js-src/plugin/android/statusbar.js +++ b/cordova-js-src/plugin/android/statusbar.js @@ -28,7 +28,7 @@ document.head.appendChild(statusBarScript); /** * Sets the visibility of the status bar, which will only work if Android EdgeToEdge is disabled. - * If cordova-plugin-statusbar the call will be forwarded to `window.StatusBar.show` or + * If cordova-plugin-statusbar is used, the call will be forwarded to `window.StatusBar.show` or * `window.StatusBar.hide` of the plugin. */ Object.defineProperty(statusBar, 'visible', { From 3d8e64e7e52409a4fa2ec754cf275a6444f3fc72 Mon Sep 17 00:00:00 2001 From: Manuel Beck Date: Mon, 6 Jul 2026 15:29:20 +0200 Subject: [PATCH 5/5] Simpify documentation of `setBackgroundColor` - To make it inline with the iOS documentation of PR https://github.com/apache/cordova-ios/pull/1670 --- cordova-js-src/plugin/android/statusbar.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cordova-js-src/plugin/android/statusbar.js b/cordova-js-src/plugin/android/statusbar.js index 17cdcb8df..6363c20bb 100644 --- a/cordova-js-src/plugin/android/statusbar.js +++ b/cordova-js-src/plugin/android/statusbar.js @@ -58,12 +58,12 @@ Object.defineProperty(statusBar, 'visible', { }); /** - * Sets the background color of the status bar, which will visually only have an impact, - * if the status bar is visible. The supported format is any valid CSS color value, - * like `rebeccapurple`, `#RRGGBBAA`, `rgb(255 0 153)`. - * If cordova-plugin-statusbar is installed, the call will be forwarded to - * `window.StatusBar.backgroundColorByHexString`, where alpha is only supported if - * `StatusBar.overlaysWebView` is set to `true`. + * Sets the background color of the visible status bar. + * Supports valid CSS color values, e.g. `rebeccapurple`, `#RRGGBBAA`, `rgb(255 0 153)`. + * + * If cordova-plugin-statusbar is installed, calls are forwarded to the plugin API: + * `window.StatusBar.backgroundColorByHexString` + * See {@link https://s.apache.org/cdv-plugin-statusbar} for cordova-plugin-statusbar details. */ Object.defineProperty(statusBar, 'setBackgroundColor', { configurable: false,