assignment_late
Why donate
travel_explore
API Explorer
widgets
Vue Components
Ajax Bar
Avatar
Badge
Banner
Bar
Breadcrumbs
Card
Carousel
Chat Message
Chip
Circular Progress
Color Picker
Dialog
Editor - WYSIWYG
Expansion Item
Floating Action Button
Icon
Img
Infinite Scroll
Inner Loading
Intersection
Knob
Linear Progress
List & List Items
Markup Table
Menu
No SSR
Pagination
Parallax
Popup Edit
Popup Proxy
Pull to refresh
Rating
Responsive
Scroll Area
Separator
Skeleton
Slide Item
Slide Transition
Space
Spinners
Splitter
Stepper
Table
Tabs
Tab Panels
Timeline
Toolbar
Tooltip
Tree
Uploader
Video
Virtual Scroll
security
Security
build
Quasar CLI (with Vite)
Upgrade guide
NEW!
The quasar.config file
Convert project to CLI with Vite
Browser Compatibility
Supporting TypeScript
Directory Structure
Commands List
CSS Preprocessors
Routing
Lazy Loading - Code Splitting
Handling Assets
Boot Files
Prefetch Feature
API Proxying
Handling Vite
Handling process.env
State Management with Pinia
Linter
Testing & Auditing
Developing Mobile Apps
Ajax Requests
Opening Dev Server To Public
build
Quasar CLI (with Webpack)
Upgrade guide
NEW!
The quasar.config file
Convert to CLI with Webpack
Browser Compatibility
Supporting TypeScript
Directory Structure
Commands List
CSS Preprocessors
Routing
Lazy Loading - Code Splitting
Handling Assets
Boot Files
Prefetch Feature
API Proxying
Handling Webpack
Handling process.env
State Management with Pinia
Linter
Testing & Auditing
Developing Mobile Apps
Ajax Requests
Opening Dev Server To Public
note_add
App Extensions
Quasar makes use of the Web Page Visibility API which lets you know when a website/app is visible or in focus.
Loading AppVisibility API...
Installation
Quasar CLI
Vite plugin / Vue CLI
UMD
// quasar.config file
return {
framework: {
plugins: [
'AppVisibility'
]
}
}
content_paste
Copied to clipboard
Usage
Outside of a Vue file
import { AppVisibility } from 'quasar'
AppVisibility.appVisible // Boolean
// inside of a Vue file
import { useQuasar } from 'quasar'
setup () {
const $q = useQuasar()
// now use $q.appVisible (Boolean)
}
content_paste
Copied to clipboard
AppVisibility
Watching for status change
<template>...</template>
<script>
import { useQuasar } from 'quasar'
import { watch } from 'vue'
export default {
setup () {
const $q = useQuasar()
watch(() => $q.appVisible, val => {
console.log(val ? 'App became visible' : 'App went in the background')
})
}
}
</script>
content_paste
Copied to clipboard
Ready for more?
Caught a mistake?Edit this page in browser
1. Introduction
2. AppVisibility API
3. Installation
4. Usage
5. Watching for status change
Copyright © 2015-present PULSARDEV SRL, Razvan Stoenescu
This website has been designed in collaboration with Dreamonkey Srl