SVG Document.scripts Property
Last Updated :
30 Mar, 2022
The SVG Document.scripts property returns the list of script element in the document.
Syntax:
var scriptList = document.scripts
Return value: This property returns the list of script element in the document.
Example 1:
HTML
<!DOCTYPE html>
< html >
< body >
< script ></ script >
< svg width = "700" height = "500"
< script >
console.log(document.scripts);
</ script >
</ svg >
</ body >
</ html >
|
Output:
Example 2:
HTML
<!DOCTYPE html>
< html >
< body >
< script ></ script >
< script ></ script >
< script ></ script >
< script ></ script >
< script ></ script >
< svg width = "700" height = "500"
< script >
console.log(document.scripts);
</ script >
</ svg >
</ body >
</ html >
|
Output:
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...