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:
21
test/js/assert/document.currentScript.html
Normal file
21
test/js/assert/document.currentScript.html
Normal 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>
|
Reference in New Issue
Block a user