Skip to content

Commit

Permalink
typo in "initialization" and add new relative rum capture
Browse files Browse the repository at this point in the history
  • Loading branch information
dkuntze committed Jan 17, 2025
1 parent 7bf27a6 commit 00e40b8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions dist/aem.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2024 Adobe. All rights reserved.
* Copyright 2025 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
Expand Down Expand Up @@ -148,11 +148,12 @@ function setup() {
}

/**
* Auto initializiation.
* Auto initialization.
*/

function init() {
setup();
sampleRUM.collectBaseURL = window.origin;
sampleRUM();
}

Expand Down Expand Up @@ -439,6 +440,8 @@ function decorateIcon(span, prefix = '', alt = '') {
img.src = `${window.hlx.codeBasePath}${prefix}/icons/${iconName}.svg`;
img.alt = alt;
img.loading = 'lazy';
img.width = 16;
img.height = 16;
span.append(img);
}

Expand All @@ -448,7 +451,7 @@ function decorateIcon(span, prefix = '', alt = '') {
* @param {string} [prefix] prefix to be added to icon the src
*/
function decorateIcons(element, prefix = '') {
const icons = [...element.querySelectorAll('span.icon')];
const icons = element.querySelectorAll('span.icon');
icons.forEach((span) => {
decorateIcon(span, prefix);
});
Expand Down

0 comments on commit 00e40b8

Please sign in to comment.