instantpage/instant.page

type="module" and script defer

Closed this issue · 0 comments

djibe commented

Hi,

Nu-HTML checker is crashing during my Jekyll build and throws error

error: A "script" element with a "defer" attribute must not have a "type" attribute with the value "module".

In fact, in the MDN documentation, it is written

There is no need to use the defer attribute (see <script> attributes) when loading a module script; modules are deferred automatically.

So I think you can remove defer from your example
<script src="//instant.page/3.0.0" type="module" defer integrity="sha384-OeDn4XE77tdHo8pGtE1apMPmAipjoxUQ++eeJa6EtJCfHlvijigWiJpD7VDPWXV1"></script>

Thanks a lot.