Open Bug 1166581 Opened 8 years ago Updated 4 months ago

Implement the `scripting` media feature from Media Queries Level 5


(Core :: CSS Parsing and Computation, enhancement)





(Reporter: mozilla, Unassigned, Mentored)


(Blocks 1 open bug, )


(Keywords: dev-doc-needed)

See Also: → 1171900
Ever confirmed: true
Summary: Implement the `scripting` media feature from Media Queries Level 4 → Implement the `scripting` media feature from Media Queries Level 5

I think this is already implemented, but no statement has been given about its status.

According to the WHATWG spec, the @media (scripting) at-rule controls if <noscript> tags can appear. This is now fully supported in Firefox.

How to check:

  1. Copy-paste the following to the <body> of an HTML document:
@media not (scripting) {
    .only-js {
        display: none !important;
<div class="only-js">This text will disappear if JavaScript is disabled.</div>
  1. Disable JavaScript through the inspector.
  2. This media argument works if the div disappears.

Sorry, but I forgot to put my navigator.userAgent here: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0.

Nope, the media query scripting actually does not work yet.

Type: defect → enhancement

This should be reasonably straight-forward to implement.

This is what controls noscript behavior:

We could reasonably enough just call that from the media query code or so. Media queries are implemented here.

Mentor: emilio
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.