Skip to content

Commit

Permalink
Update docs and owner arg of renderer function
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriy-fix committed Jul 16, 2018
1 parent fb90669 commit 2d8603a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/vaadin-notification.html
Original file line number Diff line number Diff line change
Expand Up @@ -254,12 +254,10 @@

/**
* Custom function for rendering the content of the overlay.
* Receives arguments `root`, `model`, `owner`
* Receives arguments `root`, `owner`
*
* `root` The root container element. Users are able to append content to it.
*
* `model` Object with properties that could be required during the rendering process.
*
* `owner` The host element of the renderer function.
*
* **NOTE:** The renderer callback can be called several times with previous content available
Expand Down Expand Up @@ -394,7 +392,7 @@
}

if (renderer) {
this.renderer(this._card, null, this._card);
this.renderer(this._card, this);
} else {
this._ensureTemplatized();
}
Expand Down
2 changes: 1 addition & 1 deletion test/notification-renderer-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
});

it('renderer should receive notification as owner when it is defined', () => {
notification.renderer = (root, model, owner) => expect(owner).to.eql(notification._card);
notification.renderer = (root, owner) => expect(owner).to.eql(notification);
});

it('should use only renderer when template was assigned after renderer', done => {
Expand Down

0 comments on commit 2d8603a

Please sign in to comment.