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

Setting mediaText in MediaList Interface

From: Blaine Brodie <bbrodie@savagesoftware.com>
Date: Fri, 05 May 2000 11:20:03 -0700
Message-id: <fc.0085846d000052330085846d00005233.523f@savagesoftware.com>
To: www-dom@w3.org
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.  

However, the CSSImportRule interface contains a mediaList attribute and it
doesn't make sense to allow the following insertion,
[assume I have an import rule, importRule]
	importRule.getMedia().setMediaText("print { h1 {color: blue} }")
because an import rule cannot contain a rule.

Thanks for the clarification,
Blaine
Received on Friday, 5 May 2000 14:19:54 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:47 GMT