Issue metadata
Sign in to add a comment
|
on* handler throws unhelpful SyntaxError |
||||||||||||||||||||||||
Issue description
The SyntaxError thrown when evaluating problematic on* handlers doesn't really make sense and is not helpful.
Consider:
<input onclick="foo("bar")")">
Because of the improperly nested quotes, this parses as something like:
<input onclick="foo(" bar")")"="">
which can be simplified to:
<input onclick="foo(">
But the error thrown when clicking is:
Uncaught SyntaxError: Unexpected token }
Since no } actually appears in the (html) source, this is misleading and causes confusion[1].
Might be related to issue 70895.
1. Example: https://stackoverflow.com/questions/37820123/uncaught-syntaxerror-unexpected-token-when-trying-pass-data-to-jquery-variabl/37820293
|
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by hablich@chromium.org
, Jun 15 2016Status: Duplicate (was: Untriaged)