Skip to content

Commit

Permalink
Obsolete the <param> element
Browse files Browse the repository at this point in the history
Given that plugins are gone from the web platform (with their full removal from the spec being tracked in #6003), it is not useful. In some browsers it can be used to figure out the URL of an <object>, even when that <object> is not being used for a plugin, via params named "movie", "src", "code", or "url". But we decided to remove this behavior from browsers instead of specifying it.

This retains the HTMLParamElement interface, as well as the parser behavior of <param>.

Closes #387. Helps with #6003.
  • Loading branch information
domenic committed Apr 12, 2022
1 parent 6b024d2 commit 57a190d
Showing 1 changed file with 32 additions and 197 deletions.
229 changes: 32 additions & 197 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -32215,29 +32215,6 @@ interface <dfn interface>HTMLEmbedElement</dfn> : <span>HTMLElement</span> {

</div>

<div class="example">

<p>Here's a way to embed a resource that requires a proprietary plugin, like Flash:</p>

<pre><code class="html">&lt;embed src="catgame.swf"></code></pre>

<p>If the user does not have the plugin (for example if the plugin vendor doesn't support the
user's platform), then the user will be unable to use the resource.</p>

<p>To pass the plugin a parameter "quality" with the value "high", an attribute can be
specified:</p>

<pre><code class="html">&lt;embed src="catgame.swf" quality="high"></code></pre>

<p>This would be equivalent to the following, when using an <code>object</code> element
instead:</p>

<pre><code class="html">&lt;object data="catgame.swf">
&lt;param name="quality" value="high">
&lt;/object></code></pre>

</div>




Expand All @@ -32254,7 +32231,7 @@ interface <dfn interface>HTMLEmbedElement</dfn> : <span>HTMLElement</span> {
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
<dd>Where <span>embedded content</span> is expected.</dd>
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
<dd>Zero or more <code>param</code> elements, then, <span>transparent</span>.</dd>
<dd><span>Transparent</span>.</dd>
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
<dd><span>Global attributes</span></dd>
<dd><code data-x="attr-object-data">data</code></dd>
Expand Down Expand Up @@ -32783,19 +32760,16 @@ interface <dfn interface>HTMLObjectElement</dfn> : <span>HTMLElement</span> {
named <code data-x="event-load">load</code> at the element.</p></li>

<li><p><i>Fallback</i>: The <code>object</code> element <span>represents</span> the element's
children, ignoring any leading <code>param</code> element children. This is the element's
<span>fallback content</span>. If the element has an instantiated <span>plugin</span>, then
unload it. If the element's <span>nested browsing context</span> is non-null, then it must be
<span data-x="a browsing context is discarded">discarded</span> and then set to null.</p></li>
children. This is the element's <span>fallback content</span>. If the element has an
instantiated <span>plugin</span>, then unload it. If the element's <span>nested browsing
context</span> is non-null, then it must be <span data-x="a browsing context is
discarded">discarded</span> and then set to null.</p></li>
</ol>

<p id="object-plugin">When the algorithm above instantiates a <span>plugin</span>, the user agent
should pass to the <span>plugin</span> used the names and values of all the attributes on the
element, in the order they were added to the element, with the attributes added by the parser
being ordered in source order, followed by a parameter named "PARAM" whose value is null, followed
by all the names and values of <span data-x="concept-param-parameter">parameters</span> given by
<code>param</code> elements that are children of the <code>object</code> element, in <span>tree
order</span>. If the <span>plugin</span> supports a scriptable interface, the
being ordered in source order. If the <span>plugin</span> supports a scriptable interface, the
<code>HTMLObjectElement</code> object representing the element should expose that interface. The
<code>object</code> element <span>represents</span> the <span>plugin</span>. The
<span>plugin</span> is not a nested <span>browsing context</span>.</p>
Expand Down Expand Up @@ -32862,124 +32836,6 @@ interface <dfn interface>HTMLObjectElement</dfn> : <span>HTMLElement</span> {

</div>

<div class="example">

<p>The following example shows how a plugin can be used in HTML (in this case the Flash plugin,
to show a video file). Fallback is provided for users who do not have Flash enabled, in this case
using the <code>video</code> element to show the video for those using user agents that support
<code>video</code>, and finally providing a link to the video for those who have neither Flash
nor a <code>video</code>-capable browser.</p>

<pre><code class="html">&lt;p>Look at my video:
&lt;object type="application/x-shockwave-flash">
&lt;param name=movie value="https://video.example.com/library/watch.swf">
&lt;param name=allowfullscreen value=true>
&lt;param name=flashvars value="https://video.example.com/vids/315981">
&lt;video controls src="https://video.example.com/vids/315981">
&lt;a href="https://video.example.com/vids/315981">View video&lt;/a>.
&lt;/video>
&lt;/object>
&lt;/p></code></pre>

</div>



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

<dl class="element">
<dt><span data-x="concept-element-categories">Categories</span>:</dt>
<dd>None.</dd>
<dt><span data-x="concept-element-contexts">Contexts in which this element can be used</span>:</dt>
<dd>As a child of an <code>object</code> element, before any <span>flow content</span>.</dd>
<dt><span data-x="concept-element-content-model">Content model</span>:</dt>
<dd><span data-x="concept-content-nothing">Nothing</span>.</dd>
<dt><span data-x="concept-element-attributes">Content attributes</span>:</dt>
<dd><span>Global attributes</span></dd>
<dd><code data-x="attr-param-name">name</code></dd>
<dd><code data-x="attr-param-value">value</code></dd>
<dt><span
data-x="concept-element-accessibility-considerations">Accessibility considerations</span>:</dt>
<dd><a href="https://w3c.github.io/html-aria/#el-param">For authors</a>.</dd>
<dd><a href="https://w3c.github.io/html-aam/#el-param">For implementers</a>.</dd>
<dt><span data-x="concept-element-dom">DOM interface</span>:</dt>
<dd w-nodev>
<pre><code class="idl">[Exposed=Window]
interface <dfn interface>HTMLParamElement</dfn> : <span>HTMLElement</span> {
[<span>HTMLConstructor</span>] constructor();

[<span>CEReactions</span>] attribute DOMString <span data-x="dom-param-name">name</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-param-value">value</span>;

// <a href="#HTMLParamElement-partial">also has obsolete members</a>
};</code></pre>
</dd>
<dd w-dev>Uses <code>HTMLParamElement</code>.</dd>
</dl>

<p>The <code>param</code> element defines parameters for plugins invoked by <code>object</code>
elements. It does not <span data-x="represents">represent</span> anything on its own.</p>

<p>The <dfn element-attr for="param"><code data-x="attr-param-name">name</code></dfn> attribute
gives the name of the parameter.</p>

<p>The <dfn element-attr for="param"><code data-x="attr-param-value">value</code></dfn> attribute
gives the value of the parameter.</p>

<p>Both attributes must be present. They may have any value.</p>

<div w-nodev>

<p>If both attributes are present, and if the parent element of the <code>param</code> is an
<code>object</code> element, then the element defines a <dfn
data-x="concept-param-parameter">parameter</dfn> with the given name-value pair.</p>

<p>If either the name or value of a <span data-x="concept-param-parameter">parameter</span> defined
by a <code>param</code> element that is the child of an <code>object</code> element that
<span>represents</span> an instantiated <span>plugin</span> changes, and if that
<span>plugin</span> is communicating with the user agent using an API that features the ability to
update the <span>plugin</span> when the name or value of a <span
data-x="concept-param-parameter">parameter</span> so changes, then the user agent must
appropriately exercise that ability to notify the <span>plugin</span> of the change.</p>

<p>The IDL attributes <dfn attribute for="HTMLParamElement"><code
data-x="dom-param-name">name</code></dfn> and <dfn attribute for="HTMLParamElement"><code
data-x="dom-param-value">value</code></dfn> must both <span>reflect</span> the respective content
attributes of the same name.</p>

</div>

<div class="example">

<p>The following example shows how the <code>param</code> element can be used to pass a parameter
to a plugin, in this case the O3D plugin.</p>

<pre><code class="html">&lt;!DOCTYPE HTML>
&lt;html lang="en">
&lt;head>
&lt;title>O3D Utah Teapot&lt;/title>
&lt;/head>
&lt;body>
&lt;p>
&lt;object type="application/vnd.o3d.auto">
<strong>&lt;param name="o3d_features" value="FloatingPointTextures"></strong>
&lt;img src="o3d-teapot.png"
title="3D Utah Teapot illustration rendered using O3D."
alt="When O3D renders the Utah Teapot, it appears as a squat
teapot with a shiny metallic finish on which the
surroundings are reflected, with a faint shadow caused by
the lighting.">
&lt;p>To see the teapot actually rendered by O3D on your
computer, please download and install the &lt;a
href="http://code.google.com/apis/o3d/docs/gettingstarted.html#install">O3D plugin&lt;/a>.&lt;/p>
&lt;/object>
&lt;script src="o3d-teapot.js">&lt;/script>
&lt;/p>
&lt;/body>
&lt;/html></code></pre>

</div>


<h4 split-filename="media" id="the-video-element">The <dfn element id="video"><code>video</code></dfn> element</h4>

Expand Down Expand Up @@ -105963,9 +105819,9 @@ dictionary <dfn dictionary>StorageEventInit</dfn> : <span>EventInit</span> {

<dd><code>area</code>, <code>base</code>, <code>br</code>, <code>col</code>, <code>embed</code>,
<code>hr</code>, <code>img</code>, <code>input</code>, <code>link</code>, <code>meta</code>,
<code>param</code>, <code>source</code>, <code>track</code>, <code>wbr</code></dd>
<code>source</code>, <code>track</code>, <code>wbr</code></dd>
<!-- non-conforming elements treated as void by the parser are not listed here: basefont,
bgsound, frame, keygen -->
bgsound, frame, param, keygen -->

<dt><dfn>The <code data-x="">template</code> element</dfn></dt>
<dd><code>template</code></dd>
Expand Down Expand Up @@ -116822,8 +116678,8 @@ console.assert(container.firstChild instanceof SuperP);
parsed or the parser detects a well-formedness error, the user agent must act as if the element
was in a <span>stack of open elements</span>.</p>

<p class="note">This is used, e.g. by the <code>object</code> element to avoid instantiating plugins
before the <code>param</code> element children have been parsed.</p>
<p class="note">This is used by various elements to only start certain processes once they are
popped off of the <span>stack of open elements</span>.</p>

<p>This specification provides the following additional information that user agents should use
when retrieving an external entity: the public identifiers given in the following list all
Expand Down Expand Up @@ -120275,6 +120131,10 @@ if (s = prompt('What is your name?')) {
<dt><dfn element><code>noembed</code></dfn></dt>
<dd><p>Use <code>object</code> instead of <code>embed</code> when fallback is necessary.</p></dd>

<dt id="the-param-element"><dfn element><code>param</code></dfn></dt>
<dd><p>Use the <code data-x="attr-object-data">data</code> attribute of the <code>object</code> element to set the
URL of the external resource.</p></dd>

<dt><dfn element><code>plaintext</code></dfn></dt>
<dd><p>Use the "<code>text/plain</code>" <span>MIME type</span> instead.</p></dd>

Expand Down Expand Up @@ -120428,8 +120288,7 @@ if (s = prompt('What is your name?')) {
<dt><dfn element-attr for="object"><code data-x="attr-object-codetype">codetype</code></dfn> on <code>object</code> elements</dt>
<dd><p>Use the <code data-x="attr-object-data">data</code> and <code
data-x="attr-object-type">type</code> attributes to invoke <span
data-x="plugin">plugins</span>. To set parameters with these names
in particular, the <code>param</code> element can be used.</p></dd>
data-x="plugin">plugins</span>.</p></dd>

<dt><dfn element-attr for="object"><code data-x="attr-object-declare">declare</code></dfn> on <code>object</code> elements</dt>
<dd><p>Repeat the <code>object</code> element completely each time the resource is to be reused.</p></dd>
Expand All @@ -120440,12 +120299,6 @@ if (s = prompt('What is your name?')) {
<dt><dfn element-attr for="object"><code data-x="attr-object-typemustmatch">typemustmatch</code></dfn> on <code>object</code> elements</dt>
<dd><p>Avoid using <code>object</code> elements with untrusted resources.</p></dd>

<dt><dfn element-attr for="param"><code data-x="attr-param-type">type</code></dfn> on <code>param</code> elements</dt>
<dt><dfn element-attr for="param"><code data-x="attr-param-valuetype">valuetype</code></dfn> on <code>param</code> elements</dt>
<dd><p>Use the <code data-x="attr-param-name">name</code> and <code
data-x="attr-param-value">value</code> attributes without declaring
value types.</p></dd>

<dt><dfn element-attr for="script"><code data-x="attr-script-language">language</code></dfn> on <code>script</code> elements (except as noted in the previous section)</dt>
<dd><p>Omit the attribute for JavaScript; for <span data-x="data block">data blocks</span>, use
the <code data-x="attr-script-type">type</code> attribute instead.</p></dd>
Expand Down Expand Up @@ -120475,7 +120328,7 @@ if (s = prompt('What is your name?')) {
<dd><p>Use <code>th</code> elements for heading cells.</p>

<dt><dfn element-attr><code data-x="attr-datasrc">datasrc</code></dfn> on <code>a</code>, <code>button</code>, <code>div</code>, <code>frame</code>, <code>iframe</code>, <code>img</code>, <code>input</code>, <code>label</code>, <code>legend</code>, <code>marquee</code>, <code>object</code>, <code>option</code>, <code>select</code>, <code>span</code>, <code>table</code>, and <code>textarea</code> elements</dt>
<dt><dfn element-attr><code data-x="attr-datafld">datafld</code></dfn> on <code>a</code>, <code>button</code>, <code>div</code>, <code>fieldset</code>, <code>frame</code>, <code>iframe</code>, <code>img</code>, <code>input</code>, <code>label</code>, <code>legend</code>, <code>marquee</code>, <code>object</code>, <code>param</code>, <code>select</code>, <code>span</code>, and <code>textarea</code> elements</dt>
<dt><dfn element-attr><code data-x="attr-datafld">datafld</code></dfn> on <code>a</code>, <code>button</code>, <code>div</code>, <code>fieldset</code>, <code>frame</code>, <code>iframe</code>, <code>img</code>, <code>input</code>, <code>label</code>, <code>legend</code>, <code>marquee</code>, <code>object</code>, <code>select</code>, <code>span</code>, and <code>textarea</code> elements</dt>
<dt><dfn element-attr><code data-x="attr-dataformatas">dataformatas</code></dfn> on <code>button</code>, <code>div</code>, <code>input</code>, <code>label</code>, <code>legend</code>, <code>marquee</code>, <code>object</code>, <code>option</code>, <code>select</code>, <code>span</code>, and <code>table</code> elements</dt>
<dd><p>Use script and a mechanism such as <code>XMLHttpRequest</code> to populate the page dynamically. <ref spec=XHR></p></dd>

Expand Down Expand Up @@ -121395,19 +121248,28 @@ interface <dfn interface>HTMLFontElement</dfn> : <span>HTMLElement</span> {

<hr>

<pre><code class="idl">partial interface <span id="HTMLParamElement-partial">HTMLParamElement</span> {
<p>The <code>param</code> element must implement the <code>HTMLParamElement</code> interface.</p>

<pre><code class="idl">[Exposed=Window]
interface <dfn interface>HTMLParamElement</dfn> : <span>HTMLElement</span> {
[<span>HTMLConstructor</span>] constructor();

[<span>CEReactions</span>] attribute DOMString <span data-x="dom-param-name">name</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-param-value">value</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-param-type">type</span>;
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-param-valueType">valueType</span>;
};</code></pre>

<p>The <dfn attribute for="HTMLParamElement"><code data-x="dom-param-type">type</code></dfn> IDL
attribute of the <code>param</code> element must <span>reflect</span> the content attribute of the
same name.</p>
<p>The <dfn attribute for="HTMLParamElement"><code data-x="dom-param-name">name</code></dfn>,
<dfn attribute for="HTMLParamElement"><code data-x="dom-param-value">value</code></dfn>, and <dfn
attribute for="HTMLParamElement"><code data-x="dom-param-type">type</code></dfn> IDL attributes
of the <code>param</code> element must <span>reflect</span> the respective content attributes of
the same name.</p>

<p>The <dfn attribute for="HTMLParamElement"><code
data-x="dom-param-valueType">valueType</code></dfn> IDL attribute of the <code>param</code>
element must <span>reflect</span> the element's <code
data-x="attr-param-valuetype">valuetype</code> content attribute.</p>
element must <span>reflect</span> the element's <code data-x="">valuetype</code> content
attribute.</p>

<hr>

Expand Down Expand Up @@ -123262,8 +123124,7 @@ interface <dfn interface>External</dfn> {
<span data-x="Form-associated element">form-associated</span>;
<span data-x="Palpable content">palpable</span></td>
<td><span data-x="Phrasing content">phrasing</span></td>
<td><code>param</code>*;
<span>transparent</span></td>
<td><span>transparent</span></td>
<td><span data-x="global attributes">globals</span>;
<code data-x="attr-object-data">data</code>;
<code data-x="attr-object-type">type</code>;
Expand Down Expand Up @@ -123348,18 +123209,6 @@ interface <dfn interface>External</dfn> {
<td><code>HTMLParagraphElement</code></td>
</tr>

<tr>
<th><code>param</code></th>
<td>Parameter for <code>object</code></td>
<td>none</td>
<td><code>object</code></td>
<td>empty</td>
<td><span data-x="global attributes">globals</span>;
<code data-x="attr-param-name">name</code>;
<code data-x="attr-param-value">value</code></td>
<td><code>HTMLParamElement</code></td>
</tr>

<tr>
<th><code>picture</code></th>
<td>Image</td>
Expand Down Expand Up @@ -124962,11 +124811,6 @@ interface <dfn interface>External</dfn> {
<td> <code data-x="attr-meta-name">meta</code>
<td> Metadata name
<td> <a href="#attribute-text">Text</a>*
<tr>
<th> <code data-x="">name</code>
<td> <code data-x="attr-param-name">param</code>
<td> Name of parameter
<td> <a href="#attribute-text">Text</a>
<tr>
<th> <code data-x="">name</code>
<td> <code data-x="attr-slot-name">slot</code>
Expand Down Expand Up @@ -125339,11 +125183,6 @@ interface <dfn interface>External</dfn> {
<code data-x="attr-progress-value">progress</code>
<td> Current value of the element
<td> <span>Valid floating-point number</span>
<tr>
<th> <code data-x="">value</code>
<td> <code data-x="attr-param-value">param</code>
<td> Value of parameter
<td> <a href="#attribute-text">Text</a>
<tr>
<th> <code data-x="">width</code>
<td> <code data-x="attr-canvas-width">canvas</code>;
Expand Down Expand Up @@ -126183,10 +126022,6 @@ interface <dfn interface>External</dfn> {
<td> <code>p</code>
<td> <code>HTMLParagraphElement</code> : <code>HTMLElement</code>

<tr>
<td> <code>param</code>
<td> <code>HTMLParamElement</code> : <code>HTMLElement</code>

<tr>
<td> <code>picture</code>
<td> <code>HTMLPictureElement</code> : <code>HTMLElement</code>
Expand Down

0 comments on commit 57a190d

Please sign in to comment.