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

fix(plugin-form-interaction-tracking-browser): Access element attributes through getAttribute #958

Merged
merged 2 commits into from
Feb 12, 2025

Conversation

Dogfalo
Copy link
Collaborator

@Dogfalo Dogfalo commented Feb 12, 2025

Summary

Instead of accessing an element's attributes through it's object property, access it using getAttribute()
This is especially important in form elements where property values can be overridden by it's children inputs with that have an attribute name or id where the value matches property name.

Ex:

<form action="/form_submit.php">
  <input name="action" />
</form>
// console.log(form.action)
// <input name="action" />

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?: No

@Dogfalo Dogfalo requested a review from a team February 12, 2025 00:50
@izaaz izaaz requested a review from Mercy811 February 12, 2025 00:51
@Dogfalo Dogfalo merged commit 9a7aadf into v1.x Feb 12, 2025
4 checks passed
@Dogfalo Dogfalo deleted the AMP-123383-malformed-autocapture-event-properties branch February 12, 2025 17:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants