Skip to content

Commit

Permalink
Expunge “HTMLObjectElement: typeMustMatch”
Browse files Browse the repository at this point in the history
This change deletes the Web/API/HTMLObjectElement/typeMustMatch
article, as well a expunging all references to it from other articles.
The change also drops all mentions of the corresponding “typemustmatch”
markup attribute for “object” elements.

The history of typeMustMatch/typemustmatch is that it was added to the
spec in 2011 in whatwg/html@4030e71 but never
got implemented across browsers and never got adopted by web developers.
So whatwg/html#4590 dropped it from the spec in
2019, and it's now just a footnote in the “Non-conforming features” section
at https://html.spec.whatwg.org/obsolete.html#attr-object-typemustmatch

So there's statistically near-zero content on the web that’s using
typeMustMatch/typemustmatch, and there’s no value to continue
documenting it in MDN.
  • Loading branch information
sideshowbarker committed Mar 30, 2021
1 parent 11c96e4 commit 40d5501
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 97 deletions.
6 changes: 5 additions & 1 deletion files/en-us/_redirects.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# DO NOT EDIT THIS FILE MANUALLY.
# Use the CLI instead:
#
# yarn content add-redirect <fromURL> <toURL>
#
# FROM-URL TO-URL
/en-US/docs/-moz-locale-dir(ltr) /en-US/docs/Web/CSS/:-moz-locale-dir(ltr)
/en-US/docs/-moz-locale-dir(rtl) /en-US/docs/Web/CSS/:-moz-locale-dir(rtl)
Expand Down Expand Up @@ -7941,7 +7946,6 @@
/en-US/docs/Web/API/HTMLLinkElement.relList /en-US/docs/Web/API/HTMLLinkElement/relList
/en-US/docs/Web/API/HTMLMediaElement/Web_audio:_ended_event /en-US/docs/Web/API/AudioScheduledSourceNode/ended_event
/en-US/docs/Web/API/HTMLMediaElement/mcs_ended_event /en-US/docs/Web/API/MediaStreamTrack/ended_event
/en-US/docs/Web/API/HTMLObjectElement.typeMustMatch /en-US/docs/Web/API/HTMLObjectElement/typeMustMatch
/en-US/docs/Web/API/HTMLObjectElement/tabIndex /en-US/docs/Web/API/HTMLObjectElement/type
/en-US/docs/Web/API/HTMLOptionElement.Option /en-US/docs/Web/API/HTMLOptionElement/Option
/en-US/docs/Web/API/HTMLOrSVGElement /en-US/docs/Web/API/HTMLOrForeignElement
Expand Down
11 changes: 0 additions & 11 deletions files/en-us/_wikihistory.json
Original file line number Diff line number Diff line change
Expand Up @@ -57188,17 +57188,6 @@
"jpmedley"
]
},
"Web/API/HTMLObjectElement/typeMustMatch": {
"modified": "2020-10-15T21:29:52.384Z",
"contributors": [
"sideshowbarker",
"jpmedley",
"mfluehr",
"connorshea",
"fscholz",
"teoli"
]
},
"Web/API/HTMLObjectElement/useMap": {
"modified": "2020-10-15T22:17:32.888Z",
"contributors": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,6 @@ <h2 id="The_&lt;embed&gt;_and_&lt;object&gt;_elements">The &lt;embed&gt; and &lt
</tbody>
</table>

<div class="note">
<p><strong>Note</strong>: <code>&lt;object&gt;</code> requires a <code>data</code> attribute, a <code>type</code> attribute, or both. If you use both, you may also use the {{htmlattrxref('typemustmatch','object')}} attribute (only implemented in Firefox and Chrome, as of this writing). <code>typemustmatch</code> keeps the embedded file from running unless the <code>type</code> attribute provides the correct media type. <code>typemustmatch</code> can therefore confer significant security benefits when you're embedding content from a different {{glossary("origin")}} (it can keep attackers from running arbitrary scripts through the plugin).</p>
</div>

<p>Here's an example that uses the {{htmlelement("embed")}} element to embed a Flash movie (see this <a href="https://mdn.github.io/learning-area/html/multimedia-and-embedding/other-embedding-technologies/embed-flash.html">live on GitHub</a>, and <a href="https://github.com/mdn/learning-area/blob/gh-pages/html/multimedia-and-embedding/other-embedding-technologies/embed-flash.html">check the source code</a> too):</p>

<pre class="brush: html">&lt;embed src="whoosh.swf" quality="medium"
Expand All @@ -347,7 +343,7 @@ <h2 id="The_&lt;embed&gt;_and_&lt;object&gt;_elements">The &lt;embed&gt; and &lt
<p>Now let's look at an <code>&lt;object&gt;</code> example that embeds a PDF into a page (see the <a href="https://mdn.github.io/learning-area/html/multimedia-and-embedding/other-embedding-technologies/object-pdf.html">live example</a> and the <a href="https://github.com/mdn/learning-area/blob/gh-pages/html/multimedia-and-embedding/other-embedding-technologies/object-pdf.html">source code</a>):</p>

<pre class="brush: html">&lt;object data="mypdf.pdf" type="application/pdf"
width="800" height="1200" typemustmatch&gt;
width="800" height="1200"&gt;
&lt;p&gt;You don't have a PDF plugin, but you can
  &lt;a href="mypdf.pdf"&gt;download the PDF file.
  &lt;/a&gt;
Expand Down
11 changes: 0 additions & 11 deletions files/en-us/web/api/htmlobjectelement/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ <h2 id="Properties">Properties</h2>
<dd>Is a <code>long</code> representing the position of the element in the tabbing navigation order for the current document.</dd>
<dt>{{domxref("HTMLObjectElement.type")}}</dt>
<dd>Is a {{domxref("DOMString")}} that reflects the {{htmlattrxref("type", "object")}} HTML attribute, specifying the MIME type of the resource.</dd>
<dt>{{domxref("HTMLObjectElement.typeMustMatch")}}</dt>
<dd>Is a {{jsxref("Boolean")}} that reflects the {{htmlattrxref("typeMustMatch", "object")}} HTML attribute, indicating if the resource specified by {{htmlattrxref("data", "object")}} must only be played if it matches the {{htmlattrxref("type", "object")}} attribute.</dd>
<dt>{{domxref("HTMLObjectElement.useMap")}}</dt>
<dd>Is a {{domxref("DOMString")}} that reflects the {{htmlattrxref("usemap", "object")}} HTML attribute, specifying a {{HTMLElement("map")}} element to use.</dd>
<dt>{{domxref("HTMLObjectElement.validationMessage")}} {{readonlyInline}}</dt>
Expand Down Expand Up @@ -95,15 +93,6 @@ <h2 id="Specifications">Specifications</h2>
<td>{{Spec2('HTML WHATWG')}}</td>
<td></td>
</tr>
<tr>
<td>{{SpecName('HTML5 W3C', "embedded-content-0.html#the-object-element", "HTMLObjectElement")}}</td>
<td>{{Spec2('HTML5 W3C')}}</td>
<td>The W3C specification is a latest of a previous version of {{SpecName("HTML WHATWG")}}<br>
Technically, the property <code>tabindex</code> is now defined on {{domxref("HTMLElement")}}.<br>
The following properties are now obsolete: <code>align</code>, <code>archive</code>, <code>border</code>, <code>code</code>, <code>codeBase</code>, <code>codeType</code>, <code>declare</code>, <code>hspace</code>, <code>standby</code>, and <code>vspace</code>.<br>
The following properties have been added: <code>typeMustMatch</code>, <code>contentWindow</code>, <code>willValidate</code>, <code>validity</code>, and <code>validationMessage</code>.<br>
The following methods have been added: <code>checkValidity()</code> and <code>setCustomValidity()</code>.</td>
</tr>
<tr>
<td>{{SpecName('DOM2 HTML', 'html.html#ID-9893177', 'HTMLObjectElement')}}</td>
<td>{{Spec2('DOM2 HTML')}}</td>
Expand Down
67 changes: 0 additions & 67 deletions files/en-us/web/api/htmlobjectelement/typemustmatch/index.html

This file was deleted.

2 changes: 0 additions & 2 deletions files/en-us/web/html/element/object/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ <h2 id="Attributes">Attributes</h2>
<dd>The position of the element in the tabbing navigation order for the current document.</dd>
<dt>{{HTMLAttrDef("type")}}</dt>
<dd>The <a href="/en-US/docs/Glossary/MIME_type">content type</a> of the resource specified by <strong>data</strong>. At least one of <strong>data</strong> and <strong>type</strong> must be defined.</dd>
<dt>{{HTMLAttrDef("typemustmatch")}}</dt>
<dd>This Boolean attribute indicates if the <strong>type</strong> attribute and the actual <a href="/en-US/docs/Glossary/MIME_type">content type</a> of the resource must match to be used.</dd>
<dt>{{HTMLAttrDef("usemap")}}</dt>
<dd>A hash-name reference to a {{HTMLElement("map")}} element; that is a '#' followed by the value of a {{htmlattrxref("name", "map")}} of a map element.</dd>
<dt>{{HTMLAttrDef("width")}}</dt>
Expand Down

0 comments on commit 40d5501

Please sign in to comment.