Next.js - How to add a <link> tag inside the <head> with literal onload attribute string value?
问题 On a Next.js project, I'd like to get some initial HTML with this exact same content inside the <head> : <link href="..." rel="stylesheet" media="print" onload="this.media='all'" /> What I have in my code, inside Next.js's <Head> component, is: { /* @ts-ignore */ } <link href="..." rel="stylesheet" media="print" onload="this.media='all'" /> Without the @ts-ignore it says: Property 'onload' does not exist on type 'DetailedHTMLProps<LinkHTMLAttributes, HTMLLinkElement>'. Did you mean 'onLoad'?