Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions cordova-js-src/plugin/android/statusbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
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, the call will be forwarded to `window.StatusBar.show` or
* `window.StatusBar.hide` of the plugin.
*/
Object.defineProperty(statusBar, 'visible', {
configurable: false,
enumerable: true,
Expand All @@ -52,6 +57,14 @@
}
});

/**
* Sets the background color of the visible status bar.
* Supports valid CSS color values, e.g. `rebeccapurple`, `#RRGGBBAA`, `rgb(255 0 153)`.
*

Check failure on line 63 in cordova-js-src/plugin/android/statusbar.js

View workflow job for this annotation

GitHub Actions / NodeJS 24.x on ubuntu-latest

Trailing spaces not allowed

Check failure on line 63 in cordova-js-src/plugin/android/statusbar.js

View workflow job for this annotation

GitHub Actions / NodeJS 24.x on macos-26

Trailing spaces not allowed

Check failure on line 63 in cordova-js-src/plugin/android/statusbar.js

View workflow job for this annotation

GitHub Actions / NodeJS 22.x on ubuntu-latest

Trailing spaces not allowed

Check failure on line 63 in cordova-js-src/plugin/android/statusbar.js

View workflow job for this annotation

GitHub Actions / NodeJS 20.x on ubuntu-latest

Trailing spaces not allowed

Check failure on line 63 in cordova-js-src/plugin/android/statusbar.js

View workflow job for this annotation

GitHub Actions / NodeJS 22.x on macos-26

Trailing spaces not allowed

Check failure on line 63 in cordova-js-src/plugin/android/statusbar.js

View workflow job for this annotation

GitHub Actions / NodeJS 26.x on macos-26

Trailing spaces not allowed

Check failure on line 63 in cordova-js-src/plugin/android/statusbar.js

View workflow job for this annotation

GitHub Actions / NodeJS 26.x on ubuntu-latest

Trailing spaces not allowed

Check failure on line 63 in cordova-js-src/plugin/android/statusbar.js

View workflow job for this annotation

GitHub Actions / NodeJS 24.x on ubuntu-latest

Trailing spaces not allowed

Check failure on line 63 in cordova-js-src/plugin/android/statusbar.js

View workflow job for this annotation

GitHub Actions / NodeJS 20.x on ubuntu-latest

Trailing spaces not allowed

Check failure on line 63 in cordova-js-src/plugin/android/statusbar.js

View workflow job for this annotation

GitHub Actions / NodeJS 22.x on ubuntu-latest

Trailing spaces not allowed

Check failure on line 63 in cordova-js-src/plugin/android/statusbar.js

View workflow job for this annotation

GitHub Actions / NodeJS 22.x on macos-15

Trailing spaces not allowed
* 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,
enumerable: false,
Expand Down
Loading