Why PNotify option `after_open` doesn't work?

423 Views Asked by At

I finded similar question

But property after_open doesn't work

I use webpack and npm pnotify package with next code:

entry.js

'use strict';

let PNotify = require('pnotify');

PNotify.prototype.options.styling = 'bootstrap3';

(new PNotify({
  //...
  after_open(ui) {console.log('after_open');},
  //...
}));

Notification show, but without after_open

Where is the problem?

1

There are 1 best solutions below

0
Slaawwa On BEST ANSWER

For using callbacks need include (extra pnotify module)

'use strict';

let PNotify = require('pnotify');
require('pnotify/dist/pnotify.callbacks.js');

/* next code */