()
| 20136 | /** |
| 20137 | * Adds an HTML image tag to the summary buffer |
| 20138 | * |
| 20139 | * @param {string} src path to the image you to embed |
| 20140 | * @param {string} alt text description of the image |
| 20141 | * @param {SummaryImageOptions} options (optional) addition image attributes |
| 20142 | * |
| 20143 | * @returns {Summary} summary instance |
| 20144 | */ |
| 20145 | addImage(src, alt, options) { |
| 20146 | const { width, height } = options || {}; |
| 20147 | const attrs = Object.assign(Object.assign({}, width && { width }), height && { height }); |
| 20148 | const element = this.wrap("img", null, Object.assign({ src, alt }, attrs)); |
no test coverage detected