Annotation of html5/spec/the-object-element.html, revision 1.187

1.88      mike        1: <!DOCTYPE html>
1.159     sruby       2: <html lang="en-US-x-Hixie"><head><title>4.8.4 The object element &#8212; HTML5</title><style type="text/css">
1.1       mike        3:    pre { margin-left: 2em; white-space: pre-wrap; }
                      4:    h2 { margin: 3em 0 1em 0; }
                      5:    h3 { margin: 2.5em 0 1em 0; }
                      6:    h4 { margin: 2.5em 0 0.75em 0; }
                      7:    h5, h6 { margin: 2.5em 0 1em; }
                      8:    h1 + h2, h1 + h2 + h2 { margin: 0.75em 0 0.75em; }
                      9:    h2 + h3, h3 + h4, h4 + h5, h5 + h6 { margin-top: 0.5em; }
                     10:    p { margin: 1em 0; }
                     11:    hr:not(.top) { display: block; background: none; border: none; padding: 0; margin: 2em 0; height: auto; }
                     12:    dl, dd { margin-top: 0; margin-bottom: 0; }
                     13:    dt { margin-top: 0.75em; margin-bottom: 0.25em; clear: left; }
                     14:    dt + dt { margin-top: 0; }
                     15:    dd dt { margin-top: 0.25em; margin-bottom: 0; }
                     16:    dd p { margin-top: 0; }
                     17:    dd dl + p { margin-top: 1em; }
                     18:    dd table + p { margin-top: 1em; }
                     19:    p + * > li, dd li { margin: 1em 0; }
                     20:    dt, dfn { font-weight: bold; font-style: normal; }
                     21:    i, em { font-style: italic; }
                     22:    dt dfn { font-style: italic; }
                     23:    pre, code { font-size: inherit; font-family: monospace; font-variant: normal; }
                     24:    pre strong { color: black; font: inherit; font-weight: bold; background: yellow; }
                     25:    pre em { font-weight: bolder; font-style: normal; }
                     26:    @media screen { code { color: orangered; } code :link, code :visited { color: inherit; } }
                     27:    var sub { vertical-align: bottom; font-size: smaller; position: relative; top: 0.1em; }
                     28:    table { border-collapse: collapse; border-style: hidden hidden none hidden; }
                     29:    table thead, table tbody { border-bottom: solid; }
                     30:    table tbody th:first-child { border-left: solid; }
                     31:    table tbody th { text-align: left; }
                     32:    table td, table th { border-left: solid; border-right: solid; border-bottom: solid thin; vertical-align: top; padding: 0.2em; }
                     33:    blockquote { margin: 0 0 0 2em; border: 0; padding: 0; font-style: italic; }
                     34: 
                     35:    .bad, .bad *:not(.XXX) { color: gray; border-color: gray; background: transparent; }
                     36:    .matrix, .matrix td { border: none; text-align: right; }
                     37:    .matrix { margin-left: 2em; }
                     38:    .dice-example { border-collapse: collapse; border-style: hidden solid solid hidden; border-width: thin; margin-left: 3em; }
                     39:    .dice-example caption { width: 30em; font-size: smaller; font-style: italic; padding: 0.75em 0; text-align: left; }
                     40:    .dice-example td, .dice-example th { border: solid thin; width: 1.35em; height: 1.05em; text-align: center; padding: 0; }
                     41: 
                     42:    .toc dfn, h1 dfn, h2 dfn, h3 dfn, h4 dfn, h5 dfn, h6 dfn { font: inherit; }
                     43:    img.extra, p.overview { float: right; }
                     44:    pre.idl { border: solid thin; background: #EEEEEE; color: black; padding: 0.5em 1em; position: relative; }
                     45:    pre.idl :link, pre.idl :visited { color: inherit; background: transparent; }
                     46:    pre.idl::before { content: "IDL"; font: bold small sans-serif; padding: 0.5em; background: white; position: absolute; top: 0; margin: -1px 0 0 -4em; width: 1.5em; border: thin solid; border-radius: 0 0 0 0.5em }
                     47:    pre.css { border: solid thin; background: #FFFFEE; color: black; padding: 0.5em 1em; }
                     48:    pre.css:first-line { color: #AAAA50; }
                     49:    dl.domintro { color: green; margin: 2em 0 2em 2em; padding: 0.5em 1em; border: none; background: #DDFFDD; }
                     50:    hr + dl.domintro, div.impl + dl.domintro { margin-top: 2.5em; margin-bottom: 1.5em; }
                     51:    dl.domintro dt, dl.domintro dt * { color: black; text-decoration: none; }
                     52:    dl.domintro dd { margin: 0.5em 0 1em 2em; padding: 0; }
                     53:    dl.domintro dd p { margin: 0.5em 0; }
                     54:    dl.domintro:before { display: table; margin: -1em -0.5em -0.5em auto; width: auto; content: 'This box is non-normative. Implementation requirements are given below this box.'; color: black; font-style: italic; border: solid 2px; background: white; padding: 0 0.25em; }
                     55:    dl.switch { padding-left: 2em; }
                     56:    dl.switch > dt { text-indent: -1.5em; }
                     57:    dl.switch > dt:before { content: '\21AA'; padding: 0 0.5em 0 0; display: inline-block; width: 1em; text-align: right; line-height: 0.5em; }
                     58:    dl.triple { padding: 0 0 0 1em; }
                     59:    dl.triple dt, dl.triple dd { margin: 0; display: inline }
                     60:    dl.triple dt:after { content: ':'; }
                     61:    dl.triple dd:after { content: '\A'; white-space: pre; }
                     62:    .diff-old { text-decoration: line-through; color: silver; background: transparent; }
                     63:    .diff-chg, .diff-new { text-decoration: underline; color: green; background: transparent; }
                     64:    a .diff-new { border-bottom: 1px blue solid; }
                     65: 
1.181     sruby      66:    figure.diagrams { border: double black; background: white; padding: 1em; }
                     67:    figure.diagrams img { display: block; margin: 1em auto; } 
                     68: 
1.1       mike       69:    h2 { page-break-before: always; }
                     70:    h1, h2, h3, h4, h5, h6 { page-break-after: avoid; }
                     71:    h1 + h2, hr + h2.no-toc { page-break-before: auto; }
                     72: 
                     73:    p  > span:not([title=""]):not([class="XXX"]):not([class="impl"]):not([class="note"]),
                     74:    li > span:not([title=""]):not([class="XXX"]):not([class="impl"]):not([class="note"]), { border-bottom: solid #9999CC; }
                     75: 
                     76:    div.head { margin: 0 0 1em; padding: 1em 0 0 0; }
                     77:    div.head p { margin: 0; }
                     78:    div.head h1 { margin: 0; }
                     79:    div.head .logo { float: right; margin: 0 1em; }
                     80:    div.head .logo img { border: none } /* remove border from top image */
                     81:    div.head dl { margin: 1em 0; }
                     82:    div.head p.copyright, div.head p.alt { font-size: x-small; font-style: oblique; margin: 0; }
                     83: 
                     84:    body > .toc > li { margin-top: 1em; margin-bottom: 1em; }
                     85:    body > .toc.brief > li { margin-top: 0.35em; margin-bottom: 0.35em; }
                     86:    body > .toc > li > * { margin-bottom: 0.5em; }
                     87:    body > .toc > li > * > li > * { margin-bottom: 0.25em; }
                     88:    .toc, .toc li { list-style: none; }
                     89: 
                     90:    .brief { margin-top: 1em; margin-bottom: 1em; line-height: 1.1; }
                     91:    .brief li { margin: 0; padding: 0; }
                     92:    .brief li p { margin: 0; padding: 0; }
                     93: 
                     94:    .category-list { margin-top: -0.75em; margin-bottom: 1em; line-height: 1.5; }
                     95:    .category-list::before { content: '\21D2\A0'; font-size: 1.2em; font-weight: 900; }
                     96:    .category-list li { display: inline; }
                     97:    .category-list li:not(:last-child)::after { content: ', '; }
                     98:    .category-list li > span, .category-list li > a { text-transform: lowercase; }
                     99:    .category-list li * { text-transform: none; } /* don't affect <code> nested in <a> */
                    100: 
                    101:    .XXX { color: #E50000; background: white; border: solid red; padding: 0.5em; margin: 1em 0; }
                    102:    .XXX > :first-child { margin-top: 0; }
                    103:    p .XXX { line-height: 3em; }
                    104:    .annotation { border: solid thin black; background: #0C479D; color: white; position: relative; margin: 8px 0 20px 0; }
                    105:    .annotation:before { position: absolute; left: 0; top: 0; width: 100%; height: 100%; margin: 6px -6px -6px 6px; background: #333333; z-index: -1; content: ''; }
                    106:    .annotation :link, .annotation :visited { color: inherit; }
                    107:    .annotation :link:hover, .annotation :visited:hover { background: transparent; }
                    108:    .annotation span { border: none ! important; }
                    109:    .note { color: green; background: transparent; font-family: sans-serif; }
                    110:    .warning { color: red; background: transparent; }
                    111:    .note, .warning { font-weight: bolder; font-style: italic; }
                    112:    .note em, .warning em, .note i, .warning i { font-style: normal; }
                    113:    p.note, div.note { padding: 0.5em 2em; }
                    114:    span.note { padding: 0 2em; }
                    115:    .note p:first-child, .warning p:first-child { margin-top: 0; }
                    116:    .note p:last-child, .warning p:last-child { margin-bottom: 0; }
                    117:    .warning:before { font-style: normal; }
                    118:    p.note:before { content: 'Note: '; }
                    119:    p.warning:before { content: '\26A0 Warning! '; }
                    120: 
                    121:    .bookkeeping:before { display: block; content: 'Bookkeeping details'; font-weight: bolder; font-style: italic; }
                    122:    .bookkeeping { font-size: 0.8em; margin: 2em 0; }
                    123:    .bookkeeping p { margin: 0.5em 2em; display: list-item; list-style: square; }
                    124:    .bookkeeping dt { margin: 0.5em 2em 0; }
                    125:    .bookkeeping dd { margin: 0 3em 0.5em; }
                    126: 
                    127:    h4 { position: relative; z-index: 3; }
                    128:    h4 + .element, h4 + div + .element { margin-top: -2.5em; padding-top: 2em; }
                    129:    .element {
                    130:      background: #EEEEFF;
                    131:      color: black;
                    132:      margin: 0 0 1em 0.15em;
                    133:      padding: 0 1em 0.25em 0.75em;
                    134:      border-left: solid #9999FF 0.25em;
                    135:      position: relative;
                    136:      z-index: 1;
                    137:    }
                    138:    .element:before {
                    139:      position: absolute;
                    140:      z-index: 2;
                    141:      top: 0;
                    142:      left: -1.15em;
                    143:      height: 2em;
                    144:      width: 0.9em;
                    145:      background: #EEEEFF;
                    146:      content: ' ';
                    147:      border-style: none none solid solid;
                    148:      border-color: #9999FF;
                    149:      border-width: 0.25em;
                    150:    }
                    151: 
                    152:    .example { display: block; color: #222222; background: #FCFCFC; border-left: double; margin-left: 2em; padding-left: 1em; }
                    153:    td > .example:only-child { margin: 0 0 0 0.1em; }
                    154: 
                    155:    ul.domTree, ul.domTree ul { padding: 0 0 0 1em; margin: 0; }
                    156:    ul.domTree li { padding: 0; margin: 0; list-style: none; position: relative; }
                    157:    ul.domTree li li { list-style: none; }
                    158:    ul.domTree li:first-child::before { position: absolute; top: 0; height: 0.6em; left: -0.75em; width: 0.5em; border-style: none none solid solid; content: ''; border-width: 0.1em; }
                    159:    ul.domTree li:not(:last-child)::after { position: absolute; top: 0; bottom: -0.6em; left: -0.75em; width: 0.5em; border-style: none none solid solid; content: ''; border-width: 0.1em; }
                    160:    ul.domTree span { font-style: italic; font-family: serif; }
                    161:    ul.domTree .t1 code { color: purple; font-weight: bold; }
                    162:    ul.domTree .t2 { font-style: normal; font-family: monospace; }
                    163:    ul.domTree .t2 .name { color: black; font-weight: bold; }
                    164:    ul.domTree .t2 .value { color: blue; font-weight: normal; }
                    165:    ul.domTree .t3 code, .domTree .t4 code, .domTree .t5 code { color: gray; }
                    166:    ul.domTree .t7 code, .domTree .t8 code { color: green; }
                    167:    ul.domTree .t10 code { color: teal; }
                    168: 
                    169:    body.dfnEnabled dfn { cursor: pointer; }
                    170:    .dfnPanel {
                    171:      display: inline;
                    172:      position: absolute;
                    173:      z-index: 10;
                    174:      height: auto;
                    175:      width: auto;
                    176:      padding: 0.5em 0.75em;
                    177:      font: small sans-serif, Droid Sans Fallback;
                    178:      background: #DDDDDD;
                    179:      color: black;
                    180:      border: outset 0.2em;
                    181:    }
                    182:    .dfnPanel * { margin: 0; padding: 0; font: inherit; text-indent: 0; }
                    183:    .dfnPanel :link, .dfnPanel :visited { color: black; }
                    184:    .dfnPanel p { font-weight: bolder; }
                    185:    .dfnPanel * + p { margin-top: 0.25em; }
                    186:    .dfnPanel li { list-style-position: inside; }
                    187: 
                    188:    #configUI { position: absolute; z-index: 20; top: 10em; right: 1em; width: 11em; font-size: small; }
                    189:    #configUI p { margin: 0.5em 0; padding: 0.3em; background: #EEEEEE; color: black; border: inset thin; }
                    190:    #configUI p label { display: block; }
                    191:    #configUI #updateUI, #configUI .loginUI { text-align: center; }
                    192:    #configUI input[type=button] { display: block; margin: auto; }
                    193: 
                    194:    fieldset { margin: 1em; padding: 0.5em 1em; }
                    195:    fieldset > legend + * { margin-top: 0; }
                    196:    fieldset > :last-child { margin-bottom: 0; }
                    197:    fieldset p { margin: 0.5em 0; }
                    198: 
1.159     sruby     199:   </style><link href="http://www.w3.org/StyleSheets/TR/W3C-ED" rel="stylesheet" type="text/css"><style type="text/css">
1.1       mike      200: 
                    201:    .applies thead th > * { display: block; }
                    202:    .applies thead code { display: block; }
                    203:    .applies tbody th { whitespace: nowrap; }
                    204:    .applies td { text-align: center; }
                    205:    .applies .yes { background: yellow; }
                    206: 
                    207:    .matrix, .matrix td { border: hidden; text-align: right; }
                    208:    .matrix { margin-left: 2em; }
                    209: 
                    210:    .dice-example { border-collapse: collapse; border-style: hidden solid solid hidden; border-width: thin; margin-left: 3em; }
                    211:    .dice-example caption { width: 30em; font-size: smaller; font-style: italic; padding: 0.75em 0; text-align: left; }
                    212:    .dice-example td, .dice-example th { border: solid thin; width: 1.35em; height: 1.05em; text-align: center; padding: 0; }
                    213: 
                    214:    td.eg { border-width: thin; text-align: center; }
                    215: 
                    216:    #table-example-1 { border: solid thin; border-collapse: collapse; margin-left: 3em; }
                    217:    #table-example-1 * { font-family: "Essays1743", serif; line-height: 1.01em; }
                    218:    #table-example-1 caption { padding-bottom: 0.5em; }
                    219:    #table-example-1 thead, #table-example-1 tbody { border: none; }
                    220:    #table-example-1 th, #table-example-1 td { border: solid thin; }
                    221:    #table-example-1 th { font-weight: normal; }
                    222:    #table-example-1 td { border-style: none solid; vertical-align: top; }
                    223:    #table-example-1 th { padding: 0.5em; vertical-align: middle; text-align: center; }
                    224:    #table-example-1 tbody tr:first-child td { padding-top: 0.5em; }
                    225:    #table-example-1 tbody tr:last-child td { padding-bottom: 1.5em; }
                    226:    #table-example-1 tbody td:first-child { padding-left: 2.5em; padding-right: 0; width: 9em; }
                    227:    #table-example-1 tbody td:first-child::after { content: leader(". "); }
                    228:    #table-example-1 tbody td { padding-left: 2em; padding-right: 2em; }
                    229:    #table-example-1 tbody td:first-child + td { width: 10em; }
                    230:    #table-example-1 tbody td:first-child + td ~ td { width: 2.5em; }
                    231:    #table-example-1 tbody td:first-child + td + td + td ~ td { width: 1.25em; }
                    232: 
                    233:    .apple-table-examples { border: none; border-collapse: separate; border-spacing: 1.5em 0em; width: 40em; margin-left: 3em; }
                    234:    .apple-table-examples * { font-family: "Times", serif; }
                    235:    .apple-table-examples td, .apple-table-examples th { border: none; white-space: nowrap; padding-top: 0; padding-bottom: 0; }
                    236:    .apple-table-examples tbody th:first-child { border-left: none; width: 100%; }
                    237:    .apple-table-examples thead th:first-child ~ th { font-size: smaller; font-weight: bolder; border-bottom: solid 2px; text-align: center; }
                    238:    .apple-table-examples tbody th::after, .apple-table-examples tfoot th::after { content: leader(". ") }
                    239:    .apple-table-examples tbody th, .apple-table-examples tfoot th { font: inherit; text-align: left; }
                    240:    .apple-table-examples td { text-align: right; vertical-align: top; }
                    241:    .apple-table-examples.e1 tbody tr:last-child td { border-bottom: solid 1px; }
                    242:    .apple-table-examples.e1 tbody + tbody tr:last-child td { border-bottom: double 3px; }
                    243:    .apple-table-examples.e2 th[scope=row] { padding-left: 1em; }
                    244:    .apple-table-examples sup { line-height: 0; }
                    245: 
                    246:    .details-example img { vertical-align: top; }
                    247: 
                    248:    #base64-table {
                    249:      white-space: nowrap;
                    250:      font-size: 0.6em;
                    251:      column-width: 6em;
                    252:      column-count: 5;
                    253:      column-gap: 1em;
                    254:      -moz-column-width: 6em;
                    255:      -moz-column-count: 5;
                    256:      -moz-column-gap: 1em;
                    257:      -webkit-column-width: 6em;
                    258:      -webkit-column-count: 5;
                    259:      -webkit-column-gap: 1em;
                    260:    }
                    261:    #base64-table thead { display: none; }
                    262:    #base64-table * { border: none; }
                    263:    #base64-table tbody td:first-child:after { content: ':'; }
                    264:    #base64-table tbody td:last-child { text-align: right; }
                    265: 
                    266:    #named-character-references-table {
                    267:      white-space: nowrap;
                    268:      font-size: 0.6em;
                    269:      column-width: 30em;
                    270:      column-gap: 1em;
                    271:      -moz-column-width: 30em;
                    272:      -moz-column-gap: 1em;
                    273:      -webkit-column-width: 30em;
                    274:      -webkit-column-gap: 1em;
                    275:    }
                    276:    #named-character-references-table > table > tbody > tr > td:first-child + td,
                    277:    #named-character-references-table > table > tbody > tr > td:last-child { text-align: center; }
                    278:    #named-character-references-table > table > tbody > tr > td:last-child:hover > span { position: absolute; top: auto; left: auto; margin-left: 0.5em; line-height: 1.2; font-size: 5em; border: outset; padding: 0.25em 0.5em; background: white; width: 1.25em; height: auto; text-align: center; }
                    279:    #named-character-references-table > table > tbody > tr#entity-CounterClockwiseContourIntegral > td:first-child { font-size: 0.5em; }
                    280: 
                    281:    .glyph.control { color: red; }
                    282: 
                    283:    @font-face {
                    284:      font-family: 'Essays1743';
1.179     sruby     285:      src: url('../fonts/Essays1743.ttf');
1.1       mike      286:    }
                    287:    @font-face {
                    288:      font-family: 'Essays1743';
                    289:      font-weight: bold;
1.179     sruby     290:      src: url('../fonts/Essays1743-Bold.ttf');
1.1       mike      291:    }
                    292:    @font-face {
                    293:      font-family: 'Essays1743';
                    294:      font-style: italic;
1.179     sruby     295:      src: url('../fonts/Essays1743-Italic.ttf');
1.1       mike      296:    }
                    297:    @font-face {
                    298:      font-family: 'Essays1743';
                    299:      font-style: italic;
                    300:      font-weight: bold;
1.179     sruby     301:      src: url('../fonts/Essays1743-BoldItalic.ttf');
1.1       mike      302:    }
                    303: 
1.159     sruby     304:   </style><link href="data:text/css," id="complete" rel="stylesheet" title="Complete specification"><link href="data:text/css,.impl%20%7B%20display:%20none;%20%7D%0Ahtml%20%7B%20border:%20solid%20yellow;%20%7D%20.domintro:before%20%7B%20display:%20none;%20%7D" id="author" rel="alternate stylesheet" title="Author documentation only"><link href="data:text/css,.impl%20%7B%20background:%20%23FFEEEE;%20%7D%20.domintro:before%20%7B%20background:%20%23FFEEEE;%20%7D" id="highlight" rel="alternate stylesheet" title="Highlight implementation requirements"><script>
1.1       mike      305:    function getCookie(name) {
                    306:      var params = location.search.substr(1).split("&");
                    307:      for (var index = 0; index < params.length; index++) {
                    308:        if (params[index] == name)
                    309:          return "1";
                    310:        var data = params[index].split("=");
                    311:        if (data[0] == name)
                    312:          return unescape(data[1]);
                    313:      }
                    314:      var cookies = document.cookie.split("; ");
                    315:      for (var index = 0; index < cookies.length; index++) {
                    316:        var data = cookies[index].split("=");
                    317:        if (data[0] == name)
                    318:          return unescape(data[1]);
                    319:      }
                    320:      return null;
                    321:    }
1.159     sruby     322:   </script><link href="the-embed-element.html" title="4.8.3 The embed element" rel="prev">
1.161     sruby     323:   <link href="spec.html#contents" title="Table of contents" rel="contents">
1.1       mike      324:   <link href="the-param-element.html" title="4.8.5 The param element" rel="next">
1.22      mike      325:   </head><body onload="fixBrokenLink();" class="split chapter"><div class="head" id="head">
1.1       mike      326:    <p><a href="http://www.w3.org/"><img alt="W3C" height="48" src="http://www.w3.org/Icons/w3c_home" width="72"></a></p>
                    327: 
                    328:    <h1>HTML5</h1>
1.159     sruby     329:    <h2 class="no-num no-toc" id="a-vocabulary-and-associated-apis-for-html-and-xhtml">A vocabulary and associated APIs for HTML and XHTML</h2>
1.187   ! sruby     330:    <h2 class="no-num no-toc" id="editor's-draft-date-1-january-1970">Editor's Draft 27 September 2012</h2>
1.85      mike      331:    </div>
1.175     sruby     332:    <div class="prev_next">
1.1       mike      333:    <a href="the-embed-element.html">&#8592; 4.8.3 The embed element</a> &#8211;
1.161     sruby     334:    <a href="spec.html#contents">Table of contents</a> &#8211;
1.1       mike      335:    <a href="the-param-element.html">4.8.5 The param element &#8594;</a>
1.159     sruby     336:   </div>
1.1       mike      337: 
1.85      mike      338:   <h4 id="the-object-element"><span class="secno">4.8.4 </span>The <dfn><code>object</code></dfn> element</h4>
                    339: 
                    340:   <dl class="element"><dt><a href="element-definitions.html#element-dfn-categories" title="element-dfn-categories">Categories</a>:</dt>
1.159     sruby     341:    <dd><a href="content-models.html#flow-content-1">Flow content</a>.</dd>
                    342:    <dd><a href="content-models.html#phrasing-content-1">Phrasing content</a>.</dd>
                    343:    <dd><a href="content-models.html#embedded-content-2">Embedded content</a>.</dd>
                    344:    <dd>If the element has a <code title="attr-hyperlink-usemap"><a href="image-maps.html#attr-hyperlink-usemap">usemap</a></code> attribute: <a href="content-models.html#interactive-content-0">Interactive content</a>.</dd> <!-- also when showing a plugin or a nested browsing context, but checking that statically is hard...) -->
1.1       mike      345:    <dd><a href="forms.html#category-listed" title="category-listed">Listed</a>,  <a href="forms.html#category-submit" title="category-submit">submittable</a>, <a href="forms.html#form-associated-element">form-associated element</a>.</dd>
1.159     sruby     346:    <dd><a href="content-models.html#palpable-content-0">Palpable content</a>.</dd>
1.25      mike      347:    <dt><a href="element-definitions.html#element-dfn-contexts" title="element-dfn-contexts">Contexts in which this element can be used</a>:</dt>
1.159     sruby     348:    <dd>Where <a href="content-models.html#embedded-content-2">embedded content</a> is expected.</dd>
1.25      mike      349:    <dt><a href="element-definitions.html#element-dfn-content-model" title="element-dfn-content-model">Content model</a>:</dt>
1.163     sruby     350:    <dd>Zero or more <code><a href="the-param-element.html#the-param-element">param</a></code> elements, then <a href="content-models.html#flow-content-1">flow content</a> and/or <a href="content-models.html#interactive-content-0">interactive content</a>.</dd>
1.25      mike      351:    <dt><a href="element-definitions.html#element-dfn-attributes" title="element-dfn-attributes">Content attributes</a>:</dt>
1.1       mike      352:    <dd><a href="global-attributes.html#global-attributes">Global attributes</a></dd>
                    353:    <dd><code title="attr-object-data"><a href="#attr-object-data">data</a></code></dd>
                    354:    <dd><code title="attr-object-type"><a href="#attr-object-type">type</a></code></dd>
                    355:    <dd><code title="attr-object-typemustmatch"><a href="#attr-object-typemustmatch">typemustmatch</a></code></dd>
                    356:    <dd><code title="attr-object-name"><a href="#attr-object-name">name</a></code></dd>
                    357:    <dd><code title="attr-hyperlink-usemap"><a href="image-maps.html#attr-hyperlink-usemap">usemap</a></code></dd>
                    358:    <dd><code title="attr-fae-form"><a href="association-of-controls-and-forms.html#attr-fae-form">form</a></code></dd>
                    359:    <dd><code title="attr-dim-width"><a href="dimension-attributes.html#attr-dim-width">width</a></code></dd>
                    360:    <dd><code title="attr-dim-height"><a href="dimension-attributes.html#attr-dim-height">height</a></code></dd>
1.159     sruby     361:    <dt><a href="element-definitions.html#element-dfn-dom" title="element-dfn-dom">DOM interface</a>:</dt><!--TOPIC:DOM APIs-->
1.1       mike      362:    <dd>
                    363: <pre class="idl">interface <dfn id="htmlobjectelement">HTMLObjectElement</dfn> : <a href="elements.html#htmlelement">HTMLElement</a> {
                    364:            attribute DOMString <a href="#dom-object-data" title="dom-object-data">data</a>;
                    365:            attribute DOMString <a href="#dom-object-type" title="dom-object-type">type</a>;
                    366:            attribute boolean <a href="#dom-object-typemustmatch" title="dom-object-typeMustMatch">typeMustMatch</a>;
                    367:            attribute DOMString <a href="#dom-object-name" title="dom-object-name">name</a>;
                    368:            attribute DOMString <a href="#dom-object-usemap" title="dom-object-useMap">useMap</a>;
                    369:   readonly attribute <a href="the-form-element.html#htmlformelement">HTMLFormElement</a>? <a href="association-of-controls-and-forms.html#dom-fae-form" title="dom-fae-form">form</a>;
                    370:            attribute DOMString <a href="dimension-attributes.html#dom-dim-width" title="dom-dim-width">width</a>;
                    371:            attribute DOMString <a href="dimension-attributes.html#dom-dim-height" title="dom-dim-height">height</a>;
                    372:   readonly attribute Document? <a href="#dom-object-contentdocument" title="dom-object-contentDocument">contentDocument</a>;
                    373:   readonly attribute <a href="browsers.html#windowproxy">WindowProxy</a>? <a href="#dom-object-contentwindow" title="dom-object-contentWindow">contentWindow</a>;
                    374: 
                    375:   readonly attribute boolean <a href="constraints.html#dom-cva-willvalidate" title="dom-cva-willValidate">willValidate</a>;
                    376:   readonly attribute <a href="constraints.html#validitystate">ValidityState</a> <a href="constraints.html#dom-cva-validity" title="dom-cva-validity">validity</a>;
                    377:   readonly attribute DOMString <a href="constraints.html#dom-cva-validationmessage" title="dom-cva-validationMessage">validationMessage</a>;
1.184     sruby     378:   boolean <a href="constraints.html#dom-cva-checkvalidity" title="dom-cva-checkValidity">checkValidity</a>();
1.1       mike      379:   void <a href="constraints.html#dom-cva-setcustomvalidity" title="dom-cva-setCustomValidity">setCustomValidity</a>(DOMString error);
1.34      mike      380: 
                    381:   <a href="#dom-object-caller" title="dom-object-caller">legacycaller</a> any (any... arguments);
1.1       mike      382: };</pre>
                    383:     <div class="impl">
                    384:     <p>Depending on the type of content instantiated by the
                    385:     <code><a href="#the-object-element">object</a></code> element, the node also supports other
                    386:     interfaces.</p>
                    387:     </div>
                    388:    </dd>
1.159     sruby     389:   </dl><!--TOPIC:HTML--><p>The <code><a href="#the-object-element">object</a></code> element can represent an external
1.1       mike      390:   resource, which, depending on the type of the resource, will either
                    391:   be treated as an image, as a <a href="browsers.html#nested-browsing-context">nested browsing context</a>,
                    392:   or as an external resource to be processed by a
1.85      mike      393:   <a href="infrastructure.html#plugin">plugin</a>.</p>
                    394: 
                    395:   <p>The <dfn id="attr-object-data" title="attr-object-data"><code>data</code></dfn>
1.1       mike      396:   attribute, if present, specifies the address of the resource. If
                    397:   present, the attribute must be a <a href="urls.html#valid-non-empty-url-potentially-surrounded-by-spaces">valid non-empty
1.85      mike      398:   URL potentially surrounded by spaces</a>.</p>
                    399: 
1.159     sruby     400:   <p class="warning">Authors who reference resources from other <a href="browsers.html#origin-0" title="origin">origins</a> that they do not trust are urged to
1.1       mike      401:   use the <code title="attr-object-typemustmatch"><a href="#attr-object-typemustmatch">typemustmatch</a></code>
                    402:   attribute defined below. Without that attribute, it is possible in
                    403:   certain cases for an attacker on the remote host to use the plugin
                    404:   mechanism to run arbitrary scripts, even if the author has used
1.159     sruby     405:   features such as the Flash "allowScriptAccess" parameter.</p> <!--
                    406:   for example, if the user doesn't have flash installed but does have
                    407:   java installed, and the remote site unexpectedly returns java
                    408:   instead of flash, then java will run, and it will ignore the
                    409:   allowScriptAccess thing -->
1.85      mike      410: 
                    411:   <p>The <dfn id="attr-object-type" title="attr-object-type"><code>type</code></dfn>
1.1       mike      412:   attribute, if present, specifies the type of the resource. If
1.85      mike      413:   present, the attribute must be a <a href="infrastructure.html#valid-mime-type">valid MIME type</a>.</p>
                    414: 
                    415:   <p>At least one of either the <code title="attr-object-data"><a href="#attr-object-data">data</a></code> attribute or the <code title="attr-object-type"><a href="#attr-object-type">type</a></code> attribute must be present.</p>
                    416: 
1.159     sruby     417: <!--MD-->
1.85      mike      418: 
                    419:   <p>The <dfn id="attr-object-typemustmatch" title="attr-object-typemustmatch"><code>typemustmatch</code></dfn>
1.1       mike      420:   attribute is a <a href="common-microsyntaxes.html#boolean-attribute">boolean attribute</a> whose presence
                    421:   indicates that the resource specified by the <code title="attr-object-data"><a href="#attr-object-data">data</a></code> attribute is only to be used if
                    422:   the value of the <code title="attr-object-type"><a href="#attr-object-type">type</a></code>
                    423:   attribute and the <a href="urls.html#content-type">Content-Type</a> of the aforementioned
1.85      mike      424:   resource match.</p>
                    425: 
                    426:   <p>The <code title="attr-object-typemustmatch"><a href="#attr-object-typemustmatch">typemustmatch</a></code>
                    427:   attribute must not be specified unless both the <code title="attr-object-data"><a href="#attr-object-data">data</a></code> attribute and the <code title="attr-object-type"><a href="#attr-object-type">type</a></code> attribute are present.</p>
                    428: 
                    429:   <p>The <dfn id="attr-object-name" title="attr-object-name"><code>name</code></dfn>
1.1       mike      430:   attribute, if present, must be a <a href="browsers.html#valid-browsing-context-name">valid browsing context
                    431:   name</a>. The given value is used to name the <a href="browsers.html#nested-browsing-context">nested
1.85      mike      432:   browsing context</a>, if applicable.</p>
                    433: 
                    434:   <div class="impl">
1.1       mike      435: 
1.127     mike      436:   <p>Whenever one of the following conditions occur:</p>
                    437: 
                    438:   <ul><li>the element is created,
                    439: 
                    440:    </li><li>the element is popped off the <a href="parsing.html#stack-of-open-elements">stack of open elements</a> of an <a href="parsing.html#html-parser">HTML parser</a> or <a href="the-xhtml-syntax.html#xml-parser">XML parser</a>,
                    441: 
                    442:    </li><li>the element is not on the <a href="parsing.html#stack-of-open-elements">stack of open elements</a> of an <a href="parsing.html#html-parser">HTML parser</a> or <a href="the-xhtml-syntax.html#xml-parser">XML parser</a>, and it is either <a href="infrastructure.html#insert-an-element-into-a-document" title="insert an element into a document">inserted into a document</a> or <a href="infrastructure.html#remove-an-element-from-a-document" title="remove an element from a document">removed from a document</a>,
                    443: 
                    444:    </li><li>the element's <code><a href="dom.html#document">Document</a></code> changes whether it is <a href="browsers.html#fully-active">fully active</a>,
                    445: 
                    446:    </li><li>one of the element's ancestor <code><a href="#the-object-element">object</a></code> elements changes to or from showing its <a href="content-models.html#fallback-content">fallback content</a>,
                    447: 
                    448:    </li><li>the element's <code title="attr-object-classid"><a href="obsolete.html#attr-object-classid">classid</a></code> attribute is set, changed, or removed,
                    449: 
                    450:    </li><li>the element's <code title="attr-object-classid"><a href="obsolete.html#attr-object-classid">classid</a></code> attribute is not present, and its <code title="attr-object-data"><a href="#attr-object-data">data</a></code> attribute is set, changed, or removed,
                    451: 
                    452:    </li><li>neither the element's <code title="attr-object-classid"><a href="obsolete.html#attr-object-classid">classid</a></code> attribute nor its <code title="attr-object-data"><a href="#attr-object-data">data</a></code> attribute are present, and its <code title="attr-object-type"><a href="#attr-object-type">type</a></code> attribute is set, changed, or removed,
                    453: 
1.128     mike      454:    </li><li>the element changes from <a href="rendering.html#being-rendered">being rendered</a> to not being rendered, or vice versa,
1.127     mike      455: 
1.159     sruby     456:   </li></ul><!-- Changing the base URL doesn't trigger this. --><p>...the user agent must <a href="webappapis.html#queue-a-task">queue a task</a> to run the
1.127     mike      457:   following steps to (re)determine what the <code><a href="#the-object-element">object</a></code>
                    458:   element represents. The <a href="webappapis.html#task-source">task source</a> for this <a href="webappapis.html#concept-task" title="concept-task">task</a> is the <a href="webappapis.html#dom-manipulation-task-source">DOM manipulation task
1.132     mike      459:   source</a>. This <a href="webappapis.html#concept-task" title="concept-task">task</a> being
                    460:   <a href="webappapis.html#queue-a-task" title="queue a task">queued</a> or actively running must
1.159     sruby     461:   <a href="the-end.html#delay-the-load-event">delay the load event</a> of the element's document. <!--As
                    462:   described in the algorithm, once the algorithm starts fetching a
                    463:   resource, the fetch is what starts delaying the load event. But to
                    464:   tide us over from when the parser finds the <object> element and the
                    465:   fetching begins, we have to block the load event like this, lest the
                    466:   parse end before this task gets run.--></p>
1.4       mike      467: 
1.1       mike      468:   <ol><li>
                    469: 
                    470:     <p>If the user has indicated a preference that this
                    471:     <code><a href="#the-object-element">object</a></code> element's <a href="content-models.html#fallback-content">fallback content</a> be
                    472:     shown instead of the element's usual behavior, then jump to the
                    473:     last step in the overall set of steps (fallback).</p>
                    474: 
                    475:     <p class="note">For example, a user could ask for the element's
                    476:     <a href="content-models.html#fallback-content">fallback content</a> to be shown because that content
                    477:     uses a format that the user finds more accessible.</p>
                    478: 
                    479:    </li>
                    480: 
                    481:    <li>
                    482: 
                    483:     <p>If the element has an ancestor <a href="media-elements.html#media-element">media element</a>, or
                    484:     has an ancestor <code><a href="#the-object-element">object</a></code> element that is <em>not</em>
                    485:     showing its <a href="content-models.html#fallback-content">fallback content</a>, or if the element is
                    486:     not <a href="infrastructure.html#in-a-document" title="in a document">in a <code>Document</code></a>
                    487:     with a <a href="browsers.html#browsing-context">browsing context</a>, or if the element's
                    488:     <code><a href="dom.html#document">Document</a></code> is not <a href="browsers.html#fully-active">fully active</a>, or if the
                    489:     element is still in the <a href="parsing.html#stack-of-open-elements">stack of open elements</a> of an
1.127     mike      490:     <a href="parsing.html#html-parser">HTML parser</a> or <a href="the-xhtml-syntax.html#xml-parser">XML parser</a>, or if the
                    491:     element is not <a href="rendering.html#being-rendered">being rendered</a>, then jump to the last
                    492:     step in the overall set of steps (fallback).</p>
1.1       mike      493: 
                    494:    </li>
                    495: 
                    496:    <li>
                    497: 
1.159     sruby     498:     <!-- what if it's not in the document? if that should prevent
                    499:     plugin instantiation, then here just skip to the last step -->
1.4       mike      500: 
1.1       mike      501:     <p>If the <code title="attr-object-classid"><a href="obsolete.html#attr-object-classid">classid</a></code>
                    502:     attribute is present, and has a value that isn't the empty string,
                    503:     then: if the user agent can find a <a href="infrastructure.html#plugin">plugin</a> suitable
                    504:     according to the value of the <code title="attr-object-classid"><a href="obsolete.html#attr-object-classid">classid</a></code> attribute, and either
                    505:     <a href="#sandboxPluginObject">plugins aren't being sandboxed</a>
                    506:     or that <a href="infrastructure.html#plugin">plugin</a> can be <a href="infrastructure.html#concept-plugin-secure" title="concept-plugin-secure">secured</a>, then that
                    507:     <a href="infrastructure.html#plugin">plugin</a> <a href="#object-plugin">should be used</a>,
                    508:     and the value of the <code title="attr-object-data"><a href="#attr-object-data">data</a></code>
                    509:     attribute, if any, should be passed to the <a href="infrastructure.html#plugin">plugin</a>. If
                    510:     no suitable <a href="infrastructure.html#plugin">plugin</a> can be found, or if the
                    511:     <a href="infrastructure.html#plugin">plugin</a> reports an error, jump to the last step in the
                    512:     overall set of steps (fallback).</p>
                    513: 
1.159     sruby     514:     <!--
                    515:      case insensitive:
                    516:       is "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" -> application/x-shockwave-flash
                    517:       is "clsid:cfcdaa03-8be4-11cf-b84b-0020afbbccfa" -> audio/x-pn-realaudio-plugin
                    518:       is "clsid:02bf25d5-8c17-4b23-bc80-d3488abddc6b" -> video/quicktime
                    519:       is "clsid:166b1bca-3f9c-11cf-8075-444553540000" -> application/x-director
                    520:       is "clsid:6bf52a52-394a-11d3-b153-00c04f79faa6" -> application/x-mplayer2
                    521:       starts with "java:"                             -> application/x-java-vm
                    522:       starts with "clsid:"                            -> application/x-oleobject
                    523:     -->
1.4       mike      524: 
1.1       mike      525:    </li>
                    526: 
1.159     sruby     527:    <!-- (v2?)
                    528:    we may have to define magic fallback to <param> if it turns out to
                    529:    be needed in testing:
                    530:    <hyatt> apparently your url can come from <param>
                    531:    <hyatt> not just the data attribute
                    532:    <hyatt> our code looks for params with "src", "movie", "code" and "url"
                    533:    <hyatt> and also tries to find the type on a param
                    534:    <Hixie> oh that's you trying to have hacky activex support
                    535:    <Hixie> opera does that too
                    536:    <hyatt> yeah we support activex versions of plugins that are common
                    537:    <hyatt> like flash and quicktime and realaudio
                    538:    <Hixie> that would be a step 1b. if no data attribute, then look for a <param> to get you a URL instead.
                    539:    <Hixie> and if you find one, carry on as if that was your data="".
                    540:    -->
1.4       mike      541: 
1.1       mike      542:    <li><p>If the <code title="attr-object-data"><a href="#attr-object-data">data</a></code> attribute
                    543:    is present and its value is not the empty string, then:</p>
                    544: 
                    545:     <ol><li><p>If the <code title="attr-object-type"><a href="#attr-object-type">type</a></code>
                    546:      attribute is present and its value is not a type that the user
                    547:      agent supports, and is not a type that the user agent can find a
                    548:      <a href="infrastructure.html#plugin">plugin</a> for, then the user agent may jump to the last
                    549:      step in the overall set of steps (fallback) without fetching the
                    550:      content to examine its real type.</p></li>
                    551: 
                    552:      <li><p><a href="urls.html#resolve-a-url" title="resolve a url">Resolve</a> the
                    553:      <a href="urls.html#url">URL</a> specified by the <code title="attr-object-data"><a href="#attr-object-data">data</a></code> attribute, relative to the
                    554:      element.</p></li>
                    555: 
                    556:      <li><p>If that failed, <a href="webappapis.html#fire-a-simple-event">fire a simple event</a> named
                    557:      <code title="event-error">error</code> at the element, then jump
                    558:      to the last step in the overall set of steps (fallback).</p></li>
                    559: 
                    560:      <li>
                    561: 
                    562:       <p><a href="urls.html#fetch">Fetch</a> the resulting <a href="urls.html#absolute-url">absolute URL</a>,
                    563:       from the element's <a href="browsers.html#browsing-context-scope-origin">browsing context scope origin</a> if
1.159     sruby     564:       it has one<!-- potentially http-origin privacy sensitive
                    565:       -->.</p>
1.1       mike      566: 
1.159     sruby     567:       <!-- similar text in various places --> <p>Fetching the resource
1.1       mike      568:       must <a href="the-end.html#delay-the-load-event">delay the load event</a> of the element's document
                    569:       until the <a href="webappapis.html#concept-task" title="concept-task">task</a> that is <a href="webappapis.html#queue-a-task" title="queue a task">queued</a> by the <a href="webappapis.html#networking-task-source">networking task
                    570:       source</a> once the resource has been <a href="urls.html#fetch" title="fetch">fetched</a> (defined next) has been run.</p>
                    571: 
                    572:       <p>For the purposes of the <a href="offline.html#application-cache">application cache</a>
                    573:       networking model, this <a href="urls.html#fetch">fetch</a> operation is not for a
                    574:       <a href="browsers.html#child-browsing-context">child browsing context</a> (though it might end up
                    575:       being used for one after all, as defined below).</p>
                    576: 
                    577:      </li>
                    578: 
                    579:      <li><p>If the resource is not yet available (e.g. because the
                    580:      resource was not available in the cache, so that loading the
                    581:      resource required making a request over the network), then jump
                    582:      to the last step in the overall set of steps (fallback). The
                    583:      <a href="webappapis.html#concept-task" title="concept-task">task</a> that is <a href="webappapis.html#queue-a-task" title="queue
                    584:      a task">queued</a> by the <a href="webappapis.html#networking-task-source">networking task source</a>
                    585:      once the resource is available must restart this algorithm from
                    586:      this step. Resources can load incrementally; user agents may opt
                    587:      to consider a resource "available" whenever enough data has been
                    588:      obtained to begin processing the resource.</p></li>
                    589: 
                    590:      <li><p>If the load failed (e.g. there was an HTTP 404 error,
                    591:      there was a DNS error), <a href="webappapis.html#fire-a-simple-event">fire a simple event</a> named
                    592:      <code title="event-error">error</code> at the element, then jump
                    593:      to the last step in the overall set of steps (fallback).</p></li>
                    594: 
                    595:      <li id="object-type-detection">
                    596: 
                    597:       <p>Determine the <var title="">resource type</var>, as follows:</p>
                    598: 
1.159     sruby     599: <!-- Hopefully this step is exactly equivalent to the following:
                    600: 
                    601:  START
                    602:    |
                    603:    V
                    604:  Is there a Content-Type and is the UA going to obey it blindly?
                    605:    |                   |
                    606:    | YES               | NO
                    607:    |                   V                                                          YES
                    608:    |                 Is there a type="" attribute whose value is a plugin type? ============================================-.
                    609:    |                   |                                                                                                     |
                    610:    |                   | NO                                                                                                  |
                    611:    |                   V                        NO                                       YES                                 |
                    612:    |                 Is there a Content type? ========-> Is there a type="" attribute? ==========> Let TYPE be type=""       |
                    613:    |                   |                                                           |               attribute value           |
                    614:    |                   | YES                                                       | NO                    |                 |
                    615:    V            NO     V                                                           |                       V                 |
                    616:    +-<============== Is it text/plain or application/octet-stream?                 `==> Let TYPE be  =====>+                 |
                    617:    |                   |                                     |                          Sniffed type       |                 |
                    618:    |                   | text/plain                          | octet-stream                                V                 |
                    619:    |                   V                              YES    V                                          Is TYPE              |
                    620:    |                 Does the page sniff as binary? ======> Is there a type="" attribute?       application/octet-stream?    |
                    621:    |                   |                                     |              |                      |                |        |
                    622:    |                   | NO                                  | YES          | NO                   | YES            | NO     |
                    623:    |                   |                                     |       YES    V                      V                |        |
                    624:    |                   |                  application/octet-stream? =====> Extension that is plugin type?           |        |
                    625:    |                   |                                     |                          |          |                |        |
                    626:    |                   |                                     | NO                       | NO       | YES            |        |
                    627:    |                   |                                     V                          |          |                |        |
                    628:    |                   |                           Type attribute is XML or     YES     V          |                |        |
                    629:    |                   |                           doesn't start with image/* ======> FALLBACK     |                |        |
                    630:    |                   |                           and is not a plugin type?                       |                |        |
                    631:    |                   |                                          |                                |                |        |
                    632:    |                   |                                          | NO                             |                |        V
                    633:    V                   V                                          V                                V                V       Use
                    634:   Use                 Use                                        Use it (will be                  Use              Use      type=""
                    635:   Content-Type        text/plain                                 bitmap or plugin)                extension        TYPE     attribute
                    636:    |                   |                                          |                                |                |        |
                    637:    |                   V                                          V                                V                V        |
                    638:    `================->-+========================================>-+==============>-+-<============-+-<==============+-<======'
                    639:                                                                                    |
                    640:                                                                                    V
                    641:                                                                   Continue following rules in the spec, which might
                    642:                                                                   result in a plugin, a browsing context, an image,
                    643:                                                                   or using fallback, depending on the UA and the type.
                    644: 
                    645: 
                    646:    "Extension that is plugin type?" means "Is there an extension that matches one that a plugin supports?".
                    647:    Plugins are not allowed to register text/plain or application/octet-stream.
1.1       mike      648: 
1.159     sruby     649: -->
1.4       mike      650: 
1.1       mike      651:       <ol><li>
                    652: 
                    653:         <p>Let the <var title="">resource type</var> be unknown.</p>
                    654: 
                    655:        </li>
                    656: 
                    657:        <li>
                    658: 
                    659:         <p>If the <code><a href="#the-object-element">object</a></code> element has a <code title="attr-object-type"><a href="#attr-object-type">type</a></code> attribute and a <code title="attr-object-typemustmatch"><a href="#attr-object-typemustmatch">typemustmatch</a></code>
                    660:         attribute, and the resource has <a href="urls.html#content-type" title="Content-Type">associated Content-Type metadata</a>,
                    661:         and the type specified in <a href="urls.html#content-type" title="Content-Type">the
                    662:         resource's Content-Type metadata</a> is an <a href="infrastructure.html#ascii-case-insensitive">ASCII
                    663:         case-insensitive</a> match for the value of the element's
                    664:         <code title="attr-object-type"><a href="#attr-object-type">type</a></code> attribute, then let
                    665:         <var title="">resource type</var> be that type and jump to the
                    666:         step below labeled <i>handler</i>.</p>
                    667: 
1.159     sruby     668:         <!-- do we need to <span>strip leading and trailing
                    669:         whitespace</span> from anything here? collapse sequences of
                    670:         spaces? drop parameters? -->
1.4       mike      671: 
1.1       mike      672:        </li>
                    673: 
                    674:        <li>
                    675: 
                    676:         <p>If the <code><a href="#the-object-element">object</a></code> element has a <code title="attr-object-typemustmatch"><a href="#attr-object-typemustmatch">typemustmatch</a></code>
                    677:         attribute, jump to the step below labeled <i>handler</i>.</p>
                    678: 
                    679:        </li>
                    680: 
                    681:        <li>
                    682: 
1.159     sruby     683:         <!-- by request: http://www.w3.org/Bugs/Public/show_bug.cgi?id=8479 -->
1.1       mike      684: 
                    685:         <p>If the user agent is configured to strictly obey
                    686:         Content-Type headers for this resource, and the resource has
                    687:         <a href="urls.html#content-type" title="Content-Type">associated Content-Type
                    688:         metadata</a>, then let the <var title="">resource
                    689:         type</var> be the type specified in <a href="urls.html#content-type" title="Content-Type">the resource's Content-Type
                    690:         metadata</a>, and jump to the step below labeled
                    691:         <i>handler</i>.</p>
                    692: 
                    693:         <p class="warning">This can introduce a vulnerability, wherein
                    694:         a site is trying to embed a resource that uses a particular
                    695:         plugin, but the remote site overrides that and instead
                    696:         furnishes the user agent with a resource that triggers a
1.159     sruby     697:         different plugin with different security characteristics. <!--
                    698:         e.g. the example given above, where the site is expecting
                    699:         Flash with allowScriptAccess=never, and instead gets back Java
                    700:         with its unrestricted DOM access --></p>
1.1       mike      701: 
                    702:        </li>
                    703: 
                    704:        <li>
                    705: 
                    706:         <p>If there is a <code title="attr-object-type"><a href="#attr-object-type">type</a></code>
                    707:         attribute present on the <code><a href="#the-object-element">object</a></code> element, and that
                    708:         attribute's value is not a type that the user agent supports,
                    709:         but it <em>is</em> a type that a <a href="infrastructure.html#plugin">plugin</a> supports,
                    710:         then let the <var title="">resource type</var> be the type
                    711:         specified in that <code title="attr-object-type"><a href="#attr-object-type">type</a></code>
                    712:         attribute, and jump to the step below labeled
                    713:         <i>handler</i>.</p>
                    714: 
                    715:        </li>
                    716: 
                    717:        <li>
                    718: 
                    719:         <p>Run the approprate set of steps from the following
                    720:         list:</p>
                    721: 
                    722:         <dl class="switch"><dt>The resource has <a href="urls.html#content-type" title="Content-Type">associated
                    723:          Content-Type metadata</a></dt>
                    724: 
                    725:          <dd>
                    726: 
                    727:           <ol><li>
                    728: 
                    729:             <p>Let <var title="">binary</var> be false.</p>
                    730: 
                    731:            </li>
                    732: 
                    733:            <li>
                    734: 
                    735:             <p>If the type specified in <a href="urls.html#content-type" title="Content-Type">the
                    736:             resource's Content-Type metadata</a> is
                    737:             "<code>text/plain</code>", and the result of applying the
                    738:             <a href="urls.html#content-type-sniffing:-text-or-binary" title="Content-Type sniffing: text or binary">rules
                    739:             for distinguishing if a resource is text or binary</a>
                    740:             to the resource is that the resource is not
                    741:             <code>text/plain</code>, then set <var title="">binary</var> to true.</p>
                    742: 
                    743:            </li>
                    744: 
                    745:            <li>
                    746: 
                    747:             <p>If the type specified in <a href="urls.html#content-type" title="Content-Type">the
                    748:             resource's Content-Type metadata</a> is
                    749:             "<code>application/octet-stream</code>", then set <var title="">binary</var> to true.</p>
                    750: 
                    751:            </li>
                    752: 
                    753:            <li>
                    754: 
                    755:             <p>If <var title="">binary</var> is false, then let the
                    756:             <var title="">resource type</var> be the type specified in
                    757:             <a href="urls.html#content-type" title="Content-Type">the resource's Content-Type
                    758:             metadata</a>, and jump to the step below labeled
                    759:             <i>handler</i>.</p>
                    760: 
                    761:            </li>
                    762: 
                    763:            <li>
                    764: 
                    765:             <p>If there is a <code title="attr-object-type"><a href="#attr-object-type">type</a></code> attribute present on
                    766:             the <code><a href="#the-object-element">object</a></code> element, and its value is not
                    767:             <code>application/octet-stream</code>, then run the
                    768:             following steps:</p>
                    769: 
                    770:             <ol><li>
                    771: 
                    772:               <p>If the attribute's value is a type that a <a href="infrastructure.html#plugin">plugin</a> supports, or
                    773:               the attribute's value is a type that starts with "<code>image/</code>" that is not also an <a href="infrastructure.html#xml-mime-type">XML MIME type</a>,
                    774:               then let the <var title="">resource type</var> be the type specified in that <code title="attr-object-type"><a href="#attr-object-type">type</a></code> attribute.</p>
                    775: 
                    776:              </li>
                    777: 
                    778:              <li>
                    779: 
                    780:               <p>Jump to the step below labeled <i>handler</i>.</p>
                    781: 
                    782:              </li>
                    783: 
                    784:             </ol></li>
                    785: 
                    786:           </ol></dd>
                    787: 
                    788:          <dt>The resource does not have <a href="urls.html#content-type" title="Content-Type">associated Content-Type
                    789:          metadata</a></dt>
                    790: 
                    791:          <dd>
                    792: 
                    793:           <ol><li>
                    794: 
                    795:             <p>If there is a <code title="attr-object-type"><a href="#attr-object-type">type</a></code> attribute present on
                    796:             the <code><a href="#the-object-element">object</a></code> element, then let the <var title="">tentative type</var> be the type specified in that
                    797:             <code title="attr-object-type"><a href="#attr-object-type">type</a></code> attribute.</p>
                    798: 
                    799:             <p>Otherwise, let <var title="">tentative type</var> be the
                    800:             <a href="urls.html#content-type-sniffing-0" title="content-type sniffing">sniffed type of the
                    801:             resource</a>.</p>
                    802: 
                    803:            </li>
                    804: 
                    805:            <li>
                    806: 
                    807:             <p>If <var title="">tentative type</var> is <em>not</em>
                    808:             <code>application/octet-stream</code>, then let <var title="">resource type</var> be <var title="">tentative
                    809:             type</var> and jump to the step below labeled
                    810:             <i>handler</i>.</p>
                    811: 
                    812:            </li>
                    813: 
                    814:           </ol></dd>
                    815: 
                    816:         </dl></li>
                    817: 
                    818:        <li>
                    819: 
1.159     sruby     820:         <!-- if we get to this point we know we can successfully
                    821:         parsed the URL, since this algorithm is only used after
                    822:         fetching the resource in the steps above -->
1.4       mike      823: 
1.1       mike      824:         <p>If the <a href="urls.html#url-path" title="url-path">&lt;path&gt;</a> component
                    825:         of the <a href="urls.html#url">URL</a> of the specified resource (after any
                    826:         redirects) matches a pattern that a <a href="infrastructure.html#plugin">plugin</a>
                    827:         supports, then let <var title="">resource type</var> be the
                    828:         type that that plugin can handle.</p>
                    829: 
                    830:         <p class="example">For example, a plugin might say that it can
                    831:         handle resources with <a href="urls.html#url-path" title="url-path">&lt;path&gt;</a> components that end with
                    832:         the four character string "<code title="">.swf</code>".</p>
                    833: 
1.159     sruby     834:         <!-- it's sad that we have to do extension sniffing. sigh. -->
                    835:         <!-- see also <embed> which has a similar step -->
1.1       mike      836: 
                    837:        </li>
                    838: 
                    839:       </ol><p class="note">It is possible for this step to finish, or for
                    840:       one of the substeps above to jump straight to the next step,
                    841:       with <var title="">resource type</var> still being unknown. In
                    842:       both cases, the next step will trigger fallback.</p>
                    843: 
                    844:      </li>
                    845: 
                    846:      <li><p><i>Handler</i>: Handle the content as given by the first
                    847:      of the following cases that matches:</p>
                    848: 
                    849:       <dl class="switch"><dt>If the <var title="">resource type</var> is not a type that
                    850:        the user agent supports, but it <em>is</em> a type that a
                    851:        <a href="infrastructure.html#plugin">plugin</a> supports</dt>
                    852: 
                    853:        <dd>
                    854: 
                    855:         <p>If <a href="#sandboxPluginObject">plugins are being
                    856:         sandboxed</a> and the plugin that supports <var title="">resource type</var> cannot be <a href="infrastructure.html#concept-plugin-secure" title="concept-plugin-secure">secured</a>, jump to the last
                    857:         step in the overall set of steps (fallback).</p>
                    858: 
                    859:         <p>Otherwise, the user agent should <a href="#object-plugin">use the plugin that supports <var title="">resource type</var></a> and pass the content of the
                    860:         resource to that <a href="infrastructure.html#plugin">plugin</a>. If the
                    861:         <a href="infrastructure.html#plugin">plugin</a> reports an error, then jump to the last
                    862:         step in the overall set of steps (fallback).</p>
                    863: 
                    864:        </dd>
                    865: 
                    866: 
                    867:        <dt>If the <var title="">resource type</var> is an <a href="infrastructure.html#xml-mime-type">XML MIME
                    868:        type</a>, or
1.159     sruby     869:        <!-- (redundant with the next one) if the <var title="">resource type</var> is HTML, or -->
1.1       mike      870:        if the <var title="">resource type</var> does not start with
                    871:        "<code>image/</code>"</dt>
                    872: 
                    873:        <dd>
                    874: 
                    875:         <p>The <code><a href="#the-object-element">object</a></code> element must be associated with a
                    876:         newly created <a href="browsers.html#nested-browsing-context">nested browsing context</a>, if it does
                    877:         not already have one.</p>
                    878: 
                    879:         <p>If the <a href="urls.html#url">URL</a> of the given resource is not
                    880:         <code><a href="urls.html#about:blank">about:blank</a></code>, the element's <a href="browsers.html#nested-browsing-context">nested browsing
1.159     sruby     881:         context</a> must then be <a href="history.html#navigate" title="navigate">navigated</a><!--DONAV object--> to that
1.1       mike      882:         resource, with <a href="history.html#replacement-enabled">replacement enabled</a>, and with the
                    883:         <code><a href="#the-object-element">object</a></code> element's document's <a href="browsers.html#browsing-context">browsing
                    884:         context</a> as the <a href="history.html#source-browsing-context">source browsing context</a>.
                    885:         (The <code title="attr-object-data"><a href="#attr-object-data">data</a></code> attribute of
                    886:         the <code><a href="#the-object-element">object</a></code> element doesn't get updated if the
                    887:         browsing context gets further navigated to other
                    888:         locations.)</p>
                    889: 
                    890:         <p>If the <a href="urls.html#url">URL</a> of the given resource <em>is</em>
                    891:         <code><a href="urls.html#about:blank">about:blank</a></code>, then, instead, the user agent must
                    892:         <a href="webappapis.html#queue-a-task">queue a task</a> to <a href="webappapis.html#fire-a-simple-event">fire a simple event</a>
                    893:         named <code title="event-load">load</code> at the
                    894:         <code><a href="#the-object-element">object</a></code> element. <span class="note">No <code title="event-load">load</code> event is fired at the
                    895:         <code><a href="urls.html#about:blank">about:blank</a></code> document itself.</span></p>
                    896: 
                    897:         <p>The <code><a href="#the-object-element">object</a></code> element <a href="rendering.html#represents">represents</a> the
                    898:         <a href="browsers.html#nested-browsing-context">nested browsing context</a>.</p>
                    899: 
                    900:         <p>If the <code title="attr-object-name"><a href="#attr-object-name">name</a></code> attribute
                    901:         is present, the <a href="browsers.html#browsing-context-name">browsing context name</a> must be set
                    902:         to the value of this attribute; otherwise, the <a href="browsers.html#browsing-context-name">browsing
                    903:         context name</a> must be set to the empty string.</p>
                    904: 
                    905:         <p class="note">In certain situations, e.g. if the resource
                    906:         was <a href="urls.html#fetch" title="fetch">fetched</a> from an
                    907:         <a href="offline.html#application-cache">application cache</a> but it is an HTML file with a
                    908:         <code title="attr-html-manifest"><a href="the-html-element.html#attr-html-manifest">manifest</a></code> attribute
                    909:         that points to a different <a href="offline.html#concept-appcache-manifest" title="concept-appcache-manifest">application cache
                    910:         manifest</a>, the <a href="history.html#navigate" title="navigate">navigation</a>
                    911:         of the <a href="browsers.html#browsing-context">browsing context</a> will be restarted so as
                    912:         to load the resource afresh from the network or a different
                    913:         <a href="offline.html#application-cache">application cache</a>. Even if the resource is then
                    914:         found to have a different type, it is still used as part of a
                    915:         <a href="browsers.html#nested-browsing-context">nested browsing context</a>: only the
                    916:         <a href="history.html#navigate">navigate</a> algorithm is restarted, not this
                    917:         <code><a href="#the-object-element">object</a></code> algorithm.</p>
                    918: 
1.159     sruby     919:         <!-- note that malformed XML files don't cause fallback -->
1.1       mike      920: 
                    921:        </dd>
                    922: 
                    923: 
                    924:        <dt>If the <var title="">resource type</var> starts with
                    925:        "<code>image/</code>", and support for images has not been
                    926:        disabled</dt>
                    927: 
                    928:        <dd>
                    929: 
                    930:         <p>Apply the <a href="urls.html#content-type-sniffing:-image" title="content-type sniffing: image">image
                    931:         sniffing</a> rules to determine the type of the image.</p>
                    932: 
                    933:         <p>The <code><a href="#the-object-element">object</a></code> element <a href="rendering.html#represents">represents</a> the
                    934:         specified image. The image is not a <a href="browsers.html#nested-browsing-context">nested browsing
                    935:         context</a>.</p>
                    936: 
                    937:         <p>If the image cannot be rendered, e.g. because it is
                    938:         malformed or in an unsupported format, jump to the last step
                    939:         in the overall set of steps (fallback).</p>
                    940: 
                    941:        </dd>
                    942: 
                    943: 
                    944:        <dt>Otherwise</dt>
                    945: 
                    946:        <dd>
                    947: 
                    948:         <p>The given <var title="">resource type</var> is not
                    949:         supported. Jump to the last step in the overall set of steps
                    950:         (fallback).</p>
                    951: 
                    952:         <p class="note">If the previous step ended with the <var title="">resource type</var> being unknown, this is the case
                    953:         that is triggered.</p>
                    954: 
                    955:        </dd>
                    956: 
                    957:       </dl></li>
                    958: 
                    959:      <li><p>The element's contents are not part of what the
                    960:      <code><a href="#the-object-element">object</a></code> element represents.</p>
                    961: 
                    962:      </li><li>
                    963: 
                    964:       <p>Once the resource is completely loaded, <a href="webappapis.html#queue-a-task">queue a
                    965:       task</a> to <a href="webappapis.html#fire-a-simple-event">fire a simple event</a> named <code title="event-load">load</code> at the element.</p>
                    966: 
1.159     sruby     967:       <p>The <a href="webappapis.html#task-source">task source</a> for this task<!--tasks mentioned
                    968:       in this section--> is the <a href="webappapis.html#dom-manipulation-task-source">DOM manipulation task
1.1       mike      969:       source</a>.</p>
                    970: 
                    971:      </li>
                    972: 
                    973:     </ol></li>
                    974: 
                    975:    <li><p>If the <code title="attr-object-data"><a href="#attr-object-data">data</a></code> attribute
                    976:    is absent but the <code title="attr-object-type"><a href="#attr-object-type">type</a></code>
                    977:    attribute is present, and the user agent can find a
                    978:    <a href="infrastructure.html#plugin">plugin</a> suitable according to the value of the <code title="attr-object-type"><a href="#attr-object-type">type</a></code> attribute, and either <a href="#sandboxPluginObject">plugins aren't being sandboxed</a> or
                    979:    the <a href="infrastructure.html#plugin">plugin</a> can be <a href="infrastructure.html#concept-plugin-secure" title="concept-plugin-secure">secured</a>, then that
                    980:    <a href="infrastructure.html#plugin">plugin</a> <a href="#object-plugin">should be used</a>. If
                    981:    these conditions cannot be met, or if the <a href="infrastructure.html#plugin">plugin</a>
                    982:    reports an error, jump to the next step (fallback).</p></li>
                    983: 
                    984:    <li><p>(Fallback.) The <code><a href="#the-object-element">object</a></code> element
                    985:    <a href="rendering.html#represents">represents</a> the element's children, ignoring any
                    986:    leading <code><a href="the-param-element.html#the-param-element">param</a></code> element children. This is the element's
                    987:    <a href="content-models.html#fallback-content">fallback content</a>. If the element has an instantiated
                    988:    <a href="infrastructure.html#plugin">plugin</a>, then unload it.</p></li>
                    989: 
                    990:   </ol><p id="object-plugin">When the algorithm above instantiates a
                    991:   <a href="infrastructure.html#plugin">plugin</a>, the user agent should pass to the
                    992:   <a href="infrastructure.html#plugin">plugin</a> used the names and values of all the attributes
                    993:   on the element, in the order they were added to the element, with
                    994:   the attributes added by the parser being ordered in source order,
                    995:   followed by a parameter named "PARAM" whose value is null,
                    996:   followed by all the names and values of <a href="the-param-element.html#concept-param-parameter" title="concept-param-parameter">parameters</a> given by
                    997:   <code><a href="the-param-element.html#the-param-element">param</a></code> elements that are children of the
                    998:   <code><a href="#the-object-element">object</a></code> element, in <a href="infrastructure.html#tree-order">tree order</a>. If the
                    999:   <a href="infrastructure.html#plugin">plugin</a> supports a scriptable interface, the
                   1000:   <code><a href="#htmlobjectelement">HTMLObjectElement</a></code> object representing the element
                   1001:   should expose that interface. The <code><a href="#the-object-element">object</a></code> element
                   1002:   <a href="rendering.html#represents">represents</a> the <a href="infrastructure.html#plugin">plugin</a>. The
                   1003:   <a href="infrastructure.html#plugin">plugin</a> is not a nested <a href="browsers.html#browsing-context">browsing
                   1004:   context</a>.</p>
                   1005: 
                   1006:   <p id="sandboxPluginObject">Plugins are considered sandboxed for the
1.159     sruby    1007:   purpose of an <code><a href="#the-object-element">object</a></code> element if the <a href="browsers.html#sandboxed-plugins-browsing-context-flag">sandboxed
1.108     mike     1008:   plugins browsing context flag</a> is set on the
1.159     sruby    1009:   <code><a href="#the-object-element">object</a></code> element's <code><a href="dom.html#document">Document</a></code>'s <a href="browsers.html#active-sandboxing-flag-set">active
1.108     mike     1010:   sandboxing flag set</a>.</p>
1.1       mike     1011: 
                   1012:   <p>Due to the algorithm above, the contents of <code><a href="#the-object-element">object</a></code>
                   1013:   elements act as <a href="content-models.html#fallback-content">fallback content</a>, used only when
                   1014:   referenced resources can't be shown (e.g. because it returned a 404
                   1015:   error). This allows multiple <code><a href="#the-object-element">object</a></code> elements to be
                   1016:   nested inside each other, targeting multiple user agents with
                   1017:   different capabilities, with the user agent picking the first one it
                   1018:   supports.</p>
                   1019: 
                   1020:   <p>Whenever the <code title="attr-object-name"><a href="#attr-object-name">name</a></code> attribute
                   1021:   is set, if the <code><a href="#the-object-element">object</a></code> element has a nested
                   1022:   <a href="browsers.html#browsing-context">browsing context</a>, its <a href="browsers.html#browsing-context-name" title="browsing context
                   1023:   name">name</a> must be changed to the new value. If the attribute
                   1024:   is removed, if the <code><a href="#the-object-element">object</a></code> element has a <a href="browsers.html#browsing-context">browsing
                   1025:   context</a>, the <a href="browsers.html#browsing-context-name">browsing context name</a> must be set
                   1026:   to the empty string.</p>
                   1027: 
1.85      mike     1028:   </div>
                   1029: 
                   1030:   <p>The <code title="attr-hyperlink-usemap"><a href="image-maps.html#attr-hyperlink-usemap">usemap</a></code> attribute,
1.1       mike     1031:   if present while the <code><a href="#the-object-element">object</a></code> element represents an
                   1032:   image, can indicate that the object has an associated <a href="image-maps.html#image-map">image
                   1033:   map</a>. <span class="impl">The attribute must be ignored if the
1.85      mike     1034:   <code><a href="#the-object-element">object</a></code> element doesn't represent an image.</span></p>
                   1035: 
                   1036:   <p>The <code title="attr-fae-form"><a href="association-of-controls-and-forms.html#attr-fae-form">form</a></code> attribute is used to
1.1       mike     1037:   explicitly associate the <code><a href="#the-object-element">object</a></code> element with its
1.85      mike     1038:   <a href="association-of-controls-and-forms.html#form-owner">form owner</a>.</p>
                   1039: 
                   1040:   <div class="impl">
1.1       mike     1041: 
                   1042:   <p><strong>Constraint validation</strong>: <code><a href="#the-object-element">object</a></code>
                   1043:   elements are always <a href="constraints.html#barred-from-constraint-validation">barred from constraint
                   1044:   validation</a>.</p>
                   1045: 
1.85      mike     1046:   </div>
                   1047: 
                   1048:   <p>The <code><a href="#the-object-element">object</a></code> element supports <a href="dimension-attributes.html#dimension-attributes">dimension
                   1049:   attributes</a>.</p>
                   1050: 
                   1051:   <div class="impl">
1.1       mike     1052: 
                   1053:   <p>The IDL attributes <dfn id="dom-object-data" title="dom-object-data"><code>data</code></dfn>, <dfn id="dom-object-type" title="dom-object-type"><code>type</code></dfn> and <dfn id="dom-object-name" title="dom-object-name"><code>name</code></dfn> each must
                   1054:   <a href="common-dom-interfaces.html#reflect">reflect</a> the respective content attributes of the same
                   1055:   name. The <dfn id="dom-object-typemustmatch" title="dom-object-typeMustMatch"><code>typeMustMatch</code></dfn>
                   1056:   IDL attribute must <a href="common-dom-interfaces.html#reflect">reflect</a> the <code title="attr-object-typemustmatch"><a href="#attr-object-typemustmatch">typemustmatch</a></code> content
                   1057:   attribute. The <dfn id="dom-object-usemap" title="dom-object-useMap"><code>useMap</code></dfn> IDL attribute
                   1058:   must <a href="common-dom-interfaces.html#reflect">reflect</a> the <code title="attr-object-usemap">usemap</code> content attribute.</p>
                   1059: 
                   1060:   <p>The <dfn id="dom-object-contentdocument" title="dom-object-contentDocument"><code>contentDocument</code></dfn>
                   1061:   IDL attribute must return the <code><a href="dom.html#document">Document</a></code> object of the
                   1062:   <a href="browsers.html#active-document">active document</a> of the <code><a href="#the-object-element">object</a></code> element's
                   1063:   <a href="browsers.html#nested-browsing-context">nested browsing context</a>, if it has one; otherwise, it
                   1064:   must return null.</p>
                   1065: 
                   1066:   <p>The <dfn id="dom-object-contentwindow" title="dom-object-contentWindow"><code>contentWindow</code></dfn>
                   1067:   IDL attribute must return the <code><a href="browsers.html#windowproxy">WindowProxy</a></code> object of the
                   1068:   <code><a href="#the-object-element">object</a></code> element's <a href="browsers.html#nested-browsing-context">nested browsing context</a>,
                   1069:   if it has one; otherwise, it must return null.</p>
                   1070: 
                   1071:   <p>The <code title="dom-cva-willValidate"><a href="constraints.html#dom-cva-willvalidate">willValidate</a></code>, <code title="dom-cva-validity"><a href="constraints.html#dom-cva-validity">validity</a></code>, and <code title="dom-cva-validationMessage"><a href="constraints.html#dom-cva-validationmessage">validationMessage</a></code>
1.184     sruby    1072:   attributes, and the <code title="dom-cva-checkValidity"><a href="constraints.html#dom-cva-checkvalidity">checkValidity()</a></code> and <code title="dom-cva-setCustomValidity"><a href="constraints.html#dom-cva-setcustomvalidity">setCustomValidity()</a></code>
1.1       mike     1073:   methods, are part of the <a href="constraints.html#the-constraint-validation-api">constraint validation API</a>. The
                   1074:   <code title="dom-fae-form"><a href="association-of-controls-and-forms.html#dom-fae-form">form</a></code> IDL attribute is part of the
                   1075:   element's forms API.</p>
                   1076: 
1.34      mike     1077:   <p>All <code><a href="#the-object-element">object</a></code> elements have a <dfn id="dom-object-caller" title="dom-object-caller">legacy caller operation</dfn>. If the
                   1078:   <code><a href="#the-object-element">object</a></code> element has an instantiated <a href="infrastructure.html#plugin">plugin</a>
                   1079:   that supports a scriptable interface that defines a legacy caller
                   1080:   operation, then that must be the behavior of the object's legacy
                   1081:   caller operation. Otherwise, the object's legacy caller operation
                   1082:   must be to throw a <code><a href="infrastructure.html#notsupportederror">NotSupportedError</a></code> exception.</p>
                   1083: 
1.85      mike     1084:   </div>
                   1085: 
                   1086:   <div class="example">
1.1       mike     1087: 
                   1088:    <p>In the following example, a Java applet is embedded in a page
                   1089:    using the <code><a href="#the-object-element">object</a></code> element. (Generally speaking, it is
                   1090:    better to avoid using applets like these and instead use native
                   1091:    JavaScript and HTML to provide the functionality, since that way
                   1092:    the application will work on all Web browsers without requiring a
                   1093:    third-party plugin. Many devices, especially embedded devices, do
                   1094:    not support third-party technologies like Java.)</p>
                   1095: 
                   1096:    <pre>&lt;figure&gt;
                   1097:  &lt;object type="application/x-java-applet"&gt;
                   1098:   &lt;param name="code" value="MyJavaClass"&gt;
                   1099:   &lt;p&gt;You do not have Java available, or it is disabled.&lt;/p&gt;
                   1100:  &lt;/object&gt;
                   1101:  &lt;figcaption&gt;My Java Clock&lt;/figcaption&gt;
                   1102: &lt;/figure&gt;</pre>
                   1103: 
1.85      mike     1104:   </div>
                   1105: 
                   1106:   <div class="example">
1.1       mike     1107: 
                   1108:    <p>In this example, an HTML page is embedded in another using the
                   1109:    <code><a href="#the-object-element">object</a></code> element.</p>
                   1110: 
                   1111:    <pre>&lt;figure&gt;
                   1112:  &lt;object data="clock.html"&gt;&lt;/object&gt;
                   1113:  &lt;figcaption&gt;My HTML Clock&lt;/figcaption&gt;
                   1114: &lt;/figure&gt;</pre>
                   1115: 
1.85      mike     1116:   </div>
                   1117: 
                   1118:   <div class="example">
1.1       mike     1119: 
                   1120:    <p>The following example shows how a plugin can be used in HTML (in
                   1121:    this case the Flash plugin, to show a video file). Fallback is
                   1122:    provided for users who do not have Flash enabled, in this case
                   1123:    using the <code><a href="the-video-element.html#the-video-element">video</a></code> element to show the video for those
                   1124:    using user agents that support <code><a href="the-video-element.html#the-video-element">video</a></code>, and finally
                   1125:    providing a link to the video for those who have neither Flash nor
                   1126:    a <code><a href="the-video-element.html#the-video-element">video</a></code>-capable browser.</p>
                   1127: 
                   1128:    <pre>&lt;p&gt;Look at my video:
                   1129:  &lt;object type="application/x-shockwave-flash"&gt;
                   1130:   &lt;param name=movie value="http://video.example.com/library/watch.swf"&gt;
                   1131:   &lt;param name=allowfullscreen value=true&gt;
                   1132:   &lt;param name=flashvars value="http://video.example.com/vids/315981"&gt;
                   1133:   &lt;video controls src="http://video.example.com/vids/315981"&gt;
                   1134:    &lt;a href="http://video.example.com/vids/315981"&gt;View video&lt;/a&gt;.
                   1135:   &lt;/video&gt;
                   1136:  &lt;/object&gt;
                   1137: &lt;/p&gt;</pre>
                   1138: 
1.85      mike     1139:   </div>
                   1140: 
                   1141: 
                   1142: 
                   1143:   </body></html>

Webmaster