NOTE: The current preferred location for bug reports is the GitHub issue tracker.
Bug 268 - Support <embed> with no src=''.
Support <embed> with no src=''.
Status: RESOLVED FIXED
Product: Validator.nu
Classification: Unclassified
Component: HTML5 schema
HEAD
All All
: P2 normal
Assigned To: Henri Sivonen
http://svn.whatwg.org/webapps/source?...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-28 13:24 CEST by Henri Sivonen
Modified: 2008-08-14 17:36 CEST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Henri Sivonen 2008-07-28 13:24:42 CEST
Index: source
===================================================================
--- source	(revision 1928)
+++ source	(revision 1929)
@@ -14125,14 +14125,28 @@
   content.</p>
 
   <p>The <dfn title="attr-embed-src"><code>src</code></dfn> attribute
-  gives the address of the resource being embedded. The attribute must
-  be present and contain a <span>valid URL</span>.</p>
+  gives the address of the resource being embedded. The attribute, if
+  present, must contain a <span>valid URL</span>.</p>
 
-  <p>If the <code title="attr-embed-src">src</code> attribute is
-  missing, then the <code>embed</code> element must be ignored (it
-  represents nothing).</p>
+  <p>The <dfn title="attr-embed-type"><code>type</code></dfn>
+  attribute, if present, gives the MIME type of the plugin to
+  instantiate.  The value must be a valid MIME type, optionally with
+  parameters. If both the <code title="attr-embed-type">type</code>
+  attribute and the <code title="attr-embed-src">src</code> attribute
+  are present, then the <code title="attr-embed-type">type</code>
+  attribute must specify the same type as the <span
+  title="Content-Type">explicit Content-Type metadata</span> of the
+  resource given by the <code title="attr-embed-src">src</code>
+  attribute. <a href="#refsRFC2046">[RFC2046]</a></p>
 
-  <p id="sandboxPluginEmbed">If the <span>sandboxed plugins browsing
+  <p>When the element is created with neither a <code
+  title="attr-embed-src">src</code> attribute nor a <code
+  title="attr-embed-type">type</code> attribute, and when attributes
+  are removed such that neither attribute is present on the element
+  anymore, any plugins instantiated for the element must be removed,
+  and the <code>embed</code> element represents nothing.</p>
+
+  <p id="sandboxPluginEmbed">When the <span>sandboxed plugins browsing
   context flag</span> is set on the <span>browsing context</span> for
   which the <code>embed</code> element's document is the <span>active
   document</span>, then the user agent must render the
@@ -14153,36 +14167,21 @@
 
   <p>When the element is created with a <code
   title="attr-embed-src">src</code> attribute, and whenever the <code
-  title="attr-embed-src">src</code> attribute is subsequently set, if
-  the element is not in a sandboxed browsing context, user agents
-  should fetch the specified resource, find an appropriate
-  <span>plugin</span> it based on the <span
+  title="attr-embed-src">src</code> attribute is subsequently set, and
+  whenever the <code title="attr-embed-type">type</code> attribute is
+  set or removed while the element has a <code
+  title="attr-embed-src">src</code> attribute, if the element is not
+  in a sandboxed browsing context, user agents should fetch the
+  specified resource, find and instantiate an appropriate
+  <span>plugin</span> based on the <span
   title="concept-embed-type">content's type</span>, and hand that
-  <span>plugin</span> the content of the resource. <!-- Note that this
-  doesn't happen when the base URL changes. --> If the
-  <span>plugin</span> supports a scriptable interface, the
-  <code>HTMLEmbedElement</code> object representing the element should
-  expose that interfaces.</p>
+  <span>plugin</span> the content of the resource, replacing any
+  previously instantiated plugin for the element. <!-- Note that this
+  doesn't happen when the base URL changes. --></p>
 
   <p>Fetching the resource must <span>delay the <code
   title="event-load">load</code> event</span>.</p>
 
-  <p>Any (namespace-less) attribute may be specified on the
-  <code>embed</code> element, so long as its name is
-  <span>XML-compatible</span>.</p>
-
-  <p>The user agent should pass the names and values of all the
-  attributes of the <code>embed</code> element that have no namespace
-  to the <span>plugin</span> used.</p>
-
-  <p>The <dfn title="attr-embed-type"><code>type</code></dfn>
-  attribute, if present, gives the MIME type of the linked resource.
-  The value must be a valid MIME type, optionally with parameters. If
-  the attribute is present, its value must specify the same type as
-  the <span title="Content-Type">explicit Content-Type metadata</span>
-  of the resource given by the <code title="attr-embed-src">src</code>
-  attribute. <a href="#refsRFC2046">[RFC2046]</a></p>
-
   <p>The <dfn title="concept-embed-type">type of the content</dfn>
   being embedded is defined as follows:</p>
 
@@ -14230,11 +14229,35 @@
   with error responses (e.g. HTTP 500 Internal Server Error codes can
   still contain plugin data).</p>
 
+  <p>When the element is created with a <code
+  title="attr-embed-type">type</code> attribute and no <code
+  title="attr-embed-src">src</code> attribute, and whenever the <code
+  title="attr-embed-type">type</code> attribute is subsequently set,
+  so long as no <code title="attr-embed-src">src</code> attribute is
+  set, and whenever the <code title="attr-embed-src">src</code>
+  attribute is removed when the element has a <code
+  title="attr-embed-type">type</code> attribute, if the element is not
+  in a sandboxed browsing context, user agents should find and
+  instantiate an appropriate <span>plugin</span> based on the value of
+  the <code title="attr-embed-type">type</code> attribute.</p>
+
+  <p>Any (namespace-less) attribute may be specified on the
+  <code>embed</code> element, so long as its name is
+  <span>XML-compatible</span>.</p>
+
+  <p>The user agent should pass the names and values of all the
+  attributes of the <code>embed</code> element that have no namespace
+  to the <span>plugin</span> used, when it is instantiated.</p>
+
+  <p>If the <span>plugin</span> instantiated for the
+  <code>embed</code> element supports a scriptable interface, the
+  <code>HTMLEmbedElement</code> object representing the element should
+  expose that interface while the element is instantiated.</p>
+
   <p>The <code>embed</code> element has no <span>fallback
-  content</span>. If the user agent can't display the specified
-  resource, e.g. because the given type is not supported, then the
-  user agent must use a default plugin for the content. (This default
-  could be as simple as saying "Unsupported Format", of course.)</p>
+  content</span>. If the user agent can't find a suitable plugin, then
+  the user agent must use a default plugin. (This default could be as
+  simple as saying "Unsupported Format".)</p>
 
   <p>The <code>embed</code> element supports <span>dimension
   attributes</span>.</p>