by Before Semicolon

Comment

Comment details
Details
name Comment
type class
arguments A plain string comment
properties most DOM document comment properties
methods most DOM document comment methods
description A class representing HTML comment.

Constructor

The constructor takes the comment string. It is the same as calling the createComment on the document in the browser.

Properties and Methods

The comment instance is a server-side replica of the browser comment node. It shares the node most properties and methods.

Usage Examples

const {Comment} = require("@beforesemicolon/html-plus");

const comment = new Comment('simple comment');

comment.nodeValue; // 'simple comment'
comment.nodeName; // '#comment'
comment.nodeType; // '8'