Name

Document.createComment( ) — create a new Comment node DOM Level 1 Core

Availability

Synopsis

Comment createComment(String data);

Arguments

data

The text of the Comment node to create.

Returns

A newly created Comment node, with the specified data as its text.

Get JavaScript: The Definitive Guide, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.