Why PNotify option `after_open` doesn't work?

三世轮回 提交于 2019-12-25 01:33:19

问题


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:


For using callbacks need include (extra pnotify module)

'use strict';

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

/* next code */


来源:https://stackoverflow.com/questions/49540534/why-pnotify-option-after-open-doesnt-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!