JS: introduce HTML::ScriptElement::getScript()

This commit is contained in:
Esben Sparre Andreasen
2019-01-28 15:40:30 +01:00
parent a78dd422b6
commit 5e2b1c026a
5 changed files with 56 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
| tst.html:2:3:2:32 | <script>...</> | tst.js:1:1:2:0 | <toplevel> |
| tst.html:5:3:5:38 | <script>...</> | tst.js:1:1:2:0 | <toplevel> |
| tst.html:8:3:8:25 | <script>...</> | tst.html:8:11:8:16 | <toplevel> |
| tst.html:9:3:11:11 | <script>...</> | tst.html:9:11:11:2 | <toplevel> |

View File

@@ -0,0 +1,5 @@
import javascript
from HTML::ScriptElement e
select e, e.getScript()

View File

@@ -0,0 +1,12 @@
<html>
<script src="tst.js"></script>
<script src="does-not-exist.js"></script>
<script src="tst.js">inline</script>
<script src="does-not-exist.js">inline</script>
<script>inline</script>
<script>
inline
</script>
</html>

View File

@@ -0,0 +1 @@
not_inline