HTML | DOM Window stop() Method

The stop() method in DOM is used to stop the window from loading resources in the current browsing context, similar to the browser’s stop button.

Syntax:

window.stop()

Property Values:
No return value

Example: Stop window from loading.

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
<style>
    h1 {
        color: green;
    }
</style>
  
<head>
    <script>
          
        // Stop window loading.
        window.stop();
    </script>
</head>
  
<body>
    <h1>GeeksforGeeks</h1>
    <p>The stop() method stops this text
      and the iframe from loading.</p>
  
    <iframe src="https://ide.geeksforgeeks.org/">
  </iframe>
  
</body>
  
</html>

chevron_right


Output:
Without window.stop() method:

With window.stop() method:

Supported Browsers:

  • Google Chrome
  • Firefox
  • Safari
  • Opera


My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.