Skip to content

Commit 63d6f94

Browse files
1 parent e547b48 commit 63d6f94

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

scripts/aem.js

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2024 Adobe. All rights reserved.
2+
* Copyright 2025 Adobe. All rights reserved.
33
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
44
* you may not use this file except in compliance with the License. You may obtain a copy
55
* of the License at http://www.apache.org/licenses/LICENSE-2.0
@@ -148,11 +148,12 @@ function setup() {
148148
}
149149

150150
/**
151-
* Auto initializiation.
151+
* Auto initialization.
152152
*/
153153

154154
function init() {
155155
setup();
156+
sampleRUM.collectBaseURL = window.origin;
156157
sampleRUM();
157158
}
158159

@@ -439,6 +440,8 @@ function decorateIcon(span, prefix = '', alt = '') {
439440
img.src = `${window.hlx.codeBasePath}${prefix}/icons/${iconName}.svg`;
440441
img.alt = alt;
441442
img.loading = 'lazy';
443+
img.width = 16;
444+
img.height = 16;
442445
span.append(img);
443446
}
444447

@@ -448,7 +451,7 @@ function decorateIcon(span, prefix = '', alt = '') {
448451
* @param {string} [prefix] prefix to be added to icon the src
449452
*/
450453
function decorateIcons(element, prefix = '') {
451-
const icons = [...element.querySelectorAll('span.icon')];
454+
const icons = element.querySelectorAll('span.icon');
452455
icons.forEach((span) => {
453456
decorateIcon(span, prefix);
454457
});

0 commit comments

Comments
 (0)