Day 88 of 100DaysOfSpec, the object element
I am reading and taking notes on the HTML specifications for 100 days as part of #The100DayProject. Read the initial intent/backstory. I am a Microsoft employee but all opinions, comments, etc on this site are my own. I do not speak on behalf of my employer, and thus no comments should be taken as representative of Microsoft's official opinion of the spec. Subsections not listed below were read without comment.
Currently reading in 4.7.4 The object element
“The object element can represent an external resource, which, depending on the type of the resource, will either be treated as an image, as a nested browsing context, or as an external resource to be processed by a plugin.”
Attributes besides globals:
-
data: resource address -
type: of resource (MIME type) -
typemustmatch: boolean for whether or nottypeand Content-Type value are required to be in sync for the resource to be used. A good idea to use when thedatavalue comes from untrusted origins to prevent malicious attacks. Need to have bothdataandtypeattributes to use this. -
name: of nested browsing context -
usemap: name of (optional) image map -
form: can use to tieobjectto aformelement -
width -
height. -
ALL the element categories! (Well, almost).
-
Can use
application,document,img, orpresentationARIA roles. -
objectelement must havedataor/and atypeattribute. -
There are a lot of events that trigger a task determining what the
objectelement represents. Could be good to look at in the future when trying to keep a page performant? -
“The task source for this task is the DOM manipulation task source.” Ahhh I haven’t gotten to this section of the spec yet! I’m sure this has some sort of interesting implication for perf or something.
-
Attributes on the
objectelement, when determined to be a plugin, are passed to said plugin in the order they were added. -
Contents of
objectelements are used as fallback content if and only if the referenced resource isn’t available (404 error, etc). -
Plugins aren’t a nested browsing context.