Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What source_line do we use when setting a content attribute to an uncompiled event handler from a Javascript string? #25681

Open
pshaughn opened this issue Feb 3, 2020 · 1 comment

Comments

@pshaughn
Copy link
Member

@pshaughn pshaughn commented Feb 3, 2020

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.

@pshaughn pshaughn changed the title What source_line do we use when setting an uncompiled event handler from a Javascript string? What source_line do we use when setting a content attribute to an uncompiled event handler from a Javascript string? Feb 3, 2020
@jdm
Copy link
Member

@jdm jdm commented Apr 29, 2020

#15051 looks related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.