Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upWhat source_line do we use when setting a content attribute to an uncompiled event handler from a Javascript string? #25681
Labels
Comments
|
#15051 looks related. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
script/dom/htmlelement.rs and htmlbodyelement.rs both have a TODO referencing closed issue #9604, but the functionality added in the course of closing 9604 seems to only be able to cover content attributes that are present in the HTML source, not assigning a Javascript string value to an attribute. I'm not sure what "A location where the script body originated, in case an error needs to be reported" even really means in https://html.spec.whatwg.org/#internal-raw-uncompiled-handler, when the script body was in a variable and not a literal.
I tried playing around in Firefox and Chrome to see what they do; they seem to do different things from each other, with Chrome saying line 1 for a case where Firefox says line 0.