Commit Graph

6 Commits

Author SHA1 Message Date
Claude Bot
f95ef85afa feat: implement Bun.Browser API for browser automation
Add comprehensive browser automation API using Chrome DevTools Protocol:

Core Features:
- Bun.browser() function to launch Chrome/Chromium instances
- Browser class with CDP connection management
- Page class for tab control and interaction
- Input interfaces: Keyboard, Mouse, Touchscreen
- Element and JSHandle classes for DOM manipulation

API Implementation:
- Browser.launch() with configurable options (headless, args, etc.)
- Page navigation: goto(), goBack(), goForward(), reload()
- Content manipulation: content(), setContent(), title()
- JavaScript evaluation: evaluate(), evaluateHandle()
- Element interaction: querySelector(), click(), type()
- Screenshots: screenshot() with various formats
- Viewport control: setViewport(), emulate()
- Cookie management: setCookie(), cookies(), deleteCookie()
- Event handling: on(), off(), once()
- Network control: setUserAgent(), setExtraHTTPHeaders()

Browser Automation:
- Automatic Chrome process spawning with proper flags
- WebSocket connection to Chrome DevTools Protocol
- Support for headless and headful modes
- Proper cleanup and resource management
- Error handling for common failure scenarios

Testing:
- Basic API exposure tests
- Integration tests with real browser instances
- DOM interaction and JavaScript evaluation tests
- Screenshot and viewport manipulation tests
- Multi-page handling tests

This replaces Puppeteer with a native Bun implementation for
browser automation tasks including web scraping, testing,
and automated browser interactions.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 04:15:51 +00:00
Meghan Denny
62794850fa zig: node:zlib: tidy (#20362)
Co-authored-by: nektro <5464072+nektro@users.noreply.github.com>
2025-06-13 19:43:35 +02:00
Meghan Denny
5763a8e533 node:zlib: add zstd (#20313)
Co-authored-by: nektro <5464072+nektro@users.noreply.github.com>
2025-06-12 14:20:28 -07:00
Meghan Denny
d774baa28a tidyings from 18962 (#19644) 2025-05-14 18:47:51 -07:00
Meghan Denny
9e201eff9e node:net: implement BlockList (#19277) 2025-05-01 16:09:44 -07:00
chloe caruso
3349c995b5 no usingnamespace, organize jsc namespace, enable -fincremental (#19122)
Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com>
2025-04-22 16:34:15 -07:00