-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Properties stored in an input tag are not being populated by its value attribute. Looks like the spec supports this
else if
data.p-x[value]orinput.p-x[value], then return thevalueattribute
To Reproduce
HTML input:
<html lang="en">
<body>
<div class="h-item">
<input class="p-name" type="text" value="A">
<input class="p-value" type="number" value="10">
</div>
</body></html>Expected behavior
Correct JSON output:
{
"rels": {},
"rel-urls": {},
"items": [
{
"type": [
"h-item"
],
"properties": {
"name": [
"A"
],
"value": [
"10"
]
},
"lang": "en"
}
]
}Observed behavior
JSON output observed on demo
{
"rels": {},
"rel-urls": {},
"items": [
{
"type": [
"h-item"
],
"properties": {
"name": [
""
],
"value": [
""
]
},
"lang": "en"
}
]
}Additional context
I am using this in a browser whereby a user can update the input then click a button that will parse it from the live page.
let data = mf2(document.documentElement.outerHTML, { baseUrl: document.baseURI });I then process the output (such as with ChartJS).
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working