Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Latest
method default.prototype.walkComments
import { default } from "https://deno.land/x/postcss@8.4.16/lib/container.js";

Traverses the container’s descendant nodes, calling callback for each comment node.

Like Container#each, this method is safe to use if you are mutating arrays during iteration.

root.walkComments(comment => {
  comment.remove()
})

Parameters

callback: (comment: Comment, indexed: number) => false | void

Iterator receives each node and index.

Returns

false | undefined

Returns false if iteration was broke.

Parameters

callback: (comment: Comment, indexed: number) => false | void

Returns

false | undefined