/
HTMLScriptElement.cljs
36 lines (27 loc) · 1.19 KB
/
HTMLScriptElement.cljs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
(ns web.dom.HTMLScriptElement
"HTML `<script>` elements expose the HTMLScriptElement interface,
provides special properties and methods for manipulating the
and execution of <script> elements (beyond the inherited `web.dom.HTMLElement`"
(:refer-clojure :exclude []))
(defn referrer-policy
"Property.
The referrerPolicy property of the `web.dom.HTMLScriptElement`
reflects the HTML referrerpolicy of the `<script>` element and
made by that script, defining which referrer is sent when fetching
resource.
`refStr = scriptElem.referrerPolicy;
scriptElem.referrerPolicy = refStr;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/HTMLScriptElement/referrerPolicy`"
[this]
(-> this (.-referrerPolicy)))
(defn set-referrer-policy!
"Property.
The referrerPolicy property of the `web.dom.HTMLScriptElement`
reflects the HTML referrerpolicy of the `<script>` element and
made by that script, defining which referrer is sent when fetching
resource.
`refStr = scriptElem.referrerPolicy;
scriptElem.referrerPolicy = refStr;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/HTMLScriptElement/referrerPolicy`"
[this val]
(aset this "referrerPolicy" val))