No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Does exist an event for when the browser get focus?

    Framework
    3
    3
    150
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • asceta hedonista
      asceta hedonista last edited by

      I had in my index page a table which I want to keep refreshing every 1 minute or so, but it is a waste execute my ajax request when the page is not been displayed in the screen. Has Quasar or Vue a way to tell me if the browser is at the front of my OS an the tab displayed is my page?

      dobbel metalsadman 2 Replies Last reply Reply Quote 0
      • dobbel
        dobbel @asceta hedonista last edited by

        @asceta-hedonista

        you could look at this:
        https://github.com/stefanodotit/vue-page-visibility-awesome
        https://github.com/Yuliang-Lee/vue-visibility-change

        all using the Page Visibility API:
        https://www.w3.org/TR/page-visibility/

        1 Reply Last reply Reply Quote 0
        • metalsadman
          metalsadman @asceta hedonista last edited by

          @asceta-hedonista https://quasar.dev/quasar-plugins/app-visibility#Introduction

          1 Reply Last reply Reply Quote 1
          • First post
            Last post