3 <script src=
"../../../resources/js-test.js"></script>
8 description('Test basic usage of document.currentScript')
10 function logCurrentScript() {
11 var script
= document
.currentScript
12 var s
= '<script id="' + script
.id
+ '"';
32 document.write('
<script id=
"d">logCurrentScript();<\/script
>');
36 <script id=
"defer-1" defer
src=
"resources/log-current-script.js"></script>
37 <script id=
"e" src=
"resources/log-current-script.js"></script>
42 document.write('
<script id=
"g" src=
"resources/log-current-script.js"><\/script
>');
48 document.write('
<script id=
"defer-2" defer
src=
"resources/log-current-script.js"><\/script
>');
55 var script = document.createElement('script');
57 script.textContent = 'logCurrentScript();';
60 document.head.appendChild(script);
66 window
.onload = function() {
67 shouldBeNull('document.currentScript');