Skip to content

Implement document.createComment() in client/dom and related files #232

@yorkie

Description

@yorkie

Implement the DOM API document.createComment() in the JSAR runtime, specifically within the client/dom directory and any related files.

Requirements:

  • Add the createComment() method to the Document implementation, matching the standard Web API signature.
  • Ensure it returns a Comment node with correct node type and value.
  • Update or create the necessary Comment node class if it does not exist.
  • Integrate the new Comment node into the DOM tree and serialization logic as appropriate.
  • Add tests to verify comment node creation, tree insertion, and serialization.
  • Update documentation if needed.

Affected areas:

  • client/dom/document.*
  • client/dom/comment.* (if applicable)
  • Any other DOM-related files necessary for full support

References:

Acceptance Criteria:

  • document.createComment('text') returns a Comment node with value 'text'
  • The Comment node can be inserted into the DOM tree
  • Serialization (outerHTML, innerHTML, etc.) correctly handles comment nodes
  • Tests pass for comment node creation and usage

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions