Only extract value
meta when element is not a form, closes #2680
#2682
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
extractMeta
receives a "root element".When this element is an input, we want to retrieve the current value.
When the element is a form,
form.key
will look up any inputs in the form with the name "key". If an input has the name "value", then we would retrieve the input element as the value, instead of getting the value of an input.We explicitly avoid getting the value of a form to avoid this edgecase.
At time of writing, the value attribute is valid on button, data, input, li, meter, option, progress and param tags.
See also #2680 (comment)