Skip to content
Permalink
Browse files

[] (0) <marquee>, DOM side

git-svn-id: http://svn.whatwg.org/webapps@3133 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
Hixie committed May 26, 2009
1 parent 0dc6d2f commit 04e9529ce80cb08dc723e82cae91a98566f37fc0
Showing with 312 additions and 2 deletions.
  1. +119 −1 index
  2. +193 −1 source
120 index

<h4 id=the-marquee-element-0><span class=secno>12.1.2 </span>The <dfn><code>marquee</code></dfn> element</h4>

<p class=XXX>...</p>
<p>The <code><a href=#the-marquee-element-0>marquee</a></code> element is a presentational element that
animates content. CSS transitions and animations are a more
appropriate mechanism.</p>

<pre class=idl>interface <dfn id=htmlmarqueeelement>HTMLMarqueeElement</dfn> : <a href=#htmlelement>HTMLElement</a> {
attribute DOMString <a href=#dom-marquee-behavior title=dom-marquee-behavior>behavior</a>;
attribute DOMString <a href=#dom-marquee-bgcolor title=dom-marquee-bgColor>bgColor</a>;
attribute DOMString <a href=#dom-marquee-direction title=dom-marquee-direction>direction</a>;
attribute DOMString <a href=#dom-marquee-height title=dom-marquee-height>height</a>;
attribute DOMString <a href=#dom-marquee-hspace title=dom-marquee-hspace>hspace</a>;
attribute DOMString <a href=#dom-marquee-loop title=dom-marquee-loop>loop</a>;
attribute DOMString <a href=#dom-marquee-scrollamount title=dom-marquee-scrollamount>scrollamount</a>;
attribute DOMString <a href=#dom-marquee-scrolldelay title=dom-marquee-scrolldelay>scrolldelay</a>;
attribute DOMString <a href=#dom-marquee-truespeed title=dom-marquee-trueSpeed>trueSpeed</a>;
attribute DOMString <a href=#dom-marquee-vspace title=dom-marquee-vspace>vspace</a>;
attribute DOMString <a href=#dom-marquee-width title=dom-marquee-width>width</a>;

attribute <a href=#function>Function</a> <a href=#handler-marquee-onbounce title=handler-marquee-onbounce>onbounce</a>;
attribute <a href=#function>Function</a> <a href=#handler-marquee-onfinish title=handler-marquee-onfinish>onfinish</a>;
attribute <a href=#function>Function</a> <a href=#handler-marquee-onstart title=handler-marquee-onstart>onstart</a>;

void <a href=#dom-marquee-start title=dom-marquee-start>start</a>()
void <a href=#dom-marquee-stop title=dom-marquee-stop>stop</a>()
};</pre>

<p>The <dfn id=attr-marquee-behavior title=attr-marquee-behavior><code>behavior</code></dfn> content
attribute on <code><a href=#the-marquee-element-0>marquee</a></code> elements is an <a href=#enumerated-attribute>enumerated
attribute</a> with the following keywords (all
non-conforming):</p>

<table><thead><tr><th>Keyword
<th>State
<tbody><tr><td><code title="">scroll</code>
<td><dfn id=attr-marquee-behavior-scroll title=attr-marquee-behavior-scroll>scroll</dfn>
<tr><td><code title="">slide</code>
<td><dfn id=attr-marquee-behavior-slide title=attr-marquee-behavior-slide>slide</dfn>
<tr><td><code title="">alternate</code>
<td><dfn id=attr-marquee-behavior-alternate title=attr-marquee-behavior-alternate>scroll</dfn>
</table><p>The <i>missing value default</i> is the <a href=#attr-marquee-behavior-scroll title=attr-marquee-behavior-scroll>scroll</a> state.</p>

<hr><p>The <dfn id=attr-marquee-direction title=attr-marquee-direction><code>direction</code></dfn> content
attribute on <code><a href=#the-marquee-element-0>marquee</a></code> elements is an <a href=#enumerated-attribute>enumerated
attribute</a> with the following keywords (all
non-conforming):</p>

<table><thead><tr><th>Keyword
<th>State
<tbody><tr><td><code title="">left</code>
<td><dfn id=attr-marquee-direction-left title=attr-marquee-direction-left>left</dfn>
<tr><td><code title="">right</code>
<td><dfn id=attr-marquee-direction-right title=attr-marquee-direction-right>right</dfn>
<tr><td><code title="">up</code>
<td><dfn id=attr-marquee-direction-up title=attr-marquee-direction-up>up</dfn>
<tr><td><code title="">down</code>
<td><dfn id=attr-marquee-direction-down title=attr-marquee-direction-down>down</dfn>
</table><p>The <i>missing value default</i> is the <a href=#attr-marquee-direction-left title=attr-marquee-direction-left>left</a> state.</p>

