-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Open
Labels
HTMLRewritercloudflare workers APIcloudflare workers APIbugSomething isn't workingSomething isn't workingconfirmed bugWe can reproduce this issueWe can reproduce this issue
Description
What version of Bun is running?
No response
What platform is your computer?
No response
What steps can reproduce the bug?
new HTMLRewriter()
.on("script", {
element(element) {
console.log(element.getAttribute("src"));
},
})
.transform(new Blob(['<script src="/main.js"></script>']));What is the expected behavior?
this goes against the type signature of transform(input: Response | Blob | Bun.BufferSource): Response
What do you see instead?
TypeError: Expected Response or Body
Additional information
i also expected it to work with BunFile, but it doesn't:
new HTMLRewriter()
.on("script", {
element(element) {
console.log(element.getAttribute("src"));
},
})
.transform(Bun.file("index.html"));kevlened, TomasHubelbauer and mifopen
Metadata
Metadata
Assignees
Labels
HTMLRewritercloudflare workers APIcloudflare workers APIbugSomething isn't workingSomething isn't workingconfirmed bugWe can reproduce this issueWe can reproduce this issue