Skip to content

Commit

Permalink
Force <meta> elements to accept attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-go committed Dec 12, 2023
1 parent f79f4ee commit 33c500e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Raw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,8 @@ class Raw extends (() => Object as any as RawElements)()
// JavaScript numbers that are specified in the width and height properties
// are injected as HTML attributes rather than assigned as CSS properties.
if (value &&
(name === "width" || name === "height") &&
typeof value === "number")
(name === "width" || name === "height") && typeof value === "number" ||
(e as Element).tagName === "META")
{
(e as Element).setAttribute(name, value.toString());
}
Expand Down

0 comments on commit 33c500e

Please sign in to comment.