<hr><p>The <dfn id=attr-marquee-truespeed title=attr-marquee-truespeed><code>truespeed</code></dfn> content
attribute on <code><a href=#the-marquee-element-0>marquee</a></code> elements is an <a href=#enumerated-attribute>enumerated
attribute</a> with the following keywords (all
non-conforming):</p>

<table><thead><tr><th>Keyword
<th>State
<tbody><tr><td><code title="">true</code>
<td><dfn id=attr-marquee-truespeed-true title=attr-marquee-truespeed-true>true</dfn>
<tr><td><code title="">false</code>
<td><dfn id=attr-marquee-truespeed-false title=attr-marquee-truespeed-false>false</dfn>
</table><p>The <i>missing value default</i> is the <a href=#attr-marquee-truespeed-false title=attr-marquee-truespeed-false>false</a> state.</p>

<hr><p>A <code><a href=#the-marquee-element-0>marquee</a></code> element has a <dfn id=marquee-scroll-speed>marquee scroll
speed</dfn>, which is obtained as follows:</p>

<ol><li><p>If the element has a <code title="">scrolldelay</code>
attribute, and parsing its value using the <a href=#rules-for-parsing-non-negative-integers>rules for parsing
non-negative integers</a> does not return an error, then let
<var title="">delay</var> be the parsed value. Otherwise, let <var title="">delay</var> be 85.</li>

<li><p>If the element does not have a <code title="">truespeed</code> attribute, or if it does but that
attribute is in the <a href=#attr-marquee-truespeed-false title=attr-marquee-truespeed-false>false</a> state, and the
<var title="">delay</var> value is less than 60, then let <var title="">delay</var> be 60 instead.</li>

<li><p>The <a href=#marquee-scroll-speed>marquee scroll speed</a> is <var title="">delay</var>, interpreted in milliseconds.</li>

</ol><hr><p>A <code><a href=#the-marquee-element-0>marquee</a></code> element can be <dfn id=concept-marquee-on title=concept-marquee-on>turned on</dfn> or <dfn id=concept-marquee-off title=concept-marquee-off>turned off</dfn>. When it is created, it
is <a href=#concept-marquee-on title=concept-marquee-on>turned on</a>.</p>

<p>When the <dfn id=dom-marquee-start title=dom-marquee-start><code>start()</code></dfn> method is
called, the <code><a href=#the-marquee-element-0>marquee</a></code> element must be <a href=#concept-marquee-on title=concept-marquee-on>turned on</a>.</p>

<p>When the <dfn id=dom-marquee-stop title=dom-marquee-stop><code>stop()</code></dfn>
method is called, the <code><a href=#the-marquee-element-0>marquee</a></code> element must be <a href=#concept-marquee-off title=concept-marquee-off>turned off</a>.</p>

<hr><p>The following are the <a href=#event-handler-attributes-0>event handler attributes</a> (and
their corresponding <a href=#event-handler-event-type title="event handler event type">event
handler event types</a>) that must be supported, as content and
DOM attributes, by <code><a href=#the-marquee-element-0>marquee</a></code> elements:</p>

<table><thead><tr><th><a href=#event-handler-attributes-0 title="event handler attributes">event handler attribute</a> <th><a href=#event-handler-event-type>Event handler event type</a>
<tbody><tr><td><dfn id=handler-marquee-onbounce title=handler-marquee-onbounce><code>onbounce</code></dfn> <td> <code title=event-bounce>bounce</code>
<tr><td><dfn id=handler-marquee-onfinish title=handler-marquee-onfinish><code>onfinish</code></dfn> <td> <code title=event-finish>finish</code>
<tr><td><dfn id=handler-marquee-onstart title=handler-marquee-onstart><code>onstart</code></dfn> <td> <code title=event-start>start</code>
</table><hr><p>The <dfn id=dom-marquee-behavior title=dom-marquee-behavior><code>behavior</code></dfn>, <dfn id=dom-marquee-direction title=dom-marquee-direction><code>direction</code></dfn>, <dfn id=dom-marquee-height title=dom-marquee-height><code>height</code></dfn>, <dfn id=dom-marquee-hspace title=dom-marquee-hspace><code>hspace</code></dfn>, <dfn id=dom-marquee-loop title=dom-marquee-loop><code>loop</code></dfn>, <dfn id=dom-marquee-scrollamount title=dom-marquee-scrollamount><code>scrollamount</code></dfn>,
<dfn id=dom-marquee-scrolldelay title=dom-marquee-scrolldelay><code>scrolldelay</code></dfn>,
<dfn id=dom-marquee-vspace title=dom-marquee-vspace><code>vspace</code></dfn>, and <dfn id=dom-marquee-width title=dom-marquee-width><code>width</code></dfn> DOM attributes
must <a href=#reflect>reflect</a> the respective content attributes of the
same name.</p>

