Skip to main content
The Deno 2 Release Candidate is here
Learn more
Latest
method Node.prototype.next
Re-export
import { Node } from "https://deno.land/x/postcss@8.4.16/lib/postcss.d.ts";

Returns the next child of the node’s parent. Returns undefined if the current node is the last child.

if (comment.text === 'delete next') {
  const next = comment.next()
  if (next) {
    next.remove()
  }
}

Returns

ChildNode | undefined

Next node.