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

Re(2): Missing Exception in MediaList interface

From: Blaine Brodie <bbrodie@savagesoftware.com>
Date: Thu, 04 May 2000 13:41:30 -0700
Message-id: <fc.0085846d0000514a0085846d00005097.514d@savagesoftware.com>
To: www-dom@w3.org
> > > > In the DOM 2 spec [07/03/2000] under Section 4.2 the MediumList's
> > > > interface "append" method [now "appendMedium" I believe] takes in a
> > > > DOMString and throws a NO_MODIFICATION_ALLOWED_ERR exception, but
> > should
> > > > this method also throw a SYNTAX_ERR exception?
> > >
> > > Not sure we should.
> > > A syntax of a medium can be found in the CSS2 spec but this
interface is
> > > not supposed to be limited by CSS2.
> > > We also have media in the HTML4 spec. The stylesheet PI uses
> > > this definition. For them, this is "single media descriptor" but i
> > > can't find a clear syntax except that they are comma separated. I
don't
> > > think we can rely on this definition.
> > >
> > > So, without a clear common definition for the syntax of a medium,
it's
> > > difficult to raise an error. It also depends on the context.
I noticed that mediaText throws a SYNTAX_ERR exception on setting.  What
is an example of a string that would cause this exception's generation? 
Wouldn't this also be the case when setting using appendMedium()?

> > >
> > > Philippe.
> > 
> > I think I understand now.  For the case where I have an empty mediaList
> > named media, and I say media.appendMedium("print, braille"),
> > media.getItem(1) will return "braille". Correct?
> 
> No, it's not. You append a medium and not a list of media.
> In your case, media.getItem(1) should return "print, baille".
> 
> But we also have:
> 
> mediaText of type DOMString 
> The parsable textual representation of the media list. This is a
>  comma-separated list of media. 
> 
> So, I guess the comma should be definitively excluded from the syntax of
a
> medium:
> SYNTAX_ERR
>  If the medium contains a comma character.
> 
> Philippe.
> 
Received on Thursday, 4 May 2000 16:41:21 GMT

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