Question

i have a problem with Crossrider code.

I want to display notifier with this code:

appAPI.notifier.show({
    'name':'my-notification-name',
    'title':'Title',
    'body':body_popUp,
    'theme':'facebook',
    'position':'bottom-left',
    'close':false,
    'sticky':true,
    'fadeAfter':1,
    'width':'700px',
    'closeWhenClicked':false
});

but sometimes work, sometimes not work. Do you have an idea? I have to write any instructions before call .show()?

Thanks in advance, Mattia

Was it helpful?

Solution

You don't show what body_popUp is set to but, assuming it's valid HTML and it's placed in the extension,js file, the code look fine.

In general, note that the notification is smart and only appears when it detects user movement in the browser. This algorithm is used as a way to ensure that the notification is seen, as it assumes the user is looking when activity is detected.

[Disclosure: I am a Crossrider employee]

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top