Reflecting attributes: HTMLElement (detailed review of the DOM)

(This is part of my detailed review of the Document Object Model section.)

The spec says about setting a reflecting attribute of type HTMLElement (or  
an descendant thereof):

    On setting, if the given element has an id attribute, then the content
    attribute must be set to the value of that id attribute. Otherwise, the
    DOM attribute must be set to the empty string.

Shouldn't it raise an exception if the value isn't type-compatible with  
the DOM attribute? (e.g., .contextMenu would only accept HTMLMenuElement.)

Simon Pieters
Opera Software

Received on Monday, 16 July 2007 16:05:45 UTC