W3C home > Mailing lists > Public > public-html@w3.org > July 2007

Reflecting attributes: HTMLElement (detailed review of the DOM)

From: Simon Pieters <simonp@opera.com>
Date: Mon, 16 Jul 2007 18:05:30 +0200
To: public-html <public-html@w3.org>
Message-ID: <op.tvkezgsoidj3kv@hp-a0a83fcd39d2>

(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

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:24 UTC