object OnsenUi
Contains global Onsen UI functions.
(js)
createElement |
Create HTML element from a given template. fun createElement(template: String): HTMLElement |
(js)
disableAnimations |
Disable all animations. fun disableAnimations(): Unit |
(js)
disableAutoStatusBarFill |
Disable status bar fill on IOS7 and above (except iPhone X) fun disableAutoStatusBarFill(): Unit |
(js)
disableAutoStyling |
Disable automatic styling. fun disableAutoStyling(): Unit |
(js)
disableDeviceBackButtonHandler |
Disable default handler for the device back button. fun disableDeviceBackButtonHandler(): Unit |
(js)
disableIconAutoPrefix |
Disable adding fa- prefix for icons. fun disableIconAutoPrefix(): Unit |
(js)
enableAnimations |
Enable all animations. fun enableAnimations(): Unit |
(js)
enableAutoStatusBarFill |
Enable status bar fill on IOS7 and above (except iPhone X) fun enableAutoStatusBarFill(): Unit |
(js)
enableAutoStyling |
Enable automatic styling. fun enableAutoStyling(): Unit |
(js)
enableDeviceBackButtonHandler |
Enable default handler for the device back button. fun enableDeviceBackButtonHandler(): Unit |
(js)
forcePlatformStyling |
Force styling for the given platform. fun forcePlatformStyling(platform: Platform): Unit |
(js)
forceUIWebViewScrollFix |
Applies a scroll fix for iOS UIWebView. fun forceUIWebViewScrollFix(force: Boolean): Unit |
(js)
isAndroid |
Whether device is Android. fun isAndroid(forceActualPlatform: Boolean = false): Boolean |
(js)
isAndroidPhone |
Whether device is Android phone. fun isAndroidPhone(): Boolean |
(js)
isAndroidTablet |
Whether device is Android tablet. fun isAndroidTablet(): Boolean |
(js)
isBlackBerry |
Whether device is BlackBerry. fun isBlackBerry(forceActualPlatform: Boolean = false): Boolean |
(js)
isChrome |
Whether browser is Chrome. fun isChrome(forceActualPlatform: Boolean = false): Boolean |
(js)
isEdge |
Whether browser is Edge. fun isEdge(forceActualPlatform: Boolean = false): Boolean |
(js)
isFirefox |
Whether browser is Firefox. fun isFirefox(forceActualPlatform: Boolean = false): Boolean |
(js)
isIE |
Whether browser is IE. fun isIE(forceActualPlatform: Boolean = false): Boolean |
(js)
isIOS |
Whether device is iPhone. fun isIOS(forceActualPlatform: Boolean = false): Boolean |
(js)
isIOS7above |
Whether device is iOS 7 or above. fun isIOS7above(): Boolean |
(js)
isIOSSafari |
Whether device is iOS Safari. fun isIOSSafari(): Boolean |
(js)
isIPad |
Whether device is iPad. fun isIPad(): Boolean |
(js)
isIPhone |
Whether device is iPhone. fun isIPhone(): Boolean |
(js)
isIPhoneX |
Whether device is iPhone X, XS, XS Max, or XR. fun isIPhoneX(): Boolean |
(js)
isLandscape |
Whether orientation is landscape. fun isLandscape(): Boolean |
(js)
isOpera |
Whether browser is Opera. fun isOpera(forceActualPlatform: Boolean = false): Boolean |
(js)
isPortrait |
Whether orientation is portrait. fun isPortrait(): Boolean |
(js)
isReady |
Whether OnsenUI engine is loaded and ready. fun isReady(): Boolean |
(js)
isSafari |
Whether browser is Safari. fun isSafari(forceActualPlatform: Boolean = false): Boolean |
(js)
isUIWebView |
Whether device is UIWebView. fun isUIWebView(): Boolean |
(js)
isWebView |
Whether app is running inside Cordova. fun isWebView(): Boolean |
(js)
isWKWebView |
Whether device is WKWebView. fun isWKWebView(): Boolean |
(js)
isWP |
Whether device is Windows Phone. fun isWP(forceActualPlatform: Boolean = false): Boolean |
(js)
mockStatusBar |
Creates a static element similar to iOS/Android status bar. fun mockStatusBar(): Unit |
(js)
offOrientationChange |
Remove orientation change event listener/all listeners. fun offOrientationChange(callback: ((OrientationEvent) -> Unit)? = undefined): Unit |
(js)
onOrientationChange |
Function called on orientation change event. fun onOrientationChange(callback: (OrientationEvent) -> Unit): Unit |
(js)
onOrientationChangeOnce |
Function called on a single orientation change event. fun onOrientationChangeOnce(callback: (OrientationEvent) -> Unit): Unit |
(js)
platformSelect |
Set styling for the given platform (preferred) fun platformSelect(platform: Platform): Unit |
(js)
ready |
A function called when engine is loaded and ready. fun ready(callback: () -> Unit): Unit |
(js)
setDefaultDeviceBackButtonListener |
Set default listener for the device back button event. fun setDefaultDeviceBackButtonListener(listener: (dynamic) -> Unit): Unit |