Re: Extending CSSOM Views matchMedium with callback

2010-05-11 Thread Anne van Kesteren
On Mon, 10 May 2010 19:56:41 +0200, L. David Baron dba...@dbaron.org wrote: On Monday 2010-05-10 10:27 -0700, Simon Fraser wrote: It feels to me like the correct solution would be enhance CSS OM somehow to allow authors to attach event listeners to CSSMediaRules somehow, so they can get

Re: Extending CSSOM Views matchMedium with callback

2010-05-11 Thread Anne van Kesteren
On Mon, 10 May 2010 19:47:42 +0200, João Eiras jo...@opera.com wrote: Should be addEventListener(mediaChanged, listener, false); There is already an event model, and it would just require a new event type. A generic event is not a good idea in my opinion. The more media features we add

Re: Extending CSSOM Views matchMedium with callback

2010-05-11 Thread João Eiras
On Tue, 11 May 2010 08:47:27 +0200, Anne van Kesteren ann...@opera.com wrote: On Mon, 10 May 2010 19:47:42 +0200, João Eiras jo...@opera.com wrote: Should be addEventListener(mediaChanged, listener, false); There is already an event model, and it would just require a new event type. A

Extending CSSOM Views matchMedium with callback

2010-05-10 Thread Luiz Agostini
The consensus on the W3C Extending CSSOM Views matchMedium with callbacks [1] mailing list was that instead of adding individual DOM events for changes to media features, we should instead make it possible to get notified when a user defined media query has changed. The idea was making it

Re: Extending CSSOM Views matchMedium with callback

2010-05-10 Thread L. David Baron
On Friday 2010-05-07 15:31 -0300, Luiz Agostini wrote: The consensus on the W3C Extending CSSOM Views matchMedium with callbacks [1] mailing list was that instead of adding individual DOM events for changes to media features, we should instead make it possible to get notified when a user

Re: Extending CSSOM Views matchMedium with callback

2010-05-10 Thread Kenneth Christiansen
I wonder if it makes sense to have another method for adding the listener instead of abusing the already existing matchMedium. For instance, calling matchMedium is going to evaluate the expression, which is not really necessary. Kenneth On Mon, May 10, 2010 at 12:48 PM, L. David Baron

Re: Extending CSSOM Views matchMedium with callback

2010-05-10 Thread Simon Fraser
On May 10, 2010, at 8:48 AM, L. David Baron wrote: On Friday 2010-05-07 15:31 -0300, Luiz Agostini wrote: The consensus on the W3C Extending CSSOM Views matchMedium with callbacks [1] mailing list was that instead of adding individual DOM events for changes to media features, we should

Re: Extending CSSOM Views matchMedium with callback

2010-05-10 Thread Kenneth Christiansen
Hi Simon, So what you are suggesting is a kind of document.addMediaRuleListener(mediaquery, listener) etc? I think that should be quite easy to implement. Kenneth On Mon, May 10, 2010 at 2:27 PM, Simon Fraser s...@me.com wrote: On May 10, 2010, at 8:48 AM, L. David Baron wrote: On Friday

Re: Extending CSSOM Views matchMedium with callback

2010-05-10 Thread Kenneth Christiansen
Ola Joao, That would mean that the user would have to manually call all matchMedium queries the user is interested in to find out which one changed, without us being able to optimize this by not redoing the parsing of the queries etc. Att, Kenneth On Mon, May 10, 2010 at 2:47 PM, João Eiras

Re: Extending CSSOM Views matchMedium with callback

2010-05-10 Thread L. David Baron
On Monday 2010-05-10 10:27 -0700, Simon Fraser wrote: This simple callback-based mechanism suffers from various problems (of the type that add/removeEventListener were designed to solve): 1. Unclear behavior when calling matchMedium() a second time for the same query, with a different

Re: Extending CSSOM Views matchMedium with callback

2010-05-10 Thread João Eiras
On Mon, 10 May 2010 19:53:52 +0200, Kenneth Christiansen kenneth.christian...@openbossa.org wrote: Ola Joao, That would mean that the user would have to manually call all matchMedium queries the user is interested in to find out which one changed, without us being able to optimize this by

Re: Extending CSSOM Views matchMedium with callback

2010-05-10 Thread Kenneth Christiansen
Though it will probably become more used due to the media features, such as (orientation:...), (view-mode:...) etc. especially on mobile devices. Anyway, I agree that it is not a bottleneck for the time being. Kenneth On Mon, May 10, 2010 at 3:11 PM, João Eiras jo...@opera.com wrote: On Mon,

Re: Extending CSSOM Views matchMedium with callback Re: CSS WG comments on View Modes Media Feature spec

2010-04-13 Thread Arthur Barstow
All - FYI, I think the next steps here are to hash out some process related issues so I started a related discussion on the public- hypertext-cg mail list: http://lists.w3.org/Archives/Public/public-hypertext-cg/2010AprJun/ 0001.html -Art Barstow On Apr 12, 2010, at 4:12 PM, ext Marcos

Re: Extending CSSOM Views matchMedium with callback

2010-04-13 Thread Anne van Kesteren
On Tue, 13 Apr 2010 15:39:47 +0200, Arthur Barstow art.bars...@nokia.com wrote: All - FYI, I think the next steps here are to hash out some process related issues so I started a related discussion on the public- hypertext-cg mail list:

Re: Extending CSSOM Views matchMedium with callback Re: CSS WG comments on View Modes Media Feature spec

2010-04-12 Thread Simon Fraser
On Apr 12, 2010, at 2:25 AM, Marcos Caceres wrote: On Fri, Mar 26, 2010 at 2:25 PM, Marcos Caceres marc...@opera.com wrote: On Thu, Mar 18, 2010 at 4:02 PM, Simon Fraser s...@me.com wrote: On Mar 18, 2010, at 6:44 AM, Marcos Caceres wrote: 4. all these queries could/should have an

Re: Extending CSSOM Views matchMedium with callback Re: CSS WG comments on View Modes Media Feature spec

2010-04-12 Thread Marcos Caceres
On Apr 12, 2010, at 8:50 PM, Simon Fraser s...@me.com wrote: On Apr 12, 2010, at 2:25 AM, Marcos Caceres wrote: On Fri, Mar 26, 2010 at 2:25 PM, Marcos Caceres marc...@opera.com wrote: On Thu, Mar 18, 2010 at 4:02 PM, Simon Fraser s...@me.com wrote: On Mar 18, 2010, at 6:44 AM, Marcos