On Apr 15, 2010, at 10:47 , Marcos Caceres wrote:
> On Apr 14, 2010, at 10:18 PM, Kenneth Christiansen 
> <kenneth.christian...@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/




Reply via email to