0
0
mirror of https://github.com/rkd77/elinks.git synced 2025-09-21 19:46:23 -04:00

[test] document.currentScript.html

This commit is contained in:
Witold Filipczyk
2024-10-18 18:17:05 +02:00
parent 942f889399
commit 9c03006bc4
2 changed files with 22 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<body>
<script id="first">
console.error('document.currentScript.html');
</script>
<script id="second">
console.assert(document.currentScript.id === 'second', 'second');
</script>
<script id="func">
function myFunction() {
console.assert(document.currentScript.id === 'main', 'main');
}
</script>
<script id="main">
myFunction();
console.exit();
</script>
</body>
</html>