const shadow = this.attachShadow({ mode: "open" });
shadow.append(this.#timeElement);
+
+ const style = document.createElement("style");
+ style.textContent = `
+ @media print {
+ time::after {
+ content: " (" attr(title) ")";
+ }
+ }`;
+ shadow.append(style);
}
if (updateTitle) {
this.#timeElement = document.createElement("time");
const shadow = this.attachShadow({ mode: "open" });
shadow.append(this.#timeElement);
+ const style = document.createElement("style");
+ style.textContent = `
+ @media print {
+ time::after {
+ content: " (" attr(title) ")";
+ }
+ }`;
+ shadow.append(style);
}
if (updateTitle) {
this.#timeElement.dateTime = date.toISOString();