diff --git a/src/vaadin-notification.html b/src/vaadin-notification.html index e86ff98..04b38c1 100644 --- a/src/vaadin-notification.html +++ b/src/vaadin-notification.html @@ -260,7 +260,12 @@ * * `owner` The host element of the renderer function. * - * **NOTE:** The renderer callback can be called several times with previous content available + * `model` null + * + * **NOTE:** The renderer callback can be called several times with previous content when available. + * + * **NOTE:** `notification` does not have any specific properties to pass with the `model` object, + * it is set to null. */ renderer: { type: Function, @@ -392,7 +397,7 @@ } if (renderer) { - this.renderer(this._card, this); + this.renderer(this._card, this, null); } else { this._ensureTemplatized(); } diff --git a/test/notification-renderer-test.html b/test/notification-renderer-test.html index 8f97466..025ed72 100644 --- a/test/notification-renderer-test.html +++ b/test/notification-renderer-test.html @@ -60,8 +60,11 @@ expect(notification._card.textContent.trim()).to.equal('renderer-content'); }); - it('renderer should receive notification as owner when it is defined', () => { - notification.renderer = (root, owner) => expect(owner).to.eql(notification); + it('renderer should receive notification as owner and null as model when defined', () => { + notification.renderer = (root, owner, model) => { + expect(owner).to.eql(notification); + expect(model).to.eql(null); + }; }); it('should use only renderer when template was assigned after renderer', done => {