Skip to content

Commit

Permalink
Merge branch 'master' into samart/slotHandling
Browse files Browse the repository at this point in the history
  • Loading branch information
ender336 authored Mar 18, 2024
2 parents 8358766 + bfca871 commit 3ec82ad
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/clarity-js/src/layout/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,16 @@ export default function (node: Node, source: Source): Node {
let linkData = { tag, attributes };
dom[call](node, parent, linkData, source);
break;
case "VIDEO":
case "AUDIO":
case "SOURCE":
// Ignoring any base64 src attribute for media elements to prevent big unused tokens to be sent and shock the network
if (Constant.Src in attributes && attributes[Constant.Src].startsWith("data:")) {
delete attributes[Constant.Src]
}
let mediaTag = { tag, attributes };
dom[call](node, parent, mediaTag, source);
break;
default:
let data = { tag, attributes };
if (element.shadowRoot) { child = element.shadowRoot; }
Expand Down

0 comments on commit 3ec82ad

Please sign in to comment.