Skip to main content

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 not type and Content-Type value are required to be in sync for the resource to be used. A good idea to use when the data value comes from untrusted origins to prevent malicious attacks. Need to have both data and type attributes to use this.

  • name: of nested browsing context

  • usemap: name of (optional) image map

  • form: can use to tie object to a form element

  • width

  • height.

  • ALL the element categories! (Well, almost).

  • Can use application, document, img, or presentation ARIA roles.

  • object element must have data or/and a type attribute.

  • There are a lot of events that trigger a task determining what the object element 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 object element, when determined to be a plugin, are passed to said plugin in the order they were added.

  • Contents of object elements 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.

Responses

My blog uses Webmentions. Responses from Mastodon and other sites that send Webmentions will show up here.

No Webmentions have been sent to this post yet.