LearnNewsExamplesServices
Frontmatter
id7139
titleParser: Component vs. HTML Tag Recognition
stateClosed
labels
enhancement
assigneestobiu
createdAtJul 31, 2025, 9:34 AM
updatedAtJul 31, 2025, 10:35 AM
githubUrlhttps://github.com/neomjs/neo/issues/7139
authortobiu
commentsCount0
parentIssue7130
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJul 31, 2025, 10:35 AM

Parser: Component vs. HTML Tag Recognition

Closed v10.3.0 enhancement
tobiu
tobiu commented on Jul 31, 2025, 9:34 AM

Description: Implement the logic within the parse5 processor to differentiate between standard HTML tags and neo.mjs component tags based on the convention defined in the Syntax Specification.

Implementation Details:

  • When traversing the parse5 AST, check the tag name of each element.
  • If the tag name follows the component convention (e.g., starts with a capital letter), generate a VDOM object with a module or className property pointing to the corresponding component class.
  • If it's a standard HTML tag, generate a standard VDOM object with a tag property.
  • A mechanism will be needed to resolve the string name (e.g., "GridContainer") to the actual class constructor (GridContainer) at runtime. This may involve a component registry or passing a scope object to the template processor.
tobiu assigned to @tobiu on Jul 31, 2025, 9:34 AM
tobiu added parent issue #7130 on Jul 31, 2025, 9:34 AM
tobiu added the enhancement label on Jul 31, 2025, 9:34 AM
tobiu referenced in commit dd870b1 - "Parser: Component vs. HTML Tag Recognition #7139" on Jul 31, 2025, 10:35 AM
tobiu closed this issue on Jul 31, 2025, 10:35 AM