From 981df1fb162a71d266b2759e4129c9b6d09c72d7 Mon Sep 17 00:00:00 2001 From: Felipe Simoes Date: Fri, 29 Dec 2023 11:32:44 +0100 Subject: [PATCH] #414986 > improvements and lcp by metadata --- head.html | 8 ++++---- scripts/init.js | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/head.html b/head.html index 365f65e3..2e8862b8 100644 --- a/head.html +++ b/head.html @@ -1,8 +1,8 @@ - - - + + + - + diff --git a/scripts/init.js b/scripts/init.js index ca031dd7..f939dc0b 100644 --- a/scripts/init.js +++ b/scripts/init.js @@ -1,5 +1,5 @@ import ComponentLoader from './component-loader.js'; -import { config, debounce, getBreakPoint } from './libs.js'; +import { config, debounce, eagerImage, getBreakPoint } from './libs.js'; export function retriveDataFrom(blocks) { return blocks.map((block) => { @@ -33,6 +33,8 @@ function lcpPriority() { return window.raqnLCP; } +eagerImage(document, 2); + export async function init(node = document) { let blocks = Array.from(node.querySelectorAll('[class]:not([class^=raqn]'));