Open In App

SVG Document.documentURI Property

Last Updated : 30 Mar, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

The SVG Document.documentURI property returns the document location as a string.

Syntax:

const uri = document.documentURI

Return value: This property returns the document location as a string.

Example:

HTML




<!DOCTYPE html>
<html>
  
<body>
    <svg width="350" height="500" 
        xmlns="http://www.w3.org/2000/svg">
          
        <script>
            console.log(document.documentURI)
        </script>
    </svg>
</body>
  
</html>


Output:


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads