- From: Robin Berjon <robin@berjon.com>
- Date: Thu, 15 Apr 2010 13:39:58 +0200
- To: Marcos Caceres <marcosc@opera.com>
- Cc: Kenneth Christiansen <kenneth.christiansen@openbossa.org>, Simon Fraser <smfr@me.com>, Daniel Glazman <daniel.glazman@disruptive-innovations.com>, "public-webapps@w3.org" <public-webapps@w3.org>, "www-style@w3.org" <www-style@w3.org>, Anne van Kesteren <annevk@opera.com>, Arthur Barstow <art.barstow@nokia.com>
On Apr 15, 2010, at 10:47 , Marcos Caceres wrote: > On Apr 14, 2010, at 10:18 PM, Kenneth Christiansen <kenneth.christiansen@openbossa.org> wrote: >> Oi Marcos, >> >>> # 3.2. Media Type Changed Event Types >>> styleMedia.matchMedium("screen", function() { alert("no longer screen!") }) >> >> So you want it to call back when the match is no longer true? or did >> you mean "not screen" ? > > Could be either, I guess. How about: boolean matchMedium (DOMString mediaQ, optional Function trueCB, optional Function falseCB); Which would lead to: styleMedia.matchMedium("screen", function () { alert("Now screen!"); }, function () { alert("No longer screen!"); }); ? -- Robin Berjon - http://berjon.com/
Received on Thursday, 15 April 2010 11:40:32 UTC