summaryrefslogtreecommitdiff
path: root/crates/typst-library/src/html/dom.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2025-07-09 15:48:43 +0200
committerGitHub <noreply@github.com>2025-07-09 13:48:43 +0000
commit3aa7e861e7ffe03193d94c2cfd249739ef746f09 (patch)
tree063945efc6eca31a1f2703fc3127e8723e2eab2d /crates/typst-library/src/html/dom.rs
parenta45c3388a642d6d7321b5c5b684d3582e91cff41 (diff)
Support images in HTML export (#6578)
Diffstat (limited to 'crates/typst-library/src/html/dom.rs')
-rw-r--r--crates/typst-library/src/html/dom.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/typst-library/src/html/dom.rs b/crates/typst-library/src/html/dom.rs
index 47bcf995..49ff37c4 100644
--- a/crates/typst-library/src/html/dom.rs
+++ b/crates/typst-library/src/html/dom.rs
@@ -165,6 +165,11 @@ cast! {
pub struct HtmlAttrs(pub EcoVec<(HtmlAttr, EcoString)>);
impl HtmlAttrs {
+ /// Creates an empty attribute list.
+ pub fn new() -> Self {
+ Self::default()
+ }
+
/// Add an attribute.
pub fn push(&mut self, attr: HtmlAttr, value: impl Into<EcoString>) {
self.0.push((attr, value.into()));