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

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 UTC