{% doc %} Delays Shopify header scripts until the first interaction. Scripts tagged nolazy, plus JSON and JSON-LD blocks, stay immediate. @param {string} html - Markup captured from content_for_header @example {% capture shopify_header %}{{ content_for_header }}{% endcapture %} {% render 'delay-header-scripts', html: shopify_header %} {% enddoc %} {% liquid if request.design_mode or html == blank echo html else assign chunks = html | split: '' | first if open_tag contains 'application/json' or open_tag contains 'application/ld+json' or open_tag contains 'nolazy' echo '