Giter VIP home page Giter VIP logo

Comments (2)

serkanyersen avatar serkanyersen commented on May 20, 2024

Hi Doruk,

it's probably way too late for this response but I'll try to answer anyways. ifvisible works on top of browser provided visibility api. As you can see on caniuse.com browser support is limited in some cases. for older Android browsers it says to use webkit prefix and ifvisible already does this.

Plus ifvisible has a polyfill in place for older browsers, but it piggybacks on top of page blur, page focus events and those are only available on desktop browsers I think.

So if it's not working on the native browser, it's quite possible that the browser does not trigger these events on device sleep. And to my current knowledge, there is not much option to get that working.

Sorry :/

from ifvisible.js.

dorukeker avatar dorukeker commented on May 20, 2024

Hi Serkan,
Indeed it was some time ago. No worries :)
Ifvisible.js solved many of the use cases on iOS and Android. For those browsers that does not work properly, I implemented a timer logic.

I used Tock.js for that. So if the user is away for a certain time it triggers an event. And you can build your application logic around this.

Thanks for the library and thanks for the reply.
Cheers,
Doruk

from ifvisible.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.