[Webkit-unassigned] [Bug 44980] setAttribute() followed by getAttribute() on select.size does not return the same thing

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 12 08:42:50 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=44980





--- Comment #6 from Tab Atkins <tabatkins at google.com>  2011-12-12 08:42:49 PST ---
(In reply to comment #5)
> > The size attribute, if specified, must have a value that is a valid non-negative integer greater than zero.
> 
> This is a document conformance requirement, not an engine one. Nothing should prevent setting content attributes with setAttribute (and indeed, even setAttribute("multiple", "foo") works in WebKit).

Oh, whoops, indeed.  I had missed that the value gotten back out was from the attribute, not the property.

In that case, yes, we should be returning "foo".  It's an authoring error to set such a value, but nothing wrong on our part.  We just parse it as an integer when mirroring it into the size property.

> Tangentially related, current spec text is different from what is quoted in comment 3. The IDL attribute's value no longer magically changes to 1 or 4 depending on whether "multiple" is set.

Yes, always read the WHATWG version of the spec, as it's more up-to-date: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#attr-select-size

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list