Skip to content

Commit

Permalink
Update renderer args and bump analysis.json
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriy-fix committed Jul 18, 2018
1 parent 9260595 commit a2d0ac0
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 49 deletions.
78 changes: 39 additions & 39 deletions analysis.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"sourceRange": {
"file": "src/vaadin-notification.html",
"start": {
"line": 473,
"line": 467,
"column": 6
},
"end": {
"line": 473,
"line": 467,
"column": 62
}
},
Expand Down Expand Up @@ -421,11 +421,11 @@
"privacy": "protected",
"sourceRange": {
"start": {
"line": 301,
"line": 296,
"column": 8
},
"end": {
"line": 307,
"line": 302,
"column": 9
}
},
Expand Down Expand Up @@ -507,15 +507,15 @@
{
"name": "renderer",
"type": "Function | null | undefined",
"description": "Custom function for rendering the content of the notification.\nReceives arguments `root`, `owner`, `model`\n\n`root` the `vaadin-notification-card` container element.\n\n`owner` the `<vaadin-notification>` element.\n\n`model` null\n\n**NOTE:** The renderer callback can be called multiple times with the previous content.\n\n**NOTE:** `notification` does not have any specific properties to pass with the `model` object,\nit is set to null.",
"description": "Custom function for rendering the content of the notification.\nReceives arguments `root`, `notification`, `model`\n\n`root` the `vaadin-notification-card` container element.\n\n`notification` the reference to the notification element.\n\n**NOTE:** The renderer callback can be called multiple times with the previous content.",
"privacy": "public",
"sourceRange": {
"start": {
"line": 269,
"line": 264,
"column": 12
},
"end": {
"line": 272,
"line": 267,
"column": 13
}
},
Expand All @@ -533,11 +533,11 @@
"privacy": "public",
"sourceRange": {
"start": {
"line": 277,
"line": 272,
"column": 12
},
"end": {
"line": 277,
"line": 272,
"column": 28
}
},
Expand All @@ -555,11 +555,11 @@
"privacy": "public",
"sourceRange": {
"start": {
"line": 290,
"line": 285,
"column": 8
},
"end": {
"line": 292,
"line": 287,
"column": 9
}
},
Expand All @@ -575,11 +575,11 @@
"privacy": "public",
"sourceRange": {
"start": {
"line": 297,
"line": 292,
"column": 8
},
"end": {
"line": 299,
"line": 294,
"column": 9
}
},
Expand All @@ -595,11 +595,11 @@
"privacy": "protected",
"sourceRange": {
"start": {
"line": 309,
"line": 304,
"column": 8
},
"end": {
"line": 320,
"line": 315,
"column": 9
}
},
Expand All @@ -619,11 +619,11 @@
"privacy": "protected",
"sourceRange": {
"start": {
"line": 322,
"line": 317,
"column": 8
},
"end": {
"line": 379,
"line": 374,
"column": 9
}
},
Expand All @@ -639,11 +639,11 @@
"privacy": "protected",
"sourceRange": {
"start": {
"line": 381,
"line": 376,
"column": 8
},
"end": {
"line": 389,
"line": 384,
"column": 9
}
},
Expand All @@ -659,11 +659,11 @@
"privacy": "protected",
"sourceRange": {
"start": {
"line": 391,
"line": 386,
"column": 8
},
"end": {
"line": 404,
"line": 398,
"column": 9
}
},
Expand All @@ -683,11 +683,11 @@
"privacy": "protected",
"sourceRange": {
"start": {
"line": 406,
"line": 400,
"column": 8
},
"end": {
"line": 423,
"line": 417,
"column": 9
}
},
Expand All @@ -703,11 +703,11 @@
"privacy": "protected",
"sourceRange": {
"start": {
"line": 425,
"line": 419,
"column": 8
},
"end": {
"line": 429,
"line": 423,
"column": 9
}
},
Expand All @@ -723,11 +723,11 @@
"privacy": "protected",
"sourceRange": {
"start": {
"line": 431,
"line": 425,
"column": 8
},
"end": {
"line": 434,
"line": 428,
"column": 9
}
},
Expand All @@ -743,11 +743,11 @@
"privacy": "protected",
"sourceRange": {
"start": {
"line": 436,
"line": 430,
"column": 8
},
"end": {
"line": 448,
"line": 442,
"column": 9
}
},
Expand All @@ -763,11 +763,11 @@
"privacy": "protected",
"sourceRange": {
"start": {
"line": 450,
"line": 444,
"column": 8
},
"end": {
"line": 454,
"line": 448,
"column": 9
}
},
Expand All @@ -787,11 +787,11 @@
"privacy": "protected",
"sourceRange": {
"start": {
"line": 456,
"line": 450,
"column": 8
},
"end": {
"line": 463,
"line": 457,
"column": 9
}
},
Expand Down Expand Up @@ -823,7 +823,7 @@
"column": 6
},
"end": {
"line": 464,
"line": 458,
"column": 7
}
},
Expand Down Expand Up @@ -881,14 +881,14 @@
},
{
"name": "renderer",
"description": "Custom function for rendering the content of the notification.\nReceives arguments `root`, `owner`, `model`\n\n`root` the `vaadin-notification-card` container element.\n\n`owner` the `<vaadin-notification>` element.\n\n`model` null\n\n**NOTE:** The renderer callback can be called multiple times with the previous content.\n\n**NOTE:** `notification` does not have any specific properties to pass with the `model` object,\nit is set to null.",
"description": "Custom function for rendering the content of the notification.\nReceives arguments `root`, `notification`, `model`\n\n`root` the `vaadin-notification-card` container element.\n\n`notification` the reference to the notification element.\n\n**NOTE:** The renderer callback can be called multiple times with the previous content.",
"sourceRange": {
"start": {
"line": 269,
"line": 264,
"column": 12
},
"end": {
"line": 272,
"line": 267,
"column": 13
}
},
Expand All @@ -900,11 +900,11 @@
"description": "The template of the notification card content.",
"sourceRange": {
"start": {
"line": 277,
"line": 272,
"column": 12
},
"end": {
"line": 277,
"line": 272,
"column": 28
}
},
Expand Down
9 changes: 2 additions & 7 deletions src/vaadin-notification.html
Original file line number Diff line number Diff line change
Expand Up @@ -254,18 +254,13 @@

/**
* Custom function for rendering the content of the notification.
* Receives arguments `root`, `owner`, `model`
* Receives arguments `root`, `notification`, `model`
*
* `root` the `vaadin-notification-card` container element.
*
* `owner` the `<vaadin-notification>` element.
*
* `model` null
* `notification` the reference to the notification element.
*
* **NOTE:** The renderer callback can be called multiple times with the previous content.
*
* **NOTE:** `notification` does not have any specific properties to pass with the `model` object,
* it is set to null.
*/
renderer: {
type: Function,
Expand Down
6 changes: 3 additions & 3 deletions test/notification-renderer-test.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@
expect(notification._card.textContent.trim()).to.equal('renderer-content');
});

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

0 comments on commit a2d0ac0

Please sign in to comment.