From 04a11f278dfafd395a497172face6b5dba082d2c Mon Sep 17 00:00:00 2001 From: Domenic Denicola Date: Thu, 21 Apr 2022 12:37:56 -0400 Subject: [PATCH] Obsolete the element 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 , even when that 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 . Closes #387. Helps with #6003. --- source | 239 ++++++++------------------------------------------------- 1 file changed, 34 insertions(+), 205 deletions(-) diff --git a/source b/source index 7f603c12df1..ef715768988 100644 --- a/source +++ b/source @@ -32551,29 +32551,6 @@ interface HTMLEmbedElement : HTMLElement { -
- -

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

- -
<embed src="catgame.swf">
- -

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.

- -

To pass the plugin a parameter "quality" with the value "high", an attribute can be - specified:

- -
<embed src="catgame.swf" quality="high">
- -

This would be equivalent to the following, when using an object element - instead:

- -
<object data="catgame.swf">
- <param name="quality" value="high">
-</object>
- -
- @@ -32590,7 +32567,7 @@ interface HTMLEmbedElement : HTMLElement {
Contexts in which this element can be used:
Where embedded content is expected.
Content model:
-
Zero or more param elements, then, transparent.
+
Transparent.
Content attributes:
Global attributes
data
@@ -32641,8 +32618,8 @@ interface HTMLObjectElement : HTMLElement { type of the resource, will either be treated as an image, as a child browsing context, or as an external resource to be processed by a plugin.

-

The data attribute, - if present, specifies the URL of the resource. If present, the attribute must be a +

The data attribute + specifies the URL of the resource. It must be present, and must contain a valid non-empty URL potentially surrounded by spaces.

Authors should avoid referencing untrusted resources, as such a resource can be @@ -32655,12 +32632,6 @@ interface HTMLObjectElement : HTMLElement { if present, specifies the type of the resource. If present, the attribute must be a valid MIME type string.

-

At least one of either the data attribute or the type attribute must be present.

- -

If the itemprop attribute is specified on an object - element, then the data attribute must also be specified.

-

The name attribute, if present, must be a valid browsing context name. The given value is used to name the element's nested browsing context, if applicable, and if present when the @@ -33119,19 +33090,16 @@ interface HTMLObjectElement : HTMLElement { named load at the element.

  • Fallback: The object element represents the element's - children, ignoring any leading param element children. This is the element's - fallback content. If the element has an instantiated plugin, then - unload it. If the element's nested browsing context is non-null, then it must be - discarded and then set to null.

  • + children. This is the element's fallback content. If the element has an + instantiated plugin, then unload it. If the element's nested browsing + context is non-null, then it must be discarded and then set to null.

    When the algorithm above instantiates a plugin, the user agent should pass to the plugin 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 parameters given by - param elements that are children of the object element, in tree - order. If the plugin supports a scriptable interface, the + being ordered in source order. If the plugin supports a scriptable interface, the HTMLObjectElement object representing the element should expose that interface. The object element represents the plugin. The plugin is not a nested browsing context.

    @@ -33198,124 +33166,6 @@ interface HTMLObjectElement : HTMLElement { -
    - -

    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 video element to show the video for those using user agents that support - video, and finally providing a link to the video for those who have neither Flash - nor a video-capable browser.

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

    The param element

    - -
    -
    Categories:
    -
    None.
    -
    Contexts in which this element can be used:
    -
    As a child of an object element, before any flow content.
    -
    Content model:
    -
    Nothing.
    -
    Content attributes:
    -
    Global attributes
    -
    name
    -
    value
    -
    Accessibility considerations:
    -
    For authors.
    -
    For implementers.
    -
    DOM interface:
    -
    -
    [Exposed=Window]
    -interface HTMLParamElement : HTMLElement {
    -  [HTMLConstructor] constructor();
    -
    -  [CEReactions] attribute DOMString name;
    -  [CEReactions] attribute DOMString value;
    -
    -  // also has obsolete members
    -};
    -
    -
    Uses HTMLParamElement.
    -
    - -

    The param element defines parameters for plugins invoked by object - elements. It does not represent anything on its own.

    - -

    The name attribute - gives the name of the parameter.

    - -

    The value attribute - gives the value of the parameter.

    - -

    Both attributes must be present. They may have any value.

    - -
    - -

    If both attributes are present, and if the parent element of the param is an - object element, then the element defines a parameter with the given name-value pair.

    - -

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

    - -

    The IDL attributes name and value must both reflect the respective content - attributes of the same name.

    - -
    - -
    - -

    The following example shows how the param element can be used to pass a parameter - to a plugin, in this case the O3D plugin.

    - -
    <!DOCTYPE HTML>
    -<html lang="en">
    -  <head>
    -   <title>O3D Utah Teapot</title>
    -  </head>
    -  <body>
    -   <p>
    -    <object type="application/vnd.o3d.auto">
    -     <param name="o3d_features" value="FloatingPointTextures">
    -     <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.">
    -     <p>To see the teapot actually rendered by O3D on your
    -     computer, please download and install the <a
    -     href="http://code.google.com/apis/o3d/docs/gettingstarted.html#install">O3D plugin</a>.</p>
    -    </object>
    -    <script src="o3d-teapot.js"></script>
    -   </p>
    -  </body>
    -</html>
    - -
    -

    The video element

    @@ -106334,9 +106184,9 @@ dictionary StorageEventInit : EventInit {
    area, base, br, col, embed, hr, img, input, link, meta, - param, source, track, wbr
    + source, track, wbr + bgsound, frame, param, keygen -->
    The template element
    template
    @@ -117193,8 +117043,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 stack of open elements.

    -

    This is used, e.g. by the object element to avoid instantiating plugins - before the param element children have been parsed.

    +

    This is used by various elements to only start certain processes once they are + popped off of the stack of open elements.

    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 @@ -120646,6 +120496,10 @@ if (s = prompt('What is your name?')) {

    noembed

    Use object instead of embed when fallback is necessary.

    +
    param
    +

    Use the data attribute of the object element to set the + URL of the external resource.

    +
    plaintext

    Use the "text/plain" MIME type instead.

    @@ -120799,8 +120653,7 @@ if (s = prompt('What is your name?')) {
    codetype on object elements

    Use the data and type attributes to invoke plugins. To set parameters with these names - in particular, the param element can be used.

    + data-x="plugin">plugins.

    declare on object elements

    Repeat the object element completely each time the resource is to be reused.

    @@ -120811,12 +120664,6 @@ if (s = prompt('What is your name?')) {
    typemustmatch on object elements

    Avoid using object elements with untrusted resources.

    -
    type on param elements
    -
    valuetype on param elements
    -

    Use the name and value attributes without declaring - value types.

    -
    language on script elements (except as noted in the previous section)

    Omit the attribute for JavaScript; for data blocks, use the type attribute instead.

    @@ -120846,7 +120693,7 @@ if (s = prompt('What is your name?')) {

    Use th elements for heading cells.

    datasrc on a, button, div, frame, iframe, img, input, label, legend, marquee, object, option, select, span, table, and textarea elements
    -
    datafld on a, button, div, fieldset, frame, iframe, img, input, label, legend, marquee, object, param, select, span, and textarea elements
    +
    datafld on a, button, div, fieldset, frame, iframe, img, input, label, legend, marquee, object, select, span, and textarea elements
    dataformatas on button, div, input, label, legend, marquee, object, option, select, span, and table elements

    Use script and a mechanism such as XMLHttpRequest to populate the page dynamically.

    @@ -121766,19 +121613,28 @@ interface HTMLFontElement : HTMLElement {
    -
    partial interface HTMLParamElement {
    +  

    The param element must implement the HTMLParamElement interface.

    + +
    [Exposed=Window]
    +interface HTMLParamElement : HTMLElement {
    +  [HTMLConstructor] constructor();
    +
    +  [CEReactions] attribute DOMString name;
    +  [CEReactions] attribute DOMString value;
       [CEReactions] attribute DOMString type;
       [CEReactions] attribute DOMString valueType;
     };
    -

    The type IDL - attribute of the param element must reflect the content attribute of the - same name.

    +

    The name, + value, and type IDL attributes + of the param element must reflect the respective content attributes of + the same name.

    The valueType IDL attribute of the param - element must reflect the element's valuetype content attribute.

    + element must reflect the element's valuetype content + attribute.


    @@ -123633,8 +123489,7 @@ interface External { form-associated; palpable phrasing - param*; - transparent + transparent globals; data; type; @@ -123719,18 +123574,6 @@ interface External { HTMLParagraphElement - - param - Parameter for object - none - object - empty - globals; - name; - value - HTMLParamElement - - picture Image @@ -125333,11 +125176,6 @@ interface External { meta Metadata name Text* - - name - param - Name of parameter - Text name slot @@ -125710,11 +125548,6 @@ interface External { progress Current value of the element Valid floating-point number - - value - param - Value of parameter - Text width canvas; @@ -126554,10 +126387,6 @@ interface External { p HTMLParagraphElement : HTMLElement - - param - HTMLParamElement : HTMLElement - picture HTMLPictureElement : HTMLElement