<p>The <dfn id=dom-marquee-bgcolor title=dom-marquee-bgColor><code>bgColor</code></dfn>
DOM attribute must <a href=#reflect>reflect</a> the <code title=attr-marquee-bgcolor>bgcolor</code> content attribute.</p>

<p>The <dfn id=dom-marquee-truespeed title=dom-marquee-trueSpeed><code>trueSpeed</code></dfn>, DOM
attribute must <a href=#reflect>reflect</a> the <code title=attr-marquee-truespeed><a href=#attr-marquee-truespeed>truespeed</a></code> content
attribute.</p>







<h3 id=other-elements-and-attributes><span class=secno>12.2 </span>Other elements and attributes</h3>
194 source

<h4>The <dfn><code>marquee</code></dfn> element</h4>

<p class="XXX">...</p>
<p>The <code>marquee</code> element is a presentational element that
animates content. CSS transitions and animations are a more
appropriate mechanism.</p>

<pre class="idl">interface <dfn>HTMLMarqueeElement</dfn> : <span>HTMLElement</span> {
attribute DOMString <span title="dom-marquee-behavior">behavior</span>;
attribute DOMString <span title="dom-marquee-bgColor">bgColor</span>;
attribute DOMString <span title="dom-marquee-direction">direction</span>;
attribute DOMString <span title="dom-marquee-height">height</span>;
attribute DOMString <span title="dom-marquee-hspace">hspace</span>;
attribute DOMString <span title="dom-marquee-loop">loop</span>;
attribute DOMString <span title="dom-marquee-scrollamount">scrollamount</span>;
attribute DOMString <span title="dom-marquee-scrolldelay">scrolldelay</span>;
attribute DOMString <span title="dom-marquee-trueSpeed">trueSpeed</span>;
attribute DOMString <span title="dom-marquee-vspace">vspace</span>;
attribute DOMString <span title="dom-marquee-width">width</span>;

attribute <span>Function</span> <span title="handler-marquee-onbounce">onbounce</span>;
attribute <span>Function</span> <span title="handler-marquee-onfinish">onfinish</span>;
attribute <span>Function</span> <span title="handler-marquee-onstart">onstart</span>;

void <span title="dom-marquee-start">start</span>()
void <span title="dom-marquee-stop">stop</span>()
};</pre>

<p>The <dfn
title="attr-marquee-behavior"><code>behavior</code></dfn> content
attribute on <code>marquee</code> elements is an <span>enumerated
attribute</span> with the following keywords (all
non-conforming):</p>

<table>
<thead>
<tr>
<th>Keyword
<th>State
<tbody>
<tr>
<td><code title="">scroll</code>
<td><dfn title="attr-marquee-behavior-scroll">scroll</dfn>
<tr>
<td><code title="">slide</code>
<td><dfn title="attr-marquee-behavior-slide">slide</dfn>
<tr>
<td><code title="">alternate</code>
<td><dfn title="attr-marquee-behavior-alternate">scroll</dfn>
</table>

<p>The <i>missing value default</i> is the <span
title="attr-marquee-behavior-scroll">scroll</span> state.</p>

<hr>

<p>The <dfn
title="attr-marquee-direction"><code>direction</code></dfn> content
attribute on <code>marquee</code> elements is an <span>enumerated
attribute</span> with the following keywords (all
non-conforming):</p>

<table>
<thead>
<tr>
<th>Keyword
<th>State
<tbody>
<tr>
<td><code title="">left</code>
<td><dfn title="attr-marquee-direction-left">left</dfn>
<tr>
<td><code title="">right</code>
<td><dfn title="attr-marquee-direction-right">right</dfn>
<tr>
<td><code title="">up</code>
<td><dfn title="attr-marquee-direction-up">up</dfn>
<tr>
<td><code title="">down</code>
<td><dfn title="attr-marquee-direction-down">down</dfn>
</table>

<p>The <i>missing value default</i> is the <span
title="attr-marquee-direction-left">left</span> state.</p>

<hr>

<p>The <dfn
title="attr-marquee-truespeed"><code>truespeed</code></dfn> content
attribute on <code>marquee</code> elements is an <span>enumerated
attribute</span> with the following keywords (all
non-conforming):</p>

<table>
<thead>
<tr>
<th>Keyword
<th>State
<tbody>
<tr>
<td><code title="">true</code>
<td><dfn title="attr-marquee-truespeed-true">true</dfn>
<tr>
<td><code title="">false</code>
<td><dfn title="attr-marquee-truespeed-false">false</dfn>
</table>

<p>The <i>missing value default</i> is the <span
title="attr-marquee-truespeed-false">false</span> state.</p>

<hr>

<p>A <code>marquee</code> element has a <dfn>marquee scroll
speed</dfn>, which is obtained as follows:</p>

<ol>

<li><p>If the element has a <code title="">scrolldelay</code>
attribute, and parsing its value using the <span>rules for parsing
non-negative integers</span> does not return an error, then let
<var title="">delay</var> be the parsed value. Otherwise, let <var
title="">delay</var> be 85.</p></li>

<li><p>If the element does not have a <code
title="">truespeed</code> attribute, or if it does but that
attribute is in the <span
title="attr-marquee-truespeed-false">false</span> state, and the
<var title="">delay</var> value is less than 60, then let <var
title="">delay</var> be 60 instead.</p></li>

<li><p>The <span>marquee scroll speed</span> is <var
title="">delay</var>, interpreted in milliseconds.</p></li>

</ol>

<hr>

<p>A <code>marquee</code> element can be <dfn
title="concept-marquee-on">turned on</dfn> or <dfn
title="concept-marquee-off">turned off</dfn>. When it is created, it
is <span title="concept-marquee-on">turned on</span>.</p>

<p>When the <dfn
title="dom-marquee-start"><code>start()</code></dfn> method is
called, the <code>marquee</code> element must be <span
title="concept-marquee-on">turned on</span>.</p>

<p>When the <dfn title="dom-marquee-stop"><code>stop()</code></dfn>
method is called, the <code>marquee</code> element must be <span
title="concept-marquee-off">turned off</span>.</p>

<hr>

<p>The following are the <span>event handler attributes</span> (and
their corresponding <span title="event handler event type">event
handler event types</span>) that must be supported, as content and
DOM attributes, by <code>marquee</code> elements:</p>

<table>
<thead>
<tr><th><span title="event handler attributes">event handler attribute</span> <th><span>Event handler event type</span>
<tbody>
<tr><td><dfn title="handler-marquee-onbounce"><code>onbounce</code></dfn> <td> <code title="event-bounce">bounce</code>
<tr><td><dfn title="handler-marquee-onfinish"><code>onfinish</code></dfn> <td> <code title="event-finish">finish</code>
<tr><td><dfn title="handler-marquee-onstart"><code>onstart</code></dfn> <td> <code title="event-start">start</code>
</table>

<hr>

<p>The <dfn
title="dom-marquee-behavior"><code>behavior</code></dfn>, <dfn
title="dom-marquee-direction"><code>direction</code></dfn>, <dfn
title="dom-marquee-height"><code>height</code></dfn>, <dfn
title="dom-marquee-hspace"><code>hspace</code></dfn>, <dfn
title="dom-marquee-loop"><code>loop</code></dfn>, <dfn
title="dom-marquee-scrollamount"><code>scrollamount</code></dfn>,
<dfn title="dom-marquee-scrolldelay"><code>scrolldelay</code></dfn>,
<dfn title="dom-marquee-vspace"><code>vspace</code></dfn>, and <dfn
title="dom-marquee-width"><code>width</code></dfn> DOM attributes
must <span>reflect</span> the respective content attributes of the
same name.</p>

<p>The <dfn title="dom-marquee-bgColor"><code>bgColor</code></dfn>
DOM attribute must <span>reflect</span> the <code
title="attr-marquee-bgcolor">bgcolor</code> content attribute.</p>

<p>The <dfn
title="dom-marquee-trueSpeed"><code>trueSpeed</code></dfn>, DOM
attribute must <span>reflect</span> the <code
title="attr-marquee-truespeed">truespeed</code> content
attribute.</p>







<h3>Other elements and attributes</h3>

0 comments on commit 04e9529

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