W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2000

Re: Setting mediaText in MediaList Interface

From: Philippe Le Hegaret <plh@w3.org>
Date: Sat, 06 May 2000 14:35:41 -0400
Message-ID: <391465FD.B2F93F73@w3.org>
To: Blaine Brodie <bbrodie@savagesoftware.com>
CC: www-dom@w3.org
Blaine Brodie wrote:
> Can you please tell me what is the expected behavior in the following case:
> I have a MediaList named 'media'  and I say
>         media.setMediaText("print { h1 {color: blue} }" )
> will this generate a SYNTAX_ERR exception?
> According to the CSS2 grammar this is legal syntax
>         [media: MEDIA_SYM S* medium [ ',' S* medium ]* '{' S* ruleset* '}' S*]
> so I wouldn't expect such an exception.

No, you're mixing media rules and lists of media descriptor. 

The MediaList interface represents the list of media descriptor and,
for CSS2, has the following syntax:
 S* medium [ ',' S* medium ]*

The proposal from Johnny Stenback seems reasonnable to me:

 If the medium contains characters that are invalid in medium names in the
 underlying style language.

In others words, for a MediaList object within a StyleSheet with type
'text/css', the syntax of the list of media descriptor must follow
the CSS syntax.

Received on Saturday, 6 May 2000 14:37:34 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:07 UTC