SolarPunker@slrpnk.net to Firefox@lemmy.world · 22 天前How can I prevent white flash?message-squaremessage-square10linkfedilinkarrow-up144arrow-down10file-text
arrow-up144arrow-down1message-squareHow can I prevent white flash?SolarPunker@slrpnk.net to Firefox@lemmy.world · 22 天前message-square10linkfedilinkfile-text
minus-squareVictor@lemmy.worldlinkfedilinkarrow-up2·22 天前By the way, const block = document.getElementById('antiFOUC-block') Is this necessary? Isn’t there a reference to this node already via the style identifier?
minus-squarejutty@blendit.bsd.cafelinkfedilinkarrow-up1·22 天前I guess, but: my JS skills are horrific I have a habit of avoiding all outer and/or global state like the plague
minus-squareVictor@lemmy.worldlinkfedilinkarrow-up1·22 天前 Fair enough 😁 IMO it’s more of a closure than global state, since this is an isolated function/IIFE. 👍 But it’s up to you! 😊
By the way,
Is this necessary? Isn’t there a reference to this node already via the
styleidentifier?I guess, but: