Open In App

HTML DOM Window performance Property

Improve
Improve
Like Article
Like
Save
Share
Report

The performance property returns a Performance object, which can be further used to gather performance information about the current document.

Syntax:

var per = window.performance

Return Value: It returns a performance object.

Example: This example shows how to get the performance object of the document using this property.

HTML




<!DOCTYPE HTML>
<html>
  
<body style="text-align:center;">
    <h1 style="color:green;">
        GeeksforGeeks
    </h1>
  
    <p>
        HTML | window performance property
    </p>
  
  
    <button onclick="Geeks()">
        Click Here
    </button>
  
    <script>
        function Geeks() {
            console.log(window.performance);
        }
    </script>
</body>
  
</html>


Output:

  • Before Clicking the Button:

  • After Clicking the Button: In the console, the performance object can be seen.

Supported Browsers: 

  • Google Chrome
  • Edge
  • Firefox
  • Safari
  • Opera
  • Internet Explorer

Last Updated : 23 Jul, 2020
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads