Skip to content

Commit

Permalink
[e] (0) allow context arguemtns on getContext
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@5281 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Aug 11, 2010
1 parent bb19269 commit 5c67e57
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 30 deletions.
23 changes: 13 additions & 10 deletions complete.html
Expand Up @@ -29489,7 +29489,7 @@ <h4 id=the-canvas-element><span class=secno>4.8.11 </span>The <dfn id=canvas><co

DOMString <a href=#dom-canvas-todataurl title=dom-canvas-toDataURL>toDataURL</a>(in optional DOMString type, in any... args);

object <a href=#dom-canvas-getcontext title=dom-canvas-getContext>getContext</a>(in DOMString contextId);
object <a href=#dom-canvas-getcontext title=dom-canvas-getContext>getContext</a>(in DOMString contextId, in any... args);
};</pre>
</dd>
</dl><p>The <code><a href=#the-canvas-element>canvas</a></code> element provides scripts with a
Expand Down Expand Up @@ -29595,12 +29595,13 @@ <h4 id=the-canvas-element><span class=secno>4.8.11 </span>The <dfn id=canvas><co
context.fillRect(100,0,50,50); // only this square remains</pre>
</div>

<hr><dl class=domintro><dt><var title="">context</var> = <var title="">canvas</var> . <code title=dom-canvas-getContext><a href=#dom-canvas-getcontext>getContext</a></code>(<var title="">contextId</var>)</dt>
<hr><dl class=domintro><dt><var title="">context</var> = <var title="">canvas</var> . <code title=dom-canvas-getContext><a href=#dom-canvas-getcontext>getContext</a></code>(<var title="">contextId</var> [, ... ])</dt>

<dd>

<p>Returns an object that exposes an API for drawing on the
canvas. The argument specifies the desired API.</p>
canvas. The first argument specifies the desired API. Subsequent
arguments are handled by that API.</p>

<!--2DCONTEXT-->

Expand All @@ -29626,12 +29627,12 @@ <h4 id=the-canvas-element><span class=secno>4.8.11 </span>The <dfn id=canvas><co
that element. When created, a <code><a href=#the-canvas-element>canvas</a></code> element must not
have a <a href=#primary-context>primary context</a>.</p>

<p>The <dfn id=dom-canvas-getcontext title=dom-canvas-getContext><code>getContext(<var title="">contextId</var>)</code></dfn> method of the
<code><a href=#the-canvas-element>canvas</a></code> element, when invoked, must run the following
steps:</p>
<p>The <dfn id=dom-canvas-getcontext title=dom-canvas-getContext><code>getContext(<var title="">contextId</var>, <var title="">args...</var>)</code></dfn>
method of the <code><a href=#the-canvas-element>canvas</a></code> element, when invoked, must run
the following steps:</p>

<ol><li><p>Let <var title="">contextId</var> be the argument to the
method.</li>
<ol><li><p>Let <var title="">contextId</var> be the first argument to
the method.</li>

<li><p>If <var title="">contextId</var> is not the name of a
context supported by the user agent, return null and abort these
Expand All @@ -29648,7 +29649,8 @@ <h4 id=the-canvas-element><span class=secno>4.8.11 </span>The <dfn id=canvas><co

<li><p>If the <code title=dom-canvas-getContext><a href=#dom-canvas-getcontext>getContext()</a></code> method has
already been invoked on this element for the same <var title="">contextId</var>, return the same object as was returned
that time, and abort these steps.</li>
that time, and abort these steps. The additional arguments are
ignored.</li>

<li><p><dfn id=getcontext-return title=getContext-return>Return a new object for <var title="">contextId</var></dfn>, as defined by the specification
given for <var title="">contextId</var>'s entry in the <a href=http://wiki.whatwg.org/wiki/CanvasContexts>WHATWG Wiki
Expand Down Expand Up @@ -29799,7 +29801,8 @@ <h5 id=2dcontext><span class=secno>4.8.11.1 </span>The 2D context</h5>

<p>When the <code title=dom-canvas-getContext><a href=#dom-canvas-getcontext>getContext()</a></code>
method of a <code><a href=#the-canvas-element>canvas</a></code> element is is to <a href=#getcontext-return title=getContext-return>return a new object for the <var title="">contextId</var></a> <code title=canvas-context-2d><a href=#canvas-context-2d>2d</a></code>, the user agent must return a
new <code><a href=#canvasrenderingcontext2d>CanvasRenderingContext2D</a></code> object.</p>
new <code><a href=#canvasrenderingcontext2d>CanvasRenderingContext2D</a></code> object. Any additional
arguments are ignored.</p>

</div>

Expand Down
23 changes: 13 additions & 10 deletions index
Expand Up @@ -29416,7 +29416,7 @@ interface <dfn id=timedtrackcue>TimedTrackCue</dfn> {

DOMString <a href=#dom-canvas-todataurl title=dom-canvas-toDataURL>toDataURL</a>(in optional DOMString type, in any... args);

object <a href=#dom-canvas-getcontext title=dom-canvas-getContext>getContext</a>(in DOMString contextId);
object <a href=#dom-canvas-getcontext title=dom-canvas-getContext>getContext</a>(in DOMString contextId, in any... args);
};</pre>
</dd>
</dl><p>The <code><a href=#the-canvas-element>canvas</a></code> element provides scripts with a
Expand Down Expand Up @@ -29522,12 +29522,13 @@ interface <dfn id=timedtrackcue>TimedTrackCue</dfn> {
context.fillRect(100,0,50,50); // only this square remains</pre>
</div>

<hr><dl class=domintro><dt><var title="">context</var> = <var title="">canvas</var> . <code title=dom-canvas-getContext><a href=#dom-canvas-getcontext>getContext</a></code>(<var title="">contextId</var>)</dt>
<hr><dl class=domintro><dt><var title="">context</var> = <var title="">canvas</var> . <code title=dom-canvas-getContext><a href=#dom-canvas-getcontext>getContext</a></code>(<var title="">contextId</var> [, ... ])</dt>

<dd>

<p>Returns an object that exposes an API for drawing on the
canvas. The argument specifies the desired API.</p>
canvas. The first argument specifies the desired API. Subsequent
arguments are handled by that API.</p>

<!--2DCONTEXT-->

Expand All @@ -29553,12 +29554,12 @@ interface <dfn id=timedtrackcue>TimedTrackCue</dfn> {
that element. When created, a <code><a href=#the-canvas-element>canvas</a></code> element must not
have a <a href=#primary-context>primary context</a>.</p>

<p>The <dfn id=dom-canvas-getcontext title=dom-canvas-getContext><code>getContext(<var title="">contextId</var>)</code></dfn> method of the
<code><a href=#the-canvas-element>canvas</a></code> element, when invoked, must run the following
steps:</p>
<p>The <dfn id=dom-canvas-getcontext title=dom-canvas-getContext><code>getContext(<var title="">contextId</var>, <var title="">args...</var>)</code></dfn>
method of the <code><a href=#the-canvas-element>canvas</a></code> element, when invoked, must run
the following steps:</p>

<ol><li><p>Let <var title="">contextId</var> be the argument to the
method.</li>
<ol><li><p>Let <var title="">contextId</var> be the first argument to
the method.</li>

<li><p>If <var title="">contextId</var> is not the name of a
context supported by the user agent, return null and abort these
Expand All @@ -29575,7 +29576,8 @@ interface <dfn id=timedtrackcue>TimedTrackCue</dfn> {

<li><p>If the <code title=dom-canvas-getContext><a href=#dom-canvas-getcontext>getContext()</a></code> method has
already been invoked on this element for the same <var title="">contextId</var>, return the same object as was returned
that time, and abort these steps.</li>
that time, and abort these steps. The additional arguments are
ignored.</li>

<li><p><dfn id=getcontext-return title=getContext-return>Return a new object for <var title="">contextId</var></dfn>, as defined by the specification
given for <var title="">contextId</var>'s entry in the <a href=http://wiki.whatwg.org/wiki/CanvasContexts>WHATWG Wiki
Expand Down Expand Up @@ -29726,7 +29728,8 @@ interface <dfn id=timedtrackcue>TimedTrackCue</dfn> {

<p>When the <code title=dom-canvas-getContext><a href=#dom-canvas-getcontext>getContext()</a></code>
method of a <code><a href=#the-canvas-element>canvas</a></code> element is is to <a href=#getcontext-return title=getContext-return>return a new object for the <var title="">contextId</var></a> <code title=canvas-context-2d><a href=#canvas-context-2d>2d</a></code>, the user agent must return a
new <code><a href=#canvasrenderingcontext2d>CanvasRenderingContext2D</a></code> object.</p>
new <code><a href=#canvasrenderingcontext2d>CanvasRenderingContext2D</a></code> object. Any additional
arguments are ignored.</p>

</div>

Expand Down
23 changes: 13 additions & 10 deletions source
Expand Up @@ -32233,7 +32233,7 @@ interface <dfn>TimedTrackCue</dfn> {

DOMString <span title="dom-canvas-toDataURL">toDataURL</span>(in optional DOMString type, in any... args);

object <span title="dom-canvas-getContext">getContext</span>(in DOMString contextId);
object <span title="dom-canvas-getContext">getContext</span>(in DOMString contextId, in any... args);
};</pre>
</dd>
</dl>
Expand Down Expand Up @@ -32351,12 +32351,13 @@ interface <dfn>TimedTrackCue</dfn> {

<dl class="domintro">

<dt><var title="">context</var> = <var title="">canvas</var> . <code title="dom-canvas-getContext">getContext</code>(<var title="">contextId</var>)</dt>
<dt><var title="">context</var> = <var title="">canvas</var> . <code title="dom-canvas-getContext">getContext</code>(<var title="">contextId</var> [, ... ])</dt>

<dd>

<p>Returns an object that exposes an API for drawing on the
canvas. The argument specifies the desired API.</p>
canvas. The first argument specifies the desired API. Subsequent
arguments are handled by that API.</p>

<!--END w3c-html--><!--2DCONTEXT-->

Expand Down Expand Up @@ -32391,14 +32392,14 @@ interface <dfn>TimedTrackCue</dfn> {
have a <span>primary context</span>.</p>

<p>The <dfn title="dom-canvas-getContext"><code>getContext(<var
title="">contextId</var>)</code></dfn> method of the
<code>canvas</code> element, when invoked, must run the following
steps:</p>
title="">contextId</var>, <var title="">args...</var>)</code></dfn>
method of the <code>canvas</code> element, when invoked, must run
the following steps:</p>

<ol>

<li><p>Let <var title="">contextId</var> be the argument to the
method.</p></li>
<li><p>Let <var title="">contextId</var> be the first argument to
the method.</p></li>

<li><p>If <var title="">contextId</var> is not the name of a
context supported by the user agent, return null and abort these
Expand All @@ -32419,7 +32420,8 @@ interface <dfn>TimedTrackCue</dfn> {
title="dom-canvas-getContext">getContext()</code> method has
already been invoked on this element for the same <var
title="">contextId</var>, return the same object as was returned
that time, and abort these steps.</p></li>
that time, and abort these steps. The additional arguments are
ignored.</p></li>

<li><p><dfn title="getContext-return">Return a new object for <var
title="">contextId</var></dfn>, as defined by the specification
Expand Down Expand Up @@ -32609,7 +32611,8 @@ interface <dfn>TimedTrackCue</dfn> {
title="getContext-return">return a new object for the <var
title="">contextId</var></span> <code
title="canvas-context-2d">2d</code>, the user agent must return a
new <code>CanvasRenderingContext2D</code> object.</p>
new <code>CanvasRenderingContext2D</code> object. Any additional
arguments are ignored.</p>

</div>

Expand Down

0 comments on commit 5c67e57

Please sign in to comment.