thecodeholic/lobibox

undefined:1 Uncaught (in promise) DOMException: Failed to load because no supported source was found.

wangduanduan opened this issue · 2 comments

I use fontawesome,but the icon cann't display, and throw an error:undefined:1 Uncaught (in promise) DOMException: Failed to load because no supported source was found.

Lobibox.notify('success', {
    size: 'mini',
    position:'center top',
    delay:false,
    delayIndicator: false,
    msg: 'Lorem ipsum dolor sit amet against apennine any created, spend loveliest, building stripes.'
});

it make some html,but i do not use bootstrap. please help.

<div class="icon-el"><i class="glyphicon glyphicon-ok-sign"></i></div>

You need to specify iconSource: 'fontAwesome'.
You can change it for one notification:

Lobibox.notify('success', {
    size: 'mini',
    position:'center top',
    delay:false,
    delayIndicator: false,
    msg: 'Lorem ipsum dolor sit amet against apennine any created, spend loveliest, building stripes.',
    iconSource: 'fontAwesome'
});

or you can change it globally

Lobibox.notify.DEFAULTS = $.extend({}, Lobibox.notify.DEFAULTS, {
    iconSource: 'fontAwesome'
});

Let me know if you need more help