Skip to content
Permalink
Browse files

Add a warning sign for synchronous usage of the XMLHttpRequest API

  • Loading branch information...
annevk committed Feb 7, 2014
1 parent 0c96701 commit 575999ae46afadc8f2ac6376c68fa7a887a88aa6
Showing with 20 additions and 0 deletions.
  1. +10 −0 Overview.html
  2. +10 −0 Overview.src.html
@@ -538,6 +538,16 @@ <h4 id="the-open()-method"><span class="secno">4.5.1 </span>The <code title="">o
attribute is not the empty string.
</dl>

<p class="warning" id="sync-warning">Developers must not pass false for the
<var title="">async</var> argument when the
<a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.html#javascript-global-environment">JavaScript global environment</a> is a
<a class="external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#document-environment">document environment</a> as it has detrimental effects to
the end user's experience. User agents are strongly encouraged to warn about such usage in
developer tools and may experiment with
<a class="external" href="http://dom.spec.whatwg.org/#concept-throw" title="concept-throw">throwing</a> a
"<code class="external"><a href="http://dom.spec.whatwg.org/#invalidaccesserror">InvalidAccessError</a></code>" exception when it occurs so the
feature can eventually be removed from the platform.

<p>The
<dfn id="dom-xmlhttprequest-open" title="dom-XMLHttpRequest-open"><code>open(<var title="">method</var>, <var title="">url</var>, <var title="">async</var>, <var title="">username</var>, <var title="">password</var>)</code></dfn>
method must run these steps:
@@ -492,6 +492,16 @@ <h4>The <code title>open()</code> method</h4>
attribute is not the empty string.
</dl>

<p class=warning id=sync-warning>Developers must not pass false for the
<var title>async</var> argument when the
<span data-anolis-spec=html>JavaScript global environment</span> is a
<span data-anolis-spec=html>document environment</span> as it has detrimental effects to
the end user's experience. User agents are strongly encouraged to warn about such usage in
developer tools and may experiment with
<span data-anolis-spec=dom title=concept-throw>throwing</span> a
"<code data-anolis-spec=dom>InvalidAccessError</code>" exception when it occurs so the
feature can eventually be removed from the platform.

<p>The
<dfn id="dom-xmlhttprequest-open" title="dom-XMLHttpRequest-open"><code>open(<var title>method</var>, <var title>url</var>, <var title>async</var>, <var title>username</var>, <var title>password</var>)</code></dfn>
method must run these steps:

0 comments on commit 575999a

Please sign in to comment.
You can’t perform that action at this time.