Add crossorigin param
parent
5538e55bb0
commit
49204189f2
@ -1,6 +1,7 @@
|
|||||||
|
{{ $crossorigin := .crossorigin | default "anonymous" }}
|
||||||
{{ $href := .href }}
|
{{ $href := .href }}
|
||||||
{{ $integrity := .integrity }}
|
{{ $integrity := .integrity }}
|
||||||
{{ $onload := .onload | safeJS }}
|
{{ $onload := .onload | safeJS }}
|
||||||
{{ $src := .src }}
|
{{ $src := .src }}
|
||||||
|
|
||||||
<script {{ if ne $href (urls.Parse $href).Path }} crossorigin="anonymous" {{ end }} defer integrity="{{ $integrity }}" {{ with $onload }} onload="{{ . }}" {{ end }} referrerpolicy="no-referrer" src="{{ partial `paige/func-url.html` $src }}"></script>
|
<script {{ if ne $href (urls.Parse $href).Path }} {{ with $crossorigin }} crossorigin="{{ $anonymous }}" {{ end }} defer integrity="{{ $integrity }}" {{ with $onload }} onload="{{ . }}" {{ end }} referrerpolicy="no-referrer" src="{{ partial `paige/func-url.html` $src }}"></script>
|
||||||
|
Loading…
Reference in New Issue