Giter VIP home page Giter VIP logo

Comments (10)

kg-kartik avatar kg-kartik commented on June 12, 2024

Does push.js even shows notification in chrome if you are using localhost,i.e , http connection..In my case it is working well in edge but i cant see any notification in chrome ? So, I infer that chrome is blocking notification on sites with insecure http connection as it blocks Notifications from Notification API.

from push.js.

theLufenk avatar theLufenk commented on June 12, 2024

Notification API should work fine in localhost. Please check that you have not denied push permission.

from push.js.

kg-kartik avatar kg-kartik commented on June 12, 2024

No , I have allowed notifications and popups . The promise is being fulfilled, it is just that notification is not showing up.

from push.js.

theLufenk avatar theLufenk commented on June 12, 2024

Please specify the OS and Browser versions. Thanks

from push.js.

kg-kartik avatar kg-kartik commented on June 12, 2024

OS -Windows
Chrome Version - 84

from push.js.

NamanSharma5 avatar NamanSharma5 commented on June 12, 2024

Returning to the principal issue, @theLufenk , @kg-kartik , @vlazar & @Calinou do you know why silent notifications are not working? I have made sure to the pass in the silent: true parameter and my notifications are coming through - just not silently.
I am using localhost for dev and heroku for live versions. Does not work on Chrome or Firefox (both run on Windows).

Sample code:

                        Push.create('Sit',{
                            tag: 'Warning',
                            body:"Hi ",
                            timeout:5000, //in ms
                            onClick: function(){
                                window.focus();
                                this.close;
                                },
                            silent:true
                            }
                        )

from push.js.

theLufenk avatar theLufenk commented on June 12, 2024

@NamanSharma5
silent is only supported on Mobile Chrome in the latest version.

Would be simple enough to add support for it here I believe.

A Pull Request is always welcome :)

from push.js.

theLufenk avatar theLufenk commented on June 12, 2024

@kg-kartik Could you please open a separate issue for your question. Thanks.

from push.js.

mapokapo avatar mapokapo commented on June 12, 2024

@theLufenk Why not just use all of the fields found under Notification API Instance properties?

As of now, only body, icon, tag, and requireInteraction are actually used, out of the 15 that are provided in the API.

from push.js.

kofifus avatar kofifus commented on June 12, 2024

I submitted #286

from push.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.