HTML Standard Tracker

Diff (omit for latest revision)

Short URL:

File a bug

SVNBugCommentTime (UTC)
2601Add a section explicitly talking about killing scripts that run for too long.2008-12-28 12:05
Index: source
--- source	(revision 2600)
+++ source	(revision 2601)
@@ -38823,7 +38823,36 @@
+  <h5>Killing scripts</h5>
+  <p>User agents may impose resource limitations on scripts, for
+  example CPU quotas, memory limits, total execution time limits, or
+  bandwidth limitations. When a script exceeds a limit, the user agent
+  may either throw a <code>QUOTA_EXCEEDED_ERR</code> exception, abort
+  the script without an exception, prompt the user, or throttle script
+  execution.</p>
+  <div class="example">
+   <p>For example, the following script never terminates. A user agent
+   could, after waiting for a few seconds, prompt the user to either
+   terminate the script or let it continue.</p>
+   <pre>&lt;script>
+ while (true) { /* loop */ }
+  </div>
+  <p>User agents are encouraged to allow users to disable scripting
+  whenever the user is prompted either by a script (e.g. using the
+  <code title="dom-alert">window.alert()</code> API) or because of a
+  script's actions (e.g. because it has exceeded a time limit).</p>
+  <p>If scripting is disabled while a script is executing, the script
+  should be terminated immediately.</p>
   <h4>Event loops</h4>
   <p>To coordinate events, user interaction, scripts, rendering,