Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add <object> element #1438

Merged
merged 7 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
draft_date: 2024-06-05
name: <object>
description: The `<object>` element TODO.
spec:
- https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-object-element
- https://html.spec.whatwg.org/multipage/obsolete.html#param
description: The `<object>` element represents an external resource such as an external plugin or nested browsing context.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"browsing context" is spec language that I wouldn't expect most web developers to be able to parse. Avoiding that and elaborating on the real reason this element exists:

Suggested change
description: The `<object>` element represents an external resource such as an external plugin or nested browsing context.
description: The `<object>` element embeds an external resource such as a PDF or SVG document. It was historically used for plugins such as Shockwave Flash.

@ddbeck can you review so we don't have more rounds of description review after this?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also consider that the description should work for <embed>. The word "embeds" would make it a bit circular, but I can't come up with anything better. Back to "represents"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Building on @foolip's description, I'd make one minor tweak to avoid the word embed.

The <object> element inserts an external resource such as a PDF or SVG file into the document. It was historically used for plugins such as Shockwave Flash.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like @foolip's original, though <embed> will need to say "represents." It's not perfectly consistent, but produces a good outcome: you search for "embed" and you'll get both features.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

produces a good outcome: you search for "embed" and you'll get both features

I'm unsure why would that be a good outcome? My expectation of searching for "embed" would only return the <embed> element.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think because they're closely related and easily confused (at least they are for me)—if I searched for one I'd appreciate being reminded of the other. But I don't have my heart set on this either; "represents" is fine too.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I've updated the description to keep represents and use the rest of @foolip's description.

spec: https://html.spec.whatwg.org/multipage/iframe-embed-object.html#the-object-element
group: html
status:
compute_from: html.elements.object
compat_features:
- api.HTMLObjectElement
- api.HTMLObjectElement.contentDocument
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@

status:
baseline: high
baseline_low_date: 2019-09-19
baseline_high_date: 2022-03-19
baseline_low_date: 2015-07-29
baseline_high_date: 2018-01-29
support:
chrome: "53"
chrome_android: "53"
edge: "17"
firefox: "22"
firefox_android: "22"
safari: "13"
safari_ios: "13"
chrome: "1"
chrome_android: "18"
edge: "12"
firefox: "1"
firefox_android: "4"
safari: "3"
safari_ios: "2"
compat_features:
# baseline: high
# baseline_low_date: 2015-07-29
Expand All @@ -34,6 +34,7 @@ compat_features:
- api.HTMLObjectElement.type
- api.HTMLObjectElement.width

# ⬇️ Same status as overall feature ⬇️
# baseline: high
# baseline_low_date: 2015-07-29
# baseline_high_date: 2018-01-29
Expand Down Expand Up @@ -66,7 +67,6 @@ compat_features:
# safari_ios: "1"
- api.HTMLObjectElement.getSVGDocument

# ⬇️ Same status as overall feature ⬇️
# baseline: high
# baseline_low_date: 2019-09-19
# baseline_high_date: 2022-03-19
Expand Down