Skip to content

Commit

Permalink
Update html-rewriter.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarred-Sumner committed Jan 13, 2025
1 parent c2e150f commit 6709028
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions docs/api/html-rewriter.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const rewriter = new HTMLRewriter().on("img", {
},
});

// Example usage
// An example HTML document
const html = `
<html>
<body>
Expand Down Expand Up @@ -87,8 +87,6 @@ rewriter.transform(Bun.file("index.html"));

Note that Cloudflare Workers implementation of HTMLRewriter only supports `Response` objects.

## Features

### Element Handlers

The `on(selector, handlers)` method allows you to register handlers for HTML elements that match a CSS selector. The handlers are called for each matching element during parsing:
Expand Down

0 comments on commit 6709028

Please sign in to comment.