mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-19 10:37:01 +00:00
25 lines
494 B
JavaScript
25 lines
494 B
JavaScript
// This element allows Inbucket to draw server rendered HTML, aka HTML email.
|
|
// https://leveljournal.com/server-rendered-html-in-elm
|
|
|
|
customElements.define(
|
|
"rendered-html",
|
|
class RenderedHtml extends HTMLElement {
|
|
constructor() {
|
|
super()
|
|
this._content = ""
|
|
}
|
|
|
|
set content(value) {
|
|
if (this._content === value) {
|
|
return
|
|
}
|
|
this._content = value
|
|
this.innerHTML = value
|
|
}
|
|
|
|
get content() {
|
|
return this._content
|
|
}
|
|
}
|
|
)
|