Unexpected Outcome in Parsing Component Attributes from HTML
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 17.6k
- Forks
- 4.4k
- PR merge metrics
- No merged PRs in 30d
Description
Description:
I noticed that the parsing of component attributes has an unexpected outcome when the last schema data attribute being set is a string and followed by a lone component attribute.
The below example results in the log component's data.channel to be assigned 'grabbable'.
<a-entity log="max:10;channel:main" grabbable geometry="primitive: plane"
position="-9.25 2 -11.2" rotation="0 90 0" scale="2 2 2"
material="color: #153D0F; side:double" text="color: #CEA579">
</a-entity>
The below example results in the log component's data.channel to be assigned 'main'.
<a-entity grabbable log="max:10;channel:main" geometry="primitive: plane"
position="-9.25 2 -11.2" rotation="0 90 0" scale="2 2 2"
material="color: #153D0F; side:double" text="color: #CEA579">
</a-entity>
- A-Frame Version: v0.9.2
- Platform / Device: MacOS Chrome Browser
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the component-attribute parsing entry point described by the reproducer and compare parsing when the lone grabbable attribute appears before versus after log. Reproduce the HTML examples in a focused test or existing parser coverage, then verify that log.data.channel remains "main" in both orders.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100