Skip to content

Commit

Permalink
[c] (0) Support <embed> with no src=''.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@1929 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jul 24, 2008
1 parent 4d4e359 commit faccc77
Show file tree
Hide file tree
Showing 2 changed files with 117 additions and 69 deletions.
93 changes: 59 additions & 34 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -16499,14 +16499,29 @@ the time Marco had stuck his tongue out...&lt;/p></pre>
interactive content.

<p>The <dfn id=src3 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 <a href="#valid">valid URL</a>.
gives the address of the resource being embedded. The attribute, if
present, must contain a <a href="#valid">valid URL</a>.

<p>If the <code title=attr-embed-src><a href="#src3">src</a></code>
attribute is missing, then the <code><a href="#embed">embed</a></code>
element must be ignored (it represents nothing).
<p>The <dfn id=type4 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><a href="#type4">type</a></code> attribute
and the <code title=attr-embed-src><a href="#src3">src</a></code>
attribute are present, then the <code title=attr-embed-type><a
href="#type4">type</a></code> attribute must specify the same type as the
<a href="#content-type5" title=Content-Type>explicit Content-Type
metadata</a> of the resource given by the <code title=attr-embed-src><a
href="#src3">src</a></code> attribute. <a
href="#refsRFC2046">[RFC2046]</a>

<p>When the element is created with neither a <code title=attr-embed-src><a
href="#src3">src</a></code> attribute nor a <code title=attr-embed-type><a
href="#type4">type</a></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><a
href="#embed">embed</a></code> element represents nothing.

<p id=sandboxPluginEmbed>If the <a href="#sandboxed0">sandboxed plugins
<p id=sandboxPluginEmbed>When the <a href="#sandboxed0">sandboxed plugins
browsing context flag</a> is set on the <a href="#browsing1">browsing
context</a> for which the <code><a href="#embed">embed</a></code>
element's document is the <a href="#active">active document</a>, then the
Expand All @@ -16527,36 +16542,20 @@ the time Marco had stuck his tongue out...&lt;/p></pre>
<p>When the element is created with a <code title=attr-embed-src><a
href="#src3">src</a></code> attribute, and whenever the <code
title=attr-embed-src><a href="#src3">src</a></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 <a
href="#plugin">plugin</a> it based on the <a href="#type-of"
subsequently set, and whenever the <code title=attr-embed-type><a
href="#type4">type</a></code> attribute is set or removed while the
element has a <code title=attr-embed-src><a href="#src3">src</a></code>
attribute, if the element is not in a sandboxed browsing context, user
agents should fetch the specified resource, find and instantiate an
appropriate <a href="#plugin">plugin</a> based on the <a href="#type-of"
title=concept-embed-type>content's type</a>, and hand that <a
href="#plugin">plugin</a> the content of the resource. <!-- Note that this
href="#plugin">plugin</a> the content of the resource, replacing any
previously instantiated plugin for the element. <!-- Note that this
doesn't happen when the base URL changes. -->
If the <a href="#plugin">plugin</a> supports a scriptable interface, the
<code><a href="#htmlembedelement">HTMLEmbedElement</a></code> object
representing the element should expose that interfaces.

<p>Fetching the resource must <a href="#delays">delay the <code
title=event-load>load</code> event</a>.

<p>Any (namespace-less) attribute may be specified on the <code><a
href="#embed">embed</a></code> element, so long as its name is <a
href="#xml-compatible">XML-compatible</a>.

<p>The user agent should pass the names and values of all the attributes of
the <code><a href="#embed">embed</a></code> element that have no namespace
to the <a href="#plugin">plugin</a> used.

<p>The <dfn id=type4 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 <a
href="#content-type5" title=Content-Type>explicit Content-Type
metadata</a> of the resource given by the <code title=attr-embed-src><a
href="#src3">src</a></code> attribute. <a
href="#refsRFC2046">[RFC2046]</a>

<p>The <dfn id=type-of title=concept-embed-type>type of the content</dfn>
being embedded is defined as follows:

Expand Down Expand Up @@ -16602,11 +16601,37 @@ the time Marco had stuck his tongue out...&lt;/p></pre>
error responses (e.g. HTTP 500 Internal Server Error codes can still
contain plugin data).

<p>When the element is created with a <code title=attr-embed-type><a
href="#type4">type</a></code> attribute and no <code
title=attr-embed-src><a href="#src3">src</a></code> attribute, and
whenever the <code title=attr-embed-type><a href="#type4">type</a></code>
attribute is subsequently set, so long as no <code title=attr-embed-src><a
href="#src3">src</a></code> attribute is set, and whenever the <code
title=attr-embed-src><a href="#src3">src</a></code> attribute is removed
when the element has a <code title=attr-embed-type><a
href="#type4">type</a></code> attribute, if the element is not in a
sandboxed browsing context, user agents should find and instantiate an
appropriate <a href="#plugin">plugin</a> based on the value of the <code
title=attr-embed-type><a href="#type4">type</a></code> attribute.

<p>Any (namespace-less) attribute may be specified on the <code><a
href="#embed">embed</a></code> element, so long as its name is <a
href="#xml-compatible">XML-compatible</a>.

<p>The user agent should pass the names and values of all the attributes of
the <code><a href="#embed">embed</a></code> element that have no namespace
to the <a href="#plugin">plugin</a> used, when it is instantiated.

<p>If the <a href="#plugin">plugin</a> instantiated for the <code><a
href="#embed">embed</a></code> element supports a scriptable interface,
the <code><a href="#htmlembedelement">HTMLEmbedElement</a></code> object
representing the element should expose that interface while the element is
instantiated.

<p>The <code><a href="#embed">embed</a></code> element has no <a
href="#fallback">fallback content</a>. 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.)
href="#fallback">fallback content</a>. 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>The <code><a href="#embed">embed</a></code> element supports <a
href="#dimension0">dimension attributes</a>.
Expand Down
93 changes: 58 additions & 35 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -14125,14 +14125,28 @@ the time Marco had stuck his tongue out...&lt;/p></pre>
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
Expand All @@ -14153,36 +14167,21 @@ the time Marco had stuck his tongue out...&lt;/p></pre>

<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>

Expand Down Expand Up @@ -14230,11 +14229,35 @@ the time Marco had stuck his tongue out...&lt;/p></pre>
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>
Expand Down

0 comments on commit faccc77

Please sign in to comment.