Open Bug 1175919 Opened 9 years ago Updated 2 years ago

Integer attribute handling doesn't follow the spec

Categories

(Core :: DOM: Core & HTML, defect)

36 Branch
defect

Tracking

()

People

(Reporter: smaug, Unassigned)

References

(Blocks 1 open bug)

Details

Gecko's implementation seems to just ignore trailing non-digits, but https://html.spec.whatwg.org/multipage/infrastructure.html#rules-for-parsing-integers says "If the character indicated by position is not an ASCII digit, then return an error." http://jsbin.com/fonidicohi/edit?html,output
Interesting. On your testcase, Blink/WebKit seems to treat "200$" as "200", but treat "200*" as error? Also see the discussion in bug 1071508.
Blocks: 1071508
Found the wider context for this discussion at http://logs.glob.uno/?c=freenode%23whatwg&s=18%20Jun%202015&e=18%20Jun%202015#c951803 and following. We should check what other UAs (IE, I guess) do. It's possible that the spec is simply not web-compatible here.
Component: DOM → DOM: Core & HTML
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.