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>
|
@@ -14,6 +14,7 @@ took = [
|
|||||||
'document.body.children.html',
|
'document.body.children.html',
|
||||||
'document.body.id.html',
|
'document.body.id.html',
|
||||||
'document.characterSet.html',
|
'document.characterSet.html',
|
||||||
|
'document.currentScript.html',
|
||||||
'document.doctype.html',
|
'document.doctype.html',
|
||||||
'document.documentElement.html',
|
'document.documentElement.html',
|
||||||
'document.documentURI.html',
|
'document.documentURI.html',
|
||||||
|
Reference in New Issue
Block a user