This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 22308 - Should null and undefined stringify as "null" and "undefined" for media queries?
Summary: Should null and undefined stringify as "null" and "undefined" for media queries?
Status: RESOLVED FIXED
Alias: None
Product: CSS
Classification: Unclassified
Component: CSSOM (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Simon Pieters
QA Contact: public-css-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-07 12:42 UTC by Rune Lillesveen
Modified: 2013-08-08 13:26 UTC (History)
1 user (show)

See Also:


Attachments

Description Rune Lillesveen 2013-06-07 12:42:05 UTC
The MediaList interface contains no TreatNullAs for any of the DOMStrings. I was wondering if that was intentional. WebKit/Blink/Gecko all treat null as empty string when setting mediaText, at least.

http://dev.w3.org/csswg/cssom/#the-medialist-interface

[[
interface MediaList {
  stringifier attribute DOMString mediaText;
  readonly attribute unsigned long length;
  getter DOMString item(unsigned long index);
  void appendMedium(DOMString medium);
  void deleteMedium(DOMString medium);
};
]]
Comment 1 Rune Lillesveen 2013-06-07 12:46:35 UTC
(In reply to comment #0)
> The MediaList interface contains no TreatNullAs for any of the DOMStrings. I
> was wondering if that was intentional. WebKit/Blink/Gecko all treat null as
> empty string when setting mediaText, at least.

But undefined is stringified as "undefined" and becomes a media type.
Comment 2 Simon Pieters 2013-06-10 13:57:16 UTC
https://dvcs.w3.org/hg/csswg/rev/0b537683d8a3