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

Re: HTMLImageElement.width / height (detailed review of Semantics)

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 30 Jul 2008 01:44:40 +0000 (UTC)
To: Simon Pieters <simonp@opera.com>
Cc: public-html <public-html@w3.org>
Message-ID: <Pine.LNX.4.62.0807300141080.29977@hixie.dreamhostps.com>

On Sun, 15 Jul 2007, Simon Pieters wrote:
> 
> (This is part of my detailed review of the Semantics and structure of HTML
> elements section.)
> 
> Shouldn't the HTMLImageElemnet.width and height attributes be unsigned long
> instead of long? They are in Opera, Safari and Firefox. In IE, they are
> unsigned long limited to only positive non-zero numbers.
> 
>    http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E%0A%3Cimg%20width%3D-1%3E%3Cscript%3Ew%28document.body.firstChild.width%29%3C/script%3E

I made img, iframe, object, video, and embed all be unsigned long. This 
doesn't match all browsers in all cases but it seems better to be 
consistent here rather than have some be unsigned and some not.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 30 July 2008 01:45:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:19 GMT