Closed Bug 1706179 Opened 3 years ago Closed 2 years ago

Add support for <meta media> (for <meta name=theme-color>)

Categories

(Core :: DOM: Core & HTML, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
106 Branch
Tracking Status
firefox106 --- fixed

People

(Reporter: eoconnor, Assigned: emilio)

References

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.2 Safari/605.1.15

Steps to reproduce:

Hmm, we don't seem to do anything (anymore?) with this metatag. What does WebKit do with it?

See Also: → 1013913

(In reply to Emilio Cobos Álvarez (:emilio) from comment #2)

What does WebKit do with it?

WebKit embedders can use WebKit API to determine the current page's theme color, and then what any particular WebKit embedder does with that information (if anything) is up to them.

Severity: -- → S3
Priority: -- → P3

We just received a webcompat.com report which reveals that a Blazor app, collanon.app, us struggling to implement proper theming without this, as the libraries they use re-create the meta elements as the page loads and lose media attributes in the process (due to assuming media property is implemented, and not thinking to fall back on getAttribute). I've filed a bug with that library, but it would be good to implement this in case other sites are relying on the property likewise.

I mean, implementing media as a reflected attribute is trivial. Comment 0 was more about the theme-color stuff but I guess since we don't do anything with it morphing this to the dom API seems fine.

Flags: needinfo?(emilio)
Assignee: nobody → emilio
Flags: needinfo?(emilio)

We don't use it because we don't use theme-color, but some sites are
starting to rely on it (comment 4) and it is trivial to support.

Keywords: dev-doc-needed

Backed out for causing wpt failures on reflection-metadata.html . CLOSED TREE
Backout link
Push with failures
Link to failure log
Failure line : TEST-UNEXPECTED-PASS | /html/dom/reflection-metadata.html | meta.media: typeof IDL attribute - expected FAIL

Flags: needinfo?(emilio)
Flags: needinfo?(emilio)
Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch

Hi Emilio, do you consider this is noticeable enough to be in the release note? If so, would be great to have your relnote-firefox ? nomination. :)

Flags: needinfo?(emilio)

Probably not, this is a very simple API / attribute reflection.

Flags: needinfo?(emilio)

Hi all, I'm having a look through because dev-doc-needed has been added. It looks like this is not usable from a webdev perspective, is that correct?

My understanding that adding browser compatibility to show Fx support in 106 here would be misleading. Can you confirm that?

If that's the case, is there anything else outstanding for documentation that I can provide? Thanks.

HTMLMetaElement.media is usable, and is what should get documented.

(Which is missing here afaict)

Thanks, Emilio. Tracking the related documentation tasks for this here: https://github.com/mdn/content/issues/20928

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: