constructor()

in static/src/javascripts/projects/common/modules/ui/message.js [21:40]


    constructor(id, options) {
        const opts = options || {};
        this.id = id;
        this.important = opts.important || false;
        this.permanent = opts.permanent || false;
        this.blocking = opts.blocking || false;
        this.trackDisplay = opts.trackDisplay || false;
        this.type = opts.type || 'banner';
        this.position = opts.position || 'bottom';
        this.siteMessageComponentName = opts.siteMessageComponentName || '';
        this.siteMessageLinkName = opts.siteMessageLinkName || '';
        this.siteMessageCloseBtn = opts.siteMessageCloseBtn || '';
        this.prefs = 'messages';
        this.widthBasedMessage = opts.widthBasedMessage || false;
        this.cssModifierClass = opts.cssModifierClass || '';
        this.customJs = opts.customJs || noop;
        this.customOpts = opts.customOpts || {};
        this.$siteMessageContainer = $('.js-site-message');
        this.$siteMessageOverlay = $('.js-site-message-overlay');
    }