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] or input.p-x[value], then return the value attribute
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).
Describe the bug
Properties stored in an
inputtag are not being populated by itsvalueattribute. Looks like the spec supports thisTo Reproduce
HTML input:
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
inputthen click a button that will parse it from the live page.I then process the output (such as with ChartJS).