Re: Proposal: getStyleAs(property, primitiveValue)

On Sep 22, 2009, at 9:27 AM, Garrett Smith wrote:

>  * Too verbose. The defaultView is unrelated to the Element (the DOM
> spec says: "a computed style is related to an Element node").
> Verbosity is not such a problem with operations that don't occur
> frequently throughout the code. Reading styles is a common task.

I agree; that is a really big problem with that.

> New Proposal:
> var height = x.getStyleAs("height", "px");

I like it!

Received on Tuesday, 22 September 2009 17:34:27 UTC