W3C home > Mailing lists > Public > www-style@w3.org > August 2010

Re: [cssom-view] comments on StyleMedia interface

From: Anne van Kesteren <annevk@opera.com>
Date: Wed, 18 Aug 2010 10:29:40 +0200
To: "Simon Fraser" <smfr@me.com>, "L. David Baron" <dbaron@dbaron.org>
Cc: www-style@w3.org
Message-ID: <op.vhmkjqj064w2qv@anne-van-kesterens-macbook-pro.local>
On Wed, 18 Aug 2010 01:03:15 +0200, L. David Baron <dbaron@dbaron.org>  
wrote:
> Yes, and also the whole point of the proposal was to avoid having to
> define when two media queries were equal.

Ok so we will have

window.matchMediaQuery(single_query)

which returns a new object each time it is invoked that implements the  
following interface

interface MediaQuery {
   // canonicalized form of the media query
   readonly attribute DOMString query;
   // whether the media query matches currently
   readonly attribute boolean result;
   void addListener(MediaQueryChangeListener listener);
   void removeListener(MediaQueryChangeListener listener);
};

If addListener does not guarantee uniqueness removeListener needs to  
remove from the end of the list. Is that ok?

styleMedia/StyleMedia will be nuked.


-- 
Anne van Kesteren
http://annevankesteren.nl/
Received on Wednesday, 18 August 2010 08:30:23 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:30 GMT