HTML5 object@width %-unit

Hello,
In the current HTML5 draft, the object element has a @width attribute
that accepts a value expressed in CSS pixels ("the attributes, if
specified, must have values that are valid non-negative integers"):
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-map-element.html#attr-dim-width

However, I have noticed that on almost all browsers I could test, the
object @width attribute also accepts a value given in a %-unit. For
instance.

	<object type="text/html" data="http://example.net/" width="50%" height="150">
	</object>

Test:
http://alexandre.alapetite.fr/divers/vrac/20091015-object-width-percent.html

I have tested the above code successfully in the following browsers:

- Windows Vista: Opera 10.0; Firefox 3.5.3; Chrome 4.0; Internet
Explorer 8 (32-bit and 64-bit);
- Windows XP: Opera 9.02; Firefox 1.5.0.12; Chrome 3.0; Internet
Explorer 5.5, 6, 7; Safari 3.2.3;

However, it does not seem to be understood by Netscape 6.2.

I think it is noticeable that nearly all current browsers accept a
%-value in the @width attribute of an object, while this is not
accepted by HTML5:

http://validator.nu/?doc=http%3A%2F%2Falexandre.alapetite.fr%2Fdivers%2Fvrac%2F20091015-object-width-percent.html
http://validator.w3.org/check?uri=http%3A%2F%2Falexandre.alapetite.fr%2Fdivers%2Fvrac%2F20091015-object-width-percent.html

I do not say that this is a bug in the HTML5 draft, or in browsers
implementation; it was just to catch your attention on this possible
contradiction.

Best regards,
Alexandre
http://alexandre.alapetite.fr

Received on Thursday, 15 October 2009 11:32:26 UTC