Files
klz-cables.com/.pnpm-store/v10/files/5f/a50f1f71f4354832df9054b034c0c6712c861427c3cb16562a643d678e9ed566a2baffaf8b9249de90fad99274a9eda104aa84fcf378d8775569f8a0f8927d
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

24 lines
835 B
Plaintext

import { WINDOW } from '../../../types.js';
/**
* web-vitals 5.1.0 switched listeners to be added on the window rather than the document.
* Instead of having to check for window/document every time we add a listener, we can use this function.
*/
function addPageListener(type, listener, options) {
if (WINDOW.document) {
WINDOW.addEventListener(type, listener, options);
}
}
/**
* web-vitals 5.1.0 switched listeners to be removed from the window rather than the document.
* Instead of having to check for window/document every time we remove a listener, we can use this function.
*/
function removePageListener(type, listener, options) {
if (WINDOW.document) {
WINDOW.removeEventListener(type, listener, options);
}
}
export { addPageListener, removePageListener };
//# sourceMappingURL=globalListeners.js